Repository navigation
46 lines (38 loc) · 1.42 KB
/
Copy pathmain.yml
File metadata and controls
46 lines (38 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: CI
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: master
- name: Run zig fmt
if: matrix.os == 'ubuntu-latest'
run: zig fmt --check .
- name: Run zig build check test
run: zig build check test --summary all
- name: Setup wasmtime
if: matrix.os == 'ubuntu-latest'
run: |
WASMTIME_VERSION=v50.0.2
wget https://github.com/bytecodealliance/wasmtime/releases/download/${WASMTIME_VERSION}/wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz
echo "5db0ca8e838ab95a51ba9acdf11f42888bcd0092dda45a86129ae540c4fa952c wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz" | sha256sum --check
tar -xf wasmtime-${WASMTIME_VERSION}-x86_64-linux.tar.xz
echo "${PWD}/wasmtime-${WASMTIME_VERSION}-x86_64-linux" >> $GITHUB_PATH
- name: Run zig build check test -Dtarget=wasm32-wasi
if: matrix.os == 'ubuntu-latest'
run: zig build check test -Dtarget=wasm32-wasi -fwasmtime --summary all