From e7692c109d4cb7a522b4956323f9ed09b7c71ee9 Mon Sep 17 00:00:00 2001 From: Yoshihiro OKUMURA Date: Fri, 17 Apr 2026 21:20:50 +0900 Subject: [PATCH] ci: replace cross with cargo-zigbuild for aarch64 cross-compilation 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> --- .gitea/workflows/release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 7d94b7c..bd23e5a 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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}