@@ -27,21 +27,24 @@ jobs:
2727 runs-on : ${{ matrix.os }}
2828 steps :
2929 - uses : actions/checkout@v4
30-
31- - name : Setup Zig
32- uses : mlugg/setup-zig@v1
30+ - uses : mlugg/setup-zig@v1
3331 with :
3432 version : 0.13.0
3533
3634 - name : Install ALSA (Linux Only)
3735 if : matrix.target == 'x86_64-linux'
3836 run : sudo apt-get update && sudo apt-get install -y libasound2-dev
3937
40- - name : Verify Compilation
38+ - name : Build
4139 run : |
42- if [ "${{ matrix.target }}" = "x86_64-linux" ]; then
40+ if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
41+ # On Mac runner, build natively to find Frameworks
42+ zig build
43+ elif [[ "${{ matrix.target }}" == "x86_64-linux" ]]; then
44+ # On Linux runner, build natively to find ALSA
4345 zig build
4446 else
47+ # Windows cross-compilation from Linux works fine
4548 zig build -Dtarget=${{ matrix.target }}
4649 fi
4750
6366 runs-on : ${{ matrix.os }}
6467 steps :
6568 - uses : actions/checkout@v4
66-
67- - name : Setup Zig
68- uses : mlugg/setup-zig@v1
69+ - uses : mlugg/setup-zig@v1
6970 with :
7071 version : 0.13.0
7172
7576
7677 - name : Build Zip
7778 run : |
78- if [ "${{ matrix.target }}" = "x86_64-linux" ]; then
79+ if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
80+ zig build zip -Dversion=${{ github.ref_name }}
81+ elif [[ "${{ matrix.target }}" == "x86_64-linux" ]]; then
7982 zig build zip -Dversion=${{ github.ref_name }}
8083 else
8184 zig build zip -Dtarget=${{ matrix.target }} -Dversion=${{ github.ref_name }}
0 commit comments