Skip to content

Commit

Permalink
GH Actions: Test zig build on MacOS
Browse files Browse the repository at this point in the history
PR #609 (bdwgc).
  • Loading branch information
plajjan authored and ivmai committed Jan 11, 2024
1 parent 9eae294 commit 9464650
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/zig-build.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# This workflow is for zig-based build/test running on Linux/x86_64.
# This workflow is for zig-based build/test running on Linux and MacOS (x64).
name: zig build

on: [ push, pull_request ]

jobs:
build:
name: thr:${{ matrix.enable_threads }} rwlock:${{ matrix.enable_rwlock }} redir:${{ matrix.redirect_malloc }} gcdeb:${{ matrix.enable_gc_debug }} munmap:${{ matrix.enable_munmap }} paramark:${{ matrix.parallel_mark }} thrlocal:${{ matrix.thread_local_alloc }}
runs-on: ubuntu-latest
timeout-minutes: 4
name: ${{ matrix.os }} thr:${{ matrix.enable_threads }} rwlock:${{ matrix.enable_rwlock }} redir:${{ matrix.redirect_malloc }} gcdeb:${{ matrix.enable_gc_debug }} munmap:${{ matrix.enable_munmap }} paramark:${{ matrix.parallel_mark }} thrlocal:${{ matrix.thread_local_alloc }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10

strategy:
fail-fast: false

matrix:
# TODO: move from nightly to zig 0.12 final when released.
zig_version: [ "0.12.0-dev.2076+8fd15c6ca" ]
os: [ macos-latest, ubuntu-latest ]
gc_assertions: [ true ]
large_config: [ false ]
enable_threads: [ false, true ]
Expand All @@ -40,9 +41,14 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: "Install zig"
- name: "Install zig on Linux/x86_64"
if: runner.os == 'Linux'
run: |
mkdir zig && curl https://ziglang.org/builds/zig-linux-x86_64-${{matrix.zig_version}}.tar.xz | tar Jx --directory=zig --strip-components=1
- name: "Install zig on MacOS/x86_64"
if: runner.os == 'macOS'
run: |
mkdir zig && curl https://ziglang.org/builds/zig-macos-x86_64-${{matrix.zig_version}}.tar.xz | tar Jx --directory=zig --strip-components=1
- name: Build
run: >
zig/zig build
Expand Down

0 comments on commit 9464650

Please sign in to comment.