@@ -17,10 +17,10 @@ jobs:
1717 fail-fast : false
1818 matrix :
1919 build :
20- - { os: ubuntu-latest, exe: , target: x86_64-unknown-linux-gnu }
21- - { os: macos-latest, exe: , target: x86_64-apple-darwin }
22- - { os: windows-latest, exe: .exe, target: x86_64-pc-windows-msvc }
23- - { os: windows -latest, exe: .exe, target: x86_64-pc-windows-gnu }
20+ - { os: ubuntu-latest, exe: , zig: false, build: build, target: x86_64-unknown-linux-gnu }
21+ - { os: macos-latest, exe: , zig: false, build: build, target: x86_64-apple-darwin }
22+ - { os: windows-latest, exe: .exe, zig: false, build: build, target: x86_64-pc-windows-msvc }
23+ - { os: ubuntu -latest, exe: , zig: true, build: zigbuild, target: aarch64-apple-darwin }
2424 steps :
2525 - name : checkout
2626 uses : actions/checkout@v3
@@ -33,11 +33,19 @@ jobs:
3333 target : ${{ matrix.build.target }}
3434 override : true
3535
36+ - name : install zig
37+ uses : goto-bus-stop/setup-zig@v2
38+ if : ${{ matrix.build.zig }}
39+
40+ - name : install cargo-zigbuild
41+ run : cargo install cargo-zigbuild
42+ if : ${{ matrix.build.zig }}
43+
3644 - name : build codegen executable
37- run : cargo build --example codegen --release
45+ run : cargo ${{ matrix. build.build }} --example codegen --release --target ${{ matrix.build.target }}
3846
3947 - name : give executable representable name
40- run : cp target/release/examples/codegen${{ matrix.build.exe }} ./codegen-${{ matrix.build.target }}${{ matrix.build.exe }}
48+ run : cp target/${{ matrix.build.target }}/ release/examples/codegen${{ matrix.build.exe }} ./codegen-${{ matrix.build.target }}${{ matrix.build.exe }}
4149
4250 - name : upload executable
4351 uses : actions/upload-artifact@v3
0 commit comments