ci: replace cross with cargo-zigbuild for aarch64 cross-compilation
Release / build-linux-x86_64 (push) Successful in 1m35s
Release / build-linux-aarch64 (push) Successful in 2m5s

cross runs builds inside a Docker container, so the host-installed
Rust toolchain is not visible. Replace with cargo-zigbuild which
uses Zig as a cross-linker and runs directly on the host.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-04-17 21:20:50 +09:00
parent 3a3186b24a
commit e7692c109d
+7 -3
View File
@@ -41,10 +41,14 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Install cross
run: cargo install cross --locked
- name: Install cargo-zigbuild
run: |
pip3 install ziglang --break-system-packages
cargo install cargo-zigbuild --locked
- name: Add aarch64 musl target
run: rustup target add aarch64-unknown-linux-musl
- name: Build
run: cross build --release --target aarch64-unknown-linux-musl
run: cargo zigbuild --release --target aarch64-unknown-linux-musl
- name: Create archive
run: |
VERSION=${GITHUB_REF_NAME#v}