forked from jbaldwin/libcoro
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (56 loc) · 2.07 KB
/
ci-emscripten.yml
File metadata and controls
58 lines (56 loc) · 2.07 KB
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
58
name: ci-emscripten
on: [pull_request, workflow_dispatch]
jobs:
ci-emscripten-3_1_45:
name: emscripten-3_1_45
runs-on: ubuntu-latest
container:
image: ubuntu:22.04
env:
TZ: America/New_York
DEBIAN_FRONTEND: noninteractive
steps:
- name: Install Dependencies
run: |
apt-get update
apt-get -y upgrade
apt install -y build-essential software-properties-common
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get install -y \
cmake \
git \
ninja-build \
nodejs
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true
- name: Mark repository as safe
run: git config --global --add safe.directory "*"
# Must be done after checkout since it requires the directory structure to be in place.
- name: Install emsdk
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 3.1.45
./emsdk activate 3.1.45
- name: Build
run: |
cd emsdk
. ./emsdk_env.sh
cd ..
mkdir Release
cd Release
emcmake cmake \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
..
cmake --build . --config Release
- name: Test
run: |
cd emsdk
. ./emsdk_env.sh
cd ../Release
node --experimental-wasm-threads --experimental-wasm-bulk-memory ./test/libcoro_test.js