Skip to content
21 changes: 18 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
cross_compiler: gcc-aarch64-linux-gnu
linker_env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER
linker: aarch64-linux-gnu-gcc
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
artifact: zeroclaw
ext: tar.gz
use_zigbuild: true
- os: macos-14
target: aarch64-apple-darwin
artifact: zeroclaw
Expand All @@ -80,13 +85,23 @@ jobs:
sudo apt-get update -qq
sudo apt-get install -y ${{ matrix.cross_compiler }}

- name: Install cargo-zigbuild
if: matrix.use_zigbuild
run: |
pip3 install ziglang==0.15.2
cargo install cargo-zigbuild --version 0.22.1

- name: Build release
shell: bash
run: |
if [ -n "${{ matrix.linker_env || '' }}" ] && [ -n "${{ matrix.linker || '' }}" ]; then
export "${{ matrix.linker_env }}=${{ matrix.linker }}"
if [ "${{ matrix.use_zigbuild || '' }}" = "true" ]; then
cargo zigbuild --release --locked --target ${{ matrix.target }}
else
if [ -n "${{ matrix.linker_env || '' }}" ] && [ -n "${{ matrix.linker || '' }}" ]; then
export "${{ matrix.linker_env }}=${{ matrix.linker }}"
fi
cargo build --release --locked --target ${{ matrix.target }}
fi
cargo build --release --locked --target ${{ matrix.target }}

- name: Package (Unix)
if: runner.os != 'Windows'
Expand Down