-
Notifications
You must be signed in to change notification settings - Fork 152
102 lines (88 loc) · 3.04 KB
/
build-linux.yml
File metadata and controls
102 lines (88 loc) · 3.04 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
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
name: Build Linux
on:
workflow_call:
inputs:
cc:
required: true
type: string
cxx:
required: true
type: string
js-engine:
required: true
type: string
enable-sanitizers:
required: false
type: boolean
default: false
env:
CMAKE_VERSION: '3.31.6'
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:symbolize=1
ASAN_OPTIONS: abort_on_error=1
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
CC: ${{ inputs.cc }}
CXX: ${{ inputs.cxx }}
steps:
- uses: actions/checkout@v5
- uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ env.CMAKE_VERSION }}
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y libjavascriptcoregtk-4.1-dev libgl1-mesa-dev libcurl4-openssl-dev libwayland-dev clang ninja-build
- name: Build X11
run: |
cmake -G Ninja -B build/Linux \
-D JAVASCRIPTCORE_LIBRARY=/usr/lib/x86_64-linux-gnu/libjavascriptcoregtk-4.1.so \
-D NAPI_JAVASCRIPT_ENGINE=${{ inputs.js-engine }} \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D BX_CONFIG_DEBUG=ON \
-D OpenGL_GL_PREFERENCE=GLVND \
-D BABYLON_DEBUG_TRACE=ON \
-D ENABLE_SANITIZERS=${{ inputs.enable-sanitizers && 'ON' || 'OFF' }} .
ninja -C build/Linux
- name: Enable Core Dump
run: sudo sysctl -w kernel.core_pattern=core.%p
- name: Validation Tests
run: |
cd build/Linux/Apps/Playground
ulimit -c unlimited
xvfb-run ./Playground app:///Scripts/validation_native.js
- name: Unit Tests
run: |
cd build/Linux/Apps/UnitTests
ulimit -c unlimited
xvfb-run ./UnitTests
- name: Module Load Test
if: ${{ !inputs.enable-sanitizers }}
run: |
cd build/Linux/Apps/ModuleLoadTest
ulimit -c unlimited
xvfb-run ./ModuleLoadTest
- name: Upload Rendered Pictures
if: always()
uses: actions/upload-artifact@v6
with:
name: ${{ inputs.cc }}-${{ inputs.js-engine }}${{ inputs.enable-sanitizers && '-sanitizer' || '' }}-rendered-pictures
path: build/Linux/Apps/Playground/Results
- name: Upload Error Pictures
if: failure()
uses: actions/upload-artifact@v6
with:
name: ${{ inputs.cc }}-${{ inputs.js-engine }}${{ inputs.enable-sanitizers && '-sanitizer' || '' }}-error-pictures
path: build/Linux/Apps/Playground/Errors
- name: Upload Core Dumps
if: failure()
uses: actions/upload-artifact@v6
with:
name: ${{ inputs.cc }}-${{ inputs.js-engine }}${{ inputs.enable-sanitizers && '-sanitizer' || '' }}-core-dumps
path: |
build/Linux/Apps/Playground/Playground
build/Linux/Apps/Playground/core.*
build/Linux/Apps/UnitTests/UnitTests
build/Linux/Apps/UnitTests/core.*