Skip to content

Commit 0823eb9

Browse files
chore: use cargo-binstall for faster cargo-zigbuild installation
Replace `cargo install cargo-zigbuild` (compiles from source, ~40s) with `cargo binstall` (downloads pre-built binary, ~5s). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cc13e47 commit 0823eb9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ jobs:
4444
- uses: dtolnay/rust-toolchain@stable
4545
with:
4646
targets: ${{ matrix.target }}
47-
- name: Install cargo-zigbuild
48-
run: pip install ziglang && cargo install cargo-zigbuild
47+
- name: Install zig and cargo-zigbuild
48+
run: pip install ziglang && curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash && cargo binstall -y cargo-zigbuild
4949
- uses: mozilla-actions/sccache-action@v0.0.9
5050
- name: Cross-compile for ${{ matrix.arch }}
5151
run: cargo zigbuild --release --target ${{ matrix.target }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
- uses: dtolnay/rust-toolchain@stable
3838
with:
3939
targets: ${{ matrix.target }}
40-
- name: Install cargo-zigbuild
41-
run: pip install ziglang && cargo install cargo-zigbuild
40+
- name: Install zig and cargo-zigbuild
41+
run: pip install ziglang && curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash && cargo binstall -y cargo-zigbuild
4242
- uses: mozilla-actions/sccache-action@v0.0.9
4343
- name: Cross-compile for ${{ matrix.arch }}
4444
run: cargo zigbuild --release --target ${{ matrix.target }}

0 commit comments

Comments
 (0)