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>
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user