chore: fix static release binaries using zigbuild
This commit is contained in:
parent
275d249320
commit
82d914ebbb
5 changed files with 32 additions and 14 deletions
21
Justfile
21
Justfile
|
|
@ -6,15 +6,15 @@ alias b := build
|
|||
# Build statically linked release binaries for all supported architectures
|
||||
[group('build')]
|
||||
build-release-static:
|
||||
cargo build \
|
||||
cargo zigbuild \
|
||||
--release \
|
||||
--frozen \
|
||||
--workspace \
|
||||
--target 'x86_64-unknown-linux-musl' \
|
||||
--target 'aarch64-unknown-linux-musl'
|
||||
|
||||
[ "$(readelf -d target/x86_64-unknown-linux-musl/release/otterd | grep NEEDED | wc -l)" = 0 ]
|
||||
[ "$(readelf -d target/aarch64-unknown-linux-musl/release/otterd | grep NEEDED | wc -l)" = 0 ]
|
||||
[ "$(readelf -d target/x86_64-unknown-linux-musl/release/otter | grep NEEDED | wc -l)" = 0 ]
|
||||
[ "$(readelf -d target/aarch64-unknown-linux-musl/release/otter | grep NEEDED | wc -l)" = 0 ]
|
||||
|
||||
test:
|
||||
cargo test --frozen --workspace
|
||||
|
|
@ -38,6 +38,13 @@ fetch:
|
|||
clean:
|
||||
cargo clean
|
||||
|
||||
run:
|
||||
cargo run \
|
||||
--bin otter \
|
||||
-- serve \
|
||||
-c ./otter.toml \
|
||||
--log debug
|
||||
|
||||
doc:
|
||||
cargo doc --workspace --frozen
|
||||
|
||||
|
|
@ -45,10 +52,10 @@ publish-release-binaries tag: build-release-static
|
|||
curl \
|
||||
--netrc \
|
||||
--fail \
|
||||
--upload-file target/x86_64-unknown-linux-musl/release/otterd \
|
||||
https://git.rustybever.be/api/packages/Chewing_Bever/generic/otter/"{{ tag }}"/otterd-linux-amd64
|
||||
--upload-file target/x86_64-unknown-linux-musl/release/otter \
|
||||
https://git.rustybever.be/api/packages/Chewing_Bever/generic/otter/"{{ tag }}"/otter-linux-amd64
|
||||
curl \
|
||||
--netrc \
|
||||
--fail \
|
||||
--upload-file target/aarch64-unknown-linux-musl/release/otterd \
|
||||
https://git.rustybever.be/api/packages/Chewing_Bever/generic/otter/"{{ tag }}"/otterd-linux-arm64
|
||||
--upload-file target/aarch64-unknown-linux-musl/release/otter \
|
||||
https://git.rustybever.be/api/packages/Chewing_Bever/generic/otter/"{{ tag }}"/otter-linux-arm64
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue