Skip to content

Commit

Permalink
GH Actions: Use korandoru/setup-zig for zig workflows
Browse files Browse the repository at this point in the history
PR #636 (bdwgc).
  • Loading branch information
kassane authored and ivmai committed Apr 24, 2024
1 parent 0ca8be5 commit b4e4fee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/zig-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,12 @@ jobs:

steps:
- uses: actions/checkout@v4
- 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
- uses: korandoru/setup-zig@v1
with:
zig-version: ${{ matrix.zig_version }}
- name: Build
run: >
zig/zig build
zig build
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs }}
-Ddisable_handle_fork=${{ matrix.disable_handle_fork }}
-Denable_gc_assertions=${{ matrix.gc_assertions }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/zig-cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: "Install zig"
run: |
mkdir zig && curl https://ziglang.org/builds/zig-linux-x86_64-${{matrix.zig_version}}.tar.xz | tar Jx --directory=zig --strip-components=1
- uses: korandoru/setup-zig@v1
with:
zig-version: ${{ matrix.zig_version }}
- name: Build
run: >
zig/zig build -Dtarget=${{ matrix.ttriple }}
zig build -Dtarget=${{ matrix.ttriple }}
-DBUILD_SHARED_LIBS=${{ matrix.shared_libs }}
-DCFLAGS_EXTRA="${{ matrix.cflags_extra }}"
-Denable_threads=${{ matrix.enable_threads }}
Expand Down

0 comments on commit b4e4fee

Please sign in to comment.