diff --git a/RELEASING.md b/RELEASING.md index b9666e4..ba7bd8b 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -30,14 +30,20 @@ Cargo.lock, et lancer toute la batterie : ### y compris Debian 12 (glibc 2.36) — ne JAMAIS publier un binaire glibc ### compilé sur une base récente. - docker run --rm -v "${PWD}:/work" -w /work -e CARGO_TARGET_DIR=/tmp/target-musl \ - rust:1.94-alpine sh -c "apk add --no-cache build-base && \ + # cargo-zigbuild : zig (~50 Mo) fournit le linker croisé pour les DEUX + # cibles musl (rust:1.94-alpine n'embarque pas de compilateur croisé + # aarch64 : 'aarch64-linux-musl-gcc not found'). + docker run --rm -v "${PWD}:/work" -w /work -e CARGO_TARGET_DIR=/tmp/am-target \ + -e CARGO_INCREMENTAL=0 rust:1.94-alpine sh -c "apk add --no-cache build-base zip curl >/dev/null && \ rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl && \ - cargo build --release --locked --target x86_64-unknown-linux-musl && \ - cargo build --release --locked --target aarch64-unknown-linux-musl && \ + curl -fsSL https://ziglang.org/download/0.14.1/zig-x86_64-linux-0.14.1.tar.xz -o /tmp/zig.tar.xz && \ + tar -xf /tmp/zig.tar.xz -C /opt && \ + export PATH=/opt/zig-x86_64-linux-0.14.1:\$PATH && \ + cargo install cargo-zigbuild --locked && \ + cargo zigbuild --release --locked --target x86_64-unknown-linux-musl --target aarch64-unknown-linux-musl && \ mkdir -p dist && \ - cp /tmp/target-musl/x86_64-unknown-linux-musl/release/am dist/am-linux-x86_64 && \ - cp /tmp/target-musl/aarch64-unknown-linux-musl/release/am dist/am-linux-aarch64 && \ + cp /tmp/am-target/x86_64-unknown-linux-musl/release/am dist/am-linux-x86_64 && \ + cp /tmp/am-target/aarch64-unknown-linux-musl/release/am dist/am-linux-aarch64 && \ cd dist && tar -czf am-linux-x86_64.tar.gz am-linux-x86_64 && \ tar -czf am-linux-aarch64.tar.gz am-linux-aarch64"