-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 949 Bytes
/
wasm.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
name: WASM CI
on: [push]
jobs:
wasm-build:
runs-on: ubuntu-latest
env:
BUILD_TYPE: Release
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Emscripten
run: |
sudo apt-get install git cmake
sudo apt-get install python3 pip
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git pull
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
- name: Configure CMake
run: |
source ./emsdk/emsdk_env.sh
emcmake cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: |
source ./emsdk/emsdk_env.sh
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j $(nproc)
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}