-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (86 loc) · 2.9 KB
/
linux.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: linux
on:
pull_request:
types: [opened, synchronize]
branches:
- "*"
# Allow manual trigger for this workflow.
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: linux
defaults:
run:
shell: "bash -el {0}"
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
# Native build steps:
- name: Add repositories for GCC
run: sudo apt-add-repository ppa:ubuntu-toolchain-r/test
- name: Install GCC
run: |
sudo apt update
sudo apt install g++-13 cmake ninja-build
- name: Create build directory
run: cmake -E make_directory ${{runner.workspace}}/build-native
- name: Configure native build
env:
CC: gcc-13
CXX: g++-13
working-directory: ${{runner.workspace}}/build-native
run: |
cmake ${{github.workspace}} -DCMAKE_BUILD_TYPE=RelWithDebInfo -Wno-deprecated -G Ninja
- name: Run native build
working-directory: ${{runner.workspace}}/build-native
run: |
threads=`nproc`
cmake --build . --config RelWithDebInfo --parallel $threads
- name: Run CTest
working-directory: ${{runner.workspace}}/build-native
run: ctest --output-on-failure
# Emscripten build steps:
- name: Install emscripten
working-directory: ${{runner.temp}}
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git checkout 3.1.70
./emsdk install latest
./emsdk activate latest
- name: Create emscripten build directory
run: cmake -E make_directory ${{runner.workspace}}/build-emscripten
- name: Configure emscripten build
working-directory: ${{runner.workspace}}/build-emscripten
run: |
source ${{runner.temp}}/emsdk/emsdk_env.sh
emcmake cmake ${{github.workspace}} -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_EMSCRIPTEN=ON
- name: Run emscripten build
working-directory: ${{runner.workspace}}/build-emscripten
run: |
threads=`nproc`
source ${{runner.temp}}/emsdk/emsdk_env.sh
emmake make -j $threads
# Node build steps:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install node packages
working-directory: ${{github.workspace}}/viz
run: npm ci
- name: Run npm build
working-directory: ${{github.workspace}}/viz
run: npm run build -- --mode production
# Pre-commit steps.
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pre-commit
run: python -m pip install pre-commit
- name: Pre-commit checks
working-directory: ${{github.workspace}}
run: pre-commit run --all-files