-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (36 loc) · 1.24 KB
/
test-linux-emscripten.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
name: test-linux-emscripten
on: [push, pull_request]
jobs:
test-linux-emscripten:
runs-on: ubuntu-22.04
env:
BUILD_PATH: ${{ github.workspace }}/build
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes ninja-build cmake build-essential gcc emscripten nodejs
cd sclint-js
npm install
mkdir -p $BUILD_PATH/install-ext/{lib,bin}
cd $BUILD_PATH/install-ext/lib
curl -O https://www.antlr.org/download/antlr-4.11.1-complete.jar
cd $BUILD_PATH
echo '#!/bin/bash
java -Xmx500M -cp "${BUILD_PATH}/install-ext/lib/antlr-4.11.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool $@' > $BUILD_PATH/install-ext/bin/antlr4
chmod u+x $BUILD_PATH/install-ext/bin/antlr4
- name: configure
run: |
cd $BUILD_PATH
emcmake cmake -DANTLR_COMMAND_LINE=$BUILD_PATH/install-ext/bin/antlr4 ..
- name: build
run: |
cd $BUILD_PATH
cmake --build . --target=lint.js
- name: test
run: |
cd $BUILD_PATH
ctest -C Debug -T test --output-on-failure