-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (54 loc) · 1.77 KB
/
Copy pathwasm-tests.yml
File metadata and controls
64 lines (54 loc) · 1.77 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Run headless browser WASM tests on every push to main (charset, canvas, terminal, tutorial).
name: WASM browser tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
wasm-playwright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Emscripten (emsdk)
run: |
sudo apt-get update
sudo apt-get install -y python3 git
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$GITHUB_WORKSPACE/emsdk"
cd "$GITHUB_WORKSPACE/emsdk"
./emsdk install latest
./emsdk activate latest
- name: Build native interpreter + gfx_video_test
run: |
set -e
make
make gfx_video_test
- name: Run native regression tests (.bas + gfx_peek)
run: |
set -e
./gfx_video_test
for t in tests/if_inside_ident_normalize.bas tests/if_skip_inline_nested.bas; do
echo "Running $t"
./basic -petscii "$t" >/dev/null
done
- name: Build WASM targets
run: |
source "$GITHUB_WORKSPACE/emsdk/emsdk_env.sh"
emcc --version
make basic-wasm basic-wasm-modular basic-wasm-canvas
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Playwright
run: |
pip install -r tests/requirements-wasm.txt
python -m playwright install chromium --with-deps
- name: Run WASM browser tests
run: |
python3 tests/wasm_browser_test.py
python3 tests/wasm_browser_canvas_test.py
python3 tests/wasm_canvas_charset_test.py
python3 tests/wasm_tutorial_embed_test.py