Skip to content

Commit 7230980

Browse files
add new targets for Go wrapper
1 parent f01c270 commit 7230980

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.github/workflows/build-rust-cross-platform.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,18 @@ jobs:
1919
matrix:
2020
settings:
2121
- os: macos-12
22-
target: x86_64-apple-darwin
23-
- os: macos-12
24-
target: aarch64-apple-darwin
22+
target:
23+
- x86_64-apple-darwin
24+
- aarch64-apple-darwin
2525
- os: windows-2022
26-
target: x86_64-pc-windows-msvc
26+
target:
27+
- x86_64-pc-windows-msvc
28+
- x86_64-pc-windows-gnu
2729
- os: ubuntu-22.04
28-
target: x86_64-unknown-linux-gnu
30+
target:
31+
- x86_64-unknown-linux-gnu
32+
- x86_64-unknown-linux-musl
33+
- aarch64-unknown-linux-musl
2934

3035
steps:
3136
- name: Checkout
@@ -39,13 +44,20 @@ jobs:
3944
- name: Cache cargo registry
4045
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
4146

47+
- uses: goto-bus-stop/setup-zig@7ab2955eb728f5440978d5824358023be3a2802d # v2.2.0
48+
with:
49+
version: 0.12.0
50+
51+
- name: Install Zigbuild
52+
run: cargo install cargo-zigbuild --locked --git https://github.com/rust-cross/cargo-zigbuild --rev 6f7e1336c9cd13cf1b3704f93c40fcf84caaed6b # 0.18.4
53+
4254
- name: Add build architecture
4355
run: rustup target add ${{ matrix.settings.target }}
4456

4557
- name: Build Rust
4658
env:
4759
RUSTFLAGS: "-D warnings"
48-
run: cargo build --target ${{ matrix.settings.target }} --release
60+
run: cargo zigbuild --target ${{ matrix.settings.target }} --release
4961

5062
- name: Upload Artifact
5163
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3

0 commit comments

Comments
 (0)