forked from Z3Prover/z3
-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (49 loc) · 1.37 KB
/
js-binding.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
name: JS Binding (build-&-test)
on:
push:
branches:
- master
- devel
pull_request:
branches:
- master
- devel
# allows to run the action from GitHub UI
workflow_dispatch:
jobs:
ubuntu-build:
name: JS Binding Ubuntu
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.73
actions-cache-folder: 'emsdk-cache'
- name: Clone Mata
uses: GuillaumeFalourd/[email protected]
with:
owner: 'VeriFIT'
repository: 'mata'
branch: devel
depth: 1
- name: Install Mata
run: |
cd mata
mkdir build && cd build
emcmake cmake -DCMAKE_BUILD_TYPE=Release -DMATA_BUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=OFF ..
emmake make install
- name: Compile JS Binding for Z3-Noodler
run: |
mkdir build
cd src/api/js
sed -i "s|REPLACE THIS TEXT WITH THE PATH TO libmata.a|${EMSDK}/upstream/emscripten/cache/sysroot/lib/libmata.a|g" scripts/build-wasm.ts
npm install
npm run build:ts
npm run build:wasm
- name: Test JS Binding
run: |
cd src/api/js
npm test