Skip to content

Commit 1d28c90

Browse files
committed
Fix zig macos ci build
* Make the macos build use 1 process instead of hitting the macos process limit immediately, utilize the build.zig `-Dparallel false` option for macos ci * Split the macos ci into a new build stage (out of the ubuntu, macos build maxtrix), to allow for multiple architecture builds in the future after the zig bindings improve
1 parent 864c15a commit 1d28c90

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/zigbuild.yml

+28-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ on:
1515
pull_request:
1616

1717
jobs:
18-
build:
18+
build-ubuntu:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
runs-on: [ubuntu-latest, macos-latest]
22+
runs-on: [ubuntu-latest]
2323
runs-on: ${{ matrix.runs-on }}
2424
steps:
2525
- uses: actions/checkout@v3
@@ -39,7 +39,33 @@ jobs:
3939

4040
- name: Build Summary
4141
run: zig build --summary all -freference-trace
42+
build-macos:
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
runs-on: [macos-latest]
47+
runs-on: ${{ matrix.runs-on }}
48+
steps:
49+
- uses: actions/checkout@v3
50+
with:
51+
submodules: recursive
52+
fetch-depth: 0
53+
- uses: goto-bus-stop/setup-zig@v2
54+
with:
55+
version: 0.12.0
56+
- uses: lukka/get-cmake@latest
57+
with:
58+
cmakeVersion: latest
59+
ninjaVersion: latest
60+
61+
# MacOS has a hard process limit that we will hit if we do a
62+
# parallel build, so disable parallel cmake build (manual
63+
# option set in `build.zig`)
64+
- name: CMake Build
65+
run: zig build -Dparallel=false cmake
4266

67+
- name: Build Summary
68+
run: zig build --summary all -freference-trace
4369
# ===================================================================
4470
# zig-mingw:
4571
# runs-on: windows-latest

0 commit comments

Comments
 (0)