-
-
Notifications
You must be signed in to change notification settings - Fork 30
56 lines (46 loc) · 1.87 KB
/
emcc.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
name: Emscripten
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
cc: [ emcc ]
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
# the xenial emscripten package is old (and doesn't support wasm);
# this brings in emsdk which is more recent, and does.
- uses: mymindstorm/setup-emsdk@v7
- name: dependencies
run: |
sudo apt-get update
sudo apt-get install bmake # wabt is not in xenial
# emcc -v # first run to generate ~/.emscripten only needed for system package
emcc -v # informational
curl https://wasmtime.dev/install.sh -sSf | bash # not packaged for ubuntu
# . ~/.bashrc for the paths added by wasmtime's installation does not work here
# I can't figure out why, so I'm just setting the paths by hand.
export WASMTIME_HOME="$HOME/.wasmtime"
export PATH="$WASMTIME_HOME/bin:$PATH"
wasmtime --version
- name: make
run: |
# note: lexer.h first, because parser.? depends on it
find . -name 'lexer.?' -exec touch '{}' \; # workaround for git checkout timestamps
find . -name 'parser.?' -exec touch '{}' \; # workaround for git checkout timestamps
bmake -r -j 2 DEBUG=1 PKGCONF=pkg-config CC=${{ matrix.cc }}
- name: test
# I don't want to build SID or lx just for sake of their -l test
# and wasm-validate is not packaged for xenial
run: |
export WASMTIME_HOME="$HOME/.wasmtime"
export PATH="$WASMTIME_HOME/bin:$PATH"
bmake -r -j 2 PKGCONF=pkg-config SID='true; echo sid' LX='true; echo lx' WASM_VALIDATE='true; echo wasm-validate' CC=${{ matrix.cc }} test
- uses: actions/upload-artifact@v2
with:
name: kgt-${{ github.sha }}.wasm
path: build/bin/kgt.wasm