-
Notifications
You must be signed in to change notification settings - Fork 7
76 lines (64 loc) · 2.18 KB
/
build-and-test.yml
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
name: 'Build And Test'
on: [push, pull_request]
jobs:
Build-And-Test:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3 # checkout the repo
with:
submodules: recursive
- uses: mymindstorm/setup-emsdk@v11 # setup emscripten
- uses: actions/setup-python@v4 # setup python
with:
python-version: '3.10'
- uses: BSFishy/pip-action@v1 # install python packages
with:
packages: |
meson
ninja
- name: Write em.txt # write em.txt
uses: "DamianReeves/write-file-action@master"
with:
path: libultrahdr-wasm/em.txt
write-mode: overwrite
contents: |
[binaries]
c = 'emcc'
cpp = 'em++'
ar = 'emar'
nm = 'emnm'
[host_machine]
system = 'emscripten'
cpu_family = 'wasm32'
cpu = 'wasm32'
endian = 'little'
- name: 'Build libultrahdr' # build WASM
run: |
cd libultrahdr-wasm
meson setup build --cross-file=em.txt
meson compile -C build
- uses: actions/setup-node@v3 # setup node
with:
node-version: 18
- run: npm ci # install packages
- run: npm run build # build
- name: 'Produce Reports' # produce reports
run: npm run ci:check
continue-on-error: true
- name: 'Run tests' # run tests
run: npm run ci:test
continue-on-error: true
- uses: actions/upload-artifact@v3 # upload build artifacts
if: success() || failure()
with:
name: build-artifact
if-no-files-found: error
path: |
libultrahdr-wasm/build/*.ts
libultrahdr-wasm/build/*.js
libultrahdr-wasm/build/*.map
libultrahdr-wasm/build/*.wasm
dist/
reports/