88
99jobs :
1010 build :
11- strategy :
12- matrix :
13- include :
14- - os : ubuntu-latest
15- target : x86_64-linux
16- - os : windows-latest
17- target : x86_64-windows
18- extra_flags : " "
19- - os : macos-latest
20- target : x86_64-macos
21- - os : macos-latest
22- target : aarch64-macos
23- runs-on : ${{ matrix.os }}
11+ runs-on : ubuntu-latest
2412 steps :
2513 - uses : actions/checkout@v4
2614
@@ -29,17 +17,32 @@ jobs:
2917 with :
3018 version : ' 0.14.0'
3119
32- - name : Windows workaround
33- if : matrix.os == 'windows-latest'
20+ - name : Build for x86_64-linux
3421 run : |
35- Add-Content -Path build.zig -Value "`nexe.root_module.link_libc = true;" -Encoding utf8
22+ zig build -Doptimize=ReleaseFast -Dtarget=x86_64-linux
23+ mkdir -p artifacts
24+ cp zig-out/bin/plscommit artifacts/plscommit-x86_64-linux
3625
37- - name : Build
26+ - name : Build for x86_64-windows
3827 run : |
39- zig build -Doptimize=ReleaseFast -Dtarget=${{ matrix.target }} ${{ matrix.extra_flags || '' }}
28+ zig build -Doptimize=ReleaseFast -Dtarget=x86_64-windows
29+ mkdir -p artifacts
30+ cp zig-out/bin/plscommit artifacts/plscommit-x86_64-windows.exe
4031
41- - name : Upload artifact
32+ - name : Build for x86_64-macos
33+ run : |
34+ zig build -Doptimize=ReleaseFast -Dtarget=x86_64-macos
35+ mkdir -p artifacts
36+ cp zig-out/bin/plscommit artifacts/plscommit-x86_64-macos
37+
38+ - name : Build for aarch64-macos
39+ run : |
40+ zig build -Doptimize=ReleaseFast -Dtarget=aarch64-macos
41+ mkdir -p artifacts
42+ cp zig-out/bin/plscommit artifacts/plscommit-aarch64-macos
43+
44+ - name : Upload artifacts
4245 uses : actions/upload-artifact@v4
4346 with :
44- name : plscommit-${{ matrix.target }}
45- path : zig-out/bin/plscommit
47+ name : plscommit-binaries
48+ path : artifacts/
0 commit comments