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