v2 / .github / workflows / wasm_backend_ci.yml
85 lines · 76 sloc · 2.24 KB · d444f9c25dea51ee70d1a8ec896b34484370e791
Raw
1name: wasm backend CI
2
3on:
4 push:
5 paths:
6 - 'cmd/tools/builders/**.v'
7 - 'vlib/builtin/**.v'
8 - 'vlib/v/ast/**.v'
9 - 'vlib/v/scanner/**.v'
10 - 'vlib/v/parser/**.v'
11 - 'vlib/v/checker/**.v'
12 - 'vlib/v/gen/c/**.v'
13 - 'vlib/v/builder/**.v'
14 - 'vlib/v/cflag/**.v'
15 - 'vlib/v/live/**.v'
16 - 'vlib/v/util/**.v'
17 - 'vlib/v/markused/**.v'
18 - 'vlib/v/preludes/**.v'
19 - 'vlib/v/gen/wasm/**.v'
20 - 'vlib/v/gen/wasm/tests/**.v'
21 - 'vlib/v/gen/wasm/tests/**.vv'
22 - 'vlib/v/gen/wasm/tests_decompile/**.v'
23 - 'vlib/v/gen/wasm/tests_decompile/**.vv'
24 - '**/wasm_backend_ci.yml'
25 pull_request:
26 paths:
27 - 'cmd/tools/builders/**.v'
28 - 'vlib/builtin/**.v'
29 - 'vlib/v/ast/**.v'
30 - 'vlib/v/scanner/**.v'
31 - 'vlib/v/parser/**.v'
32 - 'vlib/v/checker/**.v'
33 - 'vlib/v/gen/c/**.v'
34 - 'vlib/v/builder/**.v'
35 - 'vlib/v/cflag/**.v'
36 - 'vlib/v/live/**.v'
37 - 'vlib/v/util/**.v'
38 - 'vlib/v/markused/**.v'
39 - 'vlib/v/preludes/**.v'
40 - 'vlib/v/gen/wasm/**.v'
41 - 'vlib/v/gen/wasm/tests/**.v'
42 - 'vlib/v/gen/wasm/tests/**.vv'
43 - 'vlib/v/gen/wasm/tests_decompile/**.v'
44 - 'vlib/v/gen/wasm/tests_decompile/**.vv'
45 - '**/wasm_backend_ci.yml'
46
47concurrency:
48 group: wasm-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
49 cancel-in-progress: true
50
51jobs:
52 wasm-backend:
53 runs-on: ${{ matrix.os }}
54 strategy:
55 matrix:
56 os: [ubuntu-22.04, windows-2022]
57 fail-fast: false
58 timeout-minutes: 20
59 env:
60 VTEST_ONLY: wasm
61 steps:
62 - uses: actions/checkout@v6
63
64 - name: Build V
65 if: runner.os != 'Windows'
66 run: make -j4
67 - name: Build V (Windows)
68 if: runner.os == 'Windows'
69 run: ./makev.bat
70
71 - name: Install WABT to get wasm-decompile
72 if: runner.os != 'Windows'
73 run: ./v retry -- sudo apt install wabt
74
75 - name: Setup Wasmer
76 uses: wasmerio/[email protected]
77
78 - name: Prebuild the WASM backend
79 run: ./v cmd/tools/builders/wasm_builder.v
80
81 - name: Test the WASM backend
82 run: ./v test vlib/v/gen/wasm/
83
84 - name: Build examples
85 run: ./v build-examples
86