(merge)
This commit is contained in:
commit
a47efeb329
|
@ -15,30 +15,30 @@ tasks:
|
|||
- check-dnapi-rs: |
|
||||
source ~/.cargo/env
|
||||
cd /home/build/trifid/dnapi-rs
|
||||
cargo check --locked --target x86_64-unknown-linux-musl
|
||||
cargo clippy --locked --target x86_64-unknown-linux-musl
|
||||
cargo check --target x86_64-unknown-linux-musl
|
||||
cargo clippy --target x86_64-unknown-linux-musl
|
||||
- check-nebula-ffi: |
|
||||
source ~/.cargo/env
|
||||
cd /home/build/trifid/nebula-ffi
|
||||
cargo check --locked --target x86_64-unknown-linux-musl
|
||||
cargo clippy --locked --target x86_64-unknown-linux-musl
|
||||
cargo check --target x86_64-unknown-linux-musl
|
||||
cargo clippy --target x86_64-unknown-linux-musl
|
||||
- check-tfcli: |
|
||||
source ~/.cargo/env
|
||||
cd /home/build/trifid/tfcli
|
||||
cargo check --locked --target x86_64-unknown-linux-musl
|
||||
cargo clippy --locked --target x86_64-unknown-linux-musl
|
||||
cargo check --target x86_64-unknown-linux-musl
|
||||
cargo clippy --target x86_64-unknown-linux-musl
|
||||
- check-tfclient: |
|
||||
source ~/.cargo/env
|
||||
cd /home/build/trifid/tfclient
|
||||
cargo check --locked --target x86_64-unknown-linux-musl
|
||||
cargo clippy --locked --target x86_64-unknown-linux-musl
|
||||
cargo check --target x86_64-unknown-linux-musl
|
||||
cargo clippy --target x86_64-unknown-linux-musl
|
||||
- check-trifid-api: |
|
||||
source ~/.cargo/env
|
||||
cd /home/build/trifid/trifid-api
|
||||
cargo check --locked --target x86_64-unknown-linux-musl
|
||||
cargo clippy --locked --target x86_64-unknown-linux-musl
|
||||
cargo check --target x86_64-unknown-linux-musl
|
||||
cargo clippy --target x86_64-unknown-linux-musl
|
||||
- check-trifid-pki: |
|
||||
source ~/.cargo/env
|
||||
cd /home/build/trifid/trifid-pki
|
||||
cargo check --locked --target x86_64-unknown-linux-musl
|
||||
cargo clippy --locked --target x86_64-unknown-linux-musl
|
||||
cargo check --target x86_64-unknown-linux-musl
|
||||
cargo clippy --target x86_64-unknown-linux-musl
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
image: archlinux
|
||||
packages:
|
||||
- xbps-static-bin
|
||||
- openssl
|
||||
- go
|
||||
- clang
|
||||
- musl
|
||||
sources:
|
||||
- https://git.e3t.cc/~core/trifid
|
||||
tasks:
|
||||
- archive: |
|
||||
curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
source ~/.cargo/env
|
||||
rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
cd /home/build/trifid
|
||||
|
||||
describe=$(git describe)
|
||||
if [[ $describe == tfcli* ]]; then
|
||||
project=tfcli
|
||||
fi
|
||||
if [[ $describe == tfclient* ]]; then
|
||||
project=tfclient
|
||||
fi
|
||||
if [[ $describe == trifid-api* ]]; then
|
||||
project=trifid-api
|
||||
fi
|
||||
|
||||
pkgver=$(git describe | sed -e "s/$project-v//g" | sed -e 's/-/_/g')
|
||||
|
||||
echo "project=$project" >> ~/.buildenv
|
||||
echo "pkgver=$pkgver" >> ~/.buildenv
|
||||
- build: |
|
||||
source ~/.cargo/env
|
||||
cd /home/build/trifid/packages/void_amd64_$project
|
||||
./build.sh /home/build/trifid $pkgver
|
||||
sha256sum *.xbps
|
|
@ -2073,7 +2073,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "nebula-ffi"
|
||||
version = "0.1.1"
|
||||
version = "0.1.3"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"gobuild",
|
||||
|
@ -3447,7 +3447,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tfclient"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"base64 0.21.0",
|
||||
"base64-serde",
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# Cross config
|
||||
[target.aarch64-unknown-linux-musl]
|
||||
pre-build = [
|
||||
"apt-get update && apt-get install --assume-yes wget && wget https://go.dev/dl/go1.20.5.linux-amd64.tar.gz -O /go.tar.gz && tar -C /usr/local -xzf /go.tar.gz && echo \"export PATH=$PATH:/usr/local/go/bin\" >> /etc/profile && touch /go-installed",
|
||||
]
|
||||
|
||||
[target.aarch64-unknown-linux-musl.env]
|
||||
volumes = []
|
||||
passthrough = ["GOPATH=/tmp/gopath", "GOCACHE=/tmp/gocache"]
|
||||
|
||||
[target.x86_64-unknown-linux-musl]
|
||||
pre-build = [
|
||||
"apt-get update && apt-get install --assume-yes wget && wget https://go.dev/dl/go1.20.5.linux-amd64.tar.gz -O /go.tar.gz && tar -C /usr/local -xzf /go.tar.gz && echo \"export PATH=$PATH:/usr/local/go/bin\" >> /etc/profile && touch /go-installed",
|
||||
]
|
||||
|
||||
[target.x86_64-unknown-linux-musl.env]
|
||||
volumes = []
|
||||
passthrough = ["GOPATH=/tmp/gopath", "GOCACHE=/tmp/gocache"]
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "nebula-ffi"
|
||||
version = "0.1.1"
|
||||
version = "0.1.3"
|
||||
edition = "2021"
|
||||
description = "A Rust wrapper crate for communicating with Nebula via a CGO FFI."
|
||||
license = "GPL-3.0-or-later"
|
||||
|
|
|
@ -2,8 +2,20 @@ use std::env;
|
|||
use std::path::PathBuf;
|
||||
use bindgen::CargoCallbacks;
|
||||
use gobuild::BuildMode;
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
// Find compiler: if /usr/local/go/bin/go exists, use that
|
||||
// otherwise, rely on PATH
|
||||
let compiler;
|
||||
if Path::new("/usr/local/go/bin/go").exists() {
|
||||
println!("Using /usr/local/go/bin/go");
|
||||
compiler = "/usr/local/go/bin/go";
|
||||
} else {
|
||||
compiler = "go";
|
||||
}
|
||||
|
||||
gobuild::Build::new().compiler(compiler).file("main.go").compile("nebulaffi");
|
||||
gobuild::Build::new().buildmode(BuildMode::CShared).file("main.go").compile("nebulaffi");
|
||||
|
||||
println!("Go compile success");
|
||||
|
|
|
@ -7,7 +7,7 @@ cd tfcli || exit
|
|||
echo "Building for release, v$2_$3 (+static) (--target x86_64-unknown-musl)"
|
||||
cargo build --release --target x86_64-unknown-linux-musl
|
||||
|
||||
cd ../packages/void || exit
|
||||
cd ../packages/void_amd64_tfcli || exit
|
||||
|
||||
echo "Creating workdir"
|
||||
rm -rf work
|
||||
|
@ -17,7 +17,7 @@ mkdir -p work/etc/sv
|
|||
|
||||
echo "Copying tfcli binary"
|
||||
|
||||
cp ../../target/release/tfcli work/usr/bin/tfcli
|
||||
cp ../../target/x86_64-unknown-linux-musl/release/tfcli work/usr/bin/tfcli
|
||||
chmod 755 work/usr/bin/tfcli
|
||||
|
||||
echo "Building XBPS package"
|
||||
|
|
|
@ -7,7 +7,7 @@ cd tfclient || exit
|
|||
echo "Building for release, v$2_$3 (+static) (--target x86_64-unknown-musl)"
|
||||
cargo build --release --target x86_64-unknown-linux-musl
|
||||
|
||||
cd ../packages/void || exit
|
||||
cd ../packages/void_amd64_tfclient || exit
|
||||
|
||||
echo "Creating workdir"
|
||||
rm -rf work
|
||||
|
@ -17,7 +17,7 @@ mkdir -p work/etc/sv
|
|||
|
||||
echo "Copying tfclient binary"
|
||||
|
||||
cp ../../target/release/tfclient work/usr/bin/tfclient
|
||||
cp ../../target/x86_64-unknown-linux-musl/release/tfclient work/usr/bin/tfclient
|
||||
chmod 755 work/usr/bin/tfclient
|
||||
cp -r tfclient work/etc/sv
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "tfclient"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
edition = "2021"
|
||||
description = "An open-source reimplementation of a Defined Networking-compatible client"
|
||||
license = "GPL-3.0-or-later"
|
||||
|
@ -48,3 +48,4 @@ copyright = "e3team <admin@e3t.cc>"
|
|||
license-file = "LICENSE.txt"
|
||||
maintainer-scripts = "debian/"
|
||||
systemd-units = { enable = false, unit-name = "tfclient@" }
|
||||
|
||||
|
|
Loading…
Reference in New Issue