JS Binding: Github action #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |