Skip to content

Commit 1236c66

Browse files
committed
.github/workflows/ci.yml: exercise 'zig build test'.
1 parent cffed46 commit 1236c66

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,3 +268,28 @@ jobs:
268268
dotnet run -c Release
269269
fi
270270
fi
271+
272+
- uses: actions/cache@v4
273+
with:
274+
path: |
275+
~/.cache/zig
276+
~/zig-x86_64-linux-*
277+
~/.wasmtime
278+
key: ${{ runner.os }}-zig-github
279+
280+
- name: Zig
281+
run: |
282+
ver=0.15.2
283+
base_dir=zig-x86_64-linux-$ver
284+
if [ ! -d ~/$base_dir ]; then
285+
curl -sSf https://ziglang.org/download/$ver/$base_dir.tar.xz | unxz -c | tar xf - --directory ~
286+
fi
287+
if [ -x ~/$base_dir/zig ]; then
288+
PATH=~/$base_dir:$PATH
289+
zig build test --summary new
290+
if [ ! -d ~/.wasmtime ]; then
291+
curl https://wasmtime.dev/install.sh -sSf | bash
292+
fi
293+
PATH=~/.wasmtime/bin:$PATH
294+
zig build test -Dtarget=wasm32-wasi -fwasmtime --summary new
295+
fi

0 commit comments

Comments
 (0)