Skip to content

JS Binding: Github action #15

JS Binding: Github action

JS Binding: Github action #15

Workflow file for this run

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