-
Notifications
You must be signed in to change notification settings - Fork 11
84 lines (83 loc) · 2.7 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: build and run tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
linux-docker:
# All of these shall depend on the formatting check (needs: check-formatting)
runs-on: ubuntu-22.04
# The GH default is 360 minutes (it's also the max as of Feb-2021). However,
# we should fail sooner. The only reason to exceed this time is if a test
# hangs.
timeout-minutes: 120
strategy:
# Enabling fail-fast would kill all Dockers if one of them fails. We want
# maximum output.
fail-fast: false
matrix:
# For every distro we want to test here, add one key 'distro' with a
# descriptive name, and one key 'containerid' with the name of the
# container (i.e., what you want to docker-pull)
distro:
- name: 'Ubuntu 24.04'
containerid: 'ghcr.io/fair-acc/gr4-build-container:latest'
cxxflags: -Werror
compiler:
- name: "emscripten"
command: "emcc"
name: ${{ matrix.distro.name }} - ${{ matrix.compiler.name }}
container:
image: ${{ matrix.distro.containerid }}
volumes:
- build_data:/build
options: --cpus 2
steps:
- uses: actions/checkout@v3
name: Checkout Project
- name: Install emscripten
run: |
DEBIAN_FRONTEND=noninteractive apt-get install -qy bzip2
cd
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
# Download and install the latest SDK tools.
./emsdk install latest
# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate latest
# - name: Install emscripten
# run: |
# pwd
# echo
# ls ${{ github.workspace }}
# echo
# ls .
# echo
# ls emsdk
- name: Configure Meson
shell: bash
working-directory: ${{ github.workspace }}
run: |
source ~/emsdk/emsdk_env.sh
tee emscripten-toolchain.ini <<EOF >/dev/null
[constants]
toolchain = '$HOME/emsdk/${{ env.EM_CACHE_FOLDER }}/upstream/emscripten/'
EOF
meson setup build --cross-file emscripten-toolchain.ini --cross-file emscripten-build.ini -Denable_python=false -Denable_testing=false
- name: Make
working-directory: ${{ github.workspace }}/build
run: 'ninja'
- name: Run Test File
shell: bash
working-directory: ${{ github.workspace }}/build
run: |
source ~/emsdk/emsdk_env.sh
${EMSDK_NODE} bench/bm_pmt_dict_ref.js
- uses: actions/upload-artifact@v3
if: failure()
with:
name: Linux_Meson_Testlog
path: build/meson-logs/testlog.txt