Repository navigation
107 lines (92 loc) · 2.97 KB
/
Copy pathtest-wasm.yml
File metadata and controls
107 lines (92 loc) · 2.97 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Build WebAssembly package and test it in cockle and JupyterLite terminal deployments
name: Test WebAssembly
on:
workflow_dispatch:
pull_request:
types: [labeled, synchronize, reopened]
jobs:
build:
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event.action == 'labeled' && github.event.label.name == 'run-wasm-ci') ||
(github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'run-wasm-ci'))
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-build
cancel-in-progress: true
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: '3.14'
- name: Install mamba
uses: mamba-org/setup-micromamba@v3
with:
environment-file: wasm/wasm-environment.yml
cache-environment: true
- name: Build
shell: bash -l {0}
working-directory: wasm
run: |
cmake .
make build
- name: Upload artifact containing emscripten-forge package
uses: actions/upload-pages-artifact@v5
with:
path: ./wasm/recipe/em-forge-recipes/output/
# Tar the wasm directory (except the emscripten-forge recipes checkout) to preserve
# symlinks in node_modules, for use in the test jobs.
- name: Archive wasm build
run: |
tar -czf wasm-build.tar.gz --exclude=wasm/recipe/em-forge-recipes wasm
- name: Upload artifact containing wasm build
uses: actions/upload-artifact@v7
with:
name: wasm-build
path: wasm-build.tar.gz
retention-days: 1
test:
needs: build
strategy:
fail-fast: false
matrix:
target: [test-cockle, test-lite]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.target }}
cancel-in-progress: true
runs-on: ubuntu-latest
timeout-minutes: 60
name: ${{ matrix.target }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: '3.14'
- name: Install mamba
uses: mamba-org/setup-micromamba@v3
with:
environment-file: wasm/wasm-environment.yml
cache-environment: true
- name: Download artifact containing wasm build
uses: actions/download-artifact@v8
with:
name: wasm-build
- name: Extract wasm build
run: |
tar -xzf wasm-build.tar.gz
- name: Install playwright chromium
shell: bash -l {0}
run: |
playwright install chromium
- name: Run WebAssembly tests
shell: bash -l {0}
working-directory: wasm
env:
GIT2CPP_TEST_PRIVATE_TOKEN: ${{ secrets.GIT2CPP_TEST_PRIVATE_TOKEN }}
run: |
make ${{ matrix.target }}