Skip to content

Commit 039a3fe

Browse files
committed
CI: use mlugg/setup-zig
1 parent b72f0e1 commit 039a3fe

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@v2
2626
- name: Setup Zig
27-
run: |
28-
sudo apt install xz-utils
29-
sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-linux-x86_64-0.13.0-dev.351+64ef45eb0.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
27+
uses: mlugg/setup-zig@v1
28+
with:
29+
version: 2024.5.0-mach
30+
mirror: 'https://pkg.machengine.org/zig'
3031
# - name: x86_64-linux -> x86_64-linux-musl
3132
# run: zig build -Dtarget=x86_64-linux-musl
3233
- name: x86_64-linux -> x86_64-macos
@@ -70,12 +71,10 @@ jobs:
7071
- name: Checkout
7172
uses: actions/checkout@v2
7273
- name: Setup Zig
73-
run: |
74-
$ProgressPreference = 'SilentlyContinue'
75-
Invoke-WebRequest -Uri 'https://pkg.machengine.org/zig/zig-windows-x86_64-0.13.0-dev.351+64ef45eb0.zip' -OutFile 'C:\zig.zip'
76-
cd C:\
77-
7z x zig.zip
78-
Add-Content $env:GITHUB_PATH 'C:\zig-windows-x86_64-0.13.0-dev.351+64ef45eb0\'
74+
uses: mlugg/setup-zig@v1
75+
with:
76+
version: 2024.5.0-mach
77+
mirror: 'https://pkg.machengine.org/zig'
7978
- name: test
8079
run: zig build test
8180
x86_64-macos:
@@ -87,9 +86,11 @@ jobs:
8786
- name: Checkout
8887
uses: actions/checkout@v2
8988
- name: Setup Zig
90-
run: |
91-
brew uninstall --ignore-dependencies libx11 # https://github.com/ziglang/zig/issues/11066
92-
brew install xz
93-
sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-macos-x86_64-0.13.0-dev.351+64ef45eb0.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin'
89+
uses: mlugg/setup-zig@v1
90+
with:
91+
version: 2024.5.0-mach
92+
mirror: 'https://pkg.machengine.org/zig'
93+
- name: Workaround Zig Bug
94+
run: brew uninstall --ignore-dependencies libx11 # https://github.com/ziglang/zig/issues/11066
9495
- name: test
9596
run: zig build test

0 commit comments

Comments
 (0)