-
Notifications
You must be signed in to change notification settings - Fork 22
62 lines (55 loc) · 2 KB
/
build-linux.yml
File metadata and controls
62 lines (55 loc) · 2 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
name: Build Linux
on:
workflow_call:
inputs:
cc:
required: false
type: string
default: gcc
cxx:
required: false
type: string
default: g++
enable-sanitizers:
required: false
type: boolean
default: false
enable-thread-sanitizer:
required: false
type: boolean
default: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
CC: ${{ inputs.cc }}
CXX: ${{ inputs.cxx }}
steps:
- uses: actions/checkout@v5
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y libjavascriptcoregtk-4.1-dev libcurl4-openssl-dev ninja-build clang
- name: Configure CMake
run: |
cmake -B Build/ubuntu -G Ninja \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D ENABLE_SANITIZERS=${{ inputs.enable-sanitizers && 'ON' || 'OFF' }} \
-D ENABLE_THREAD_SANITIZER=${{ inputs.enable-thread-sanitizer && 'ON' || 'OFF' }} \
-D CMAKE_C_COMPILER=${{ inputs.cc }} \
-D CMAKE_CXX_COMPILER=${{ inputs.cxx }}
- name: Build
run: ninja -C Build/ubuntu
- name: Run Tests
working-directory: Build/ubuntu/Tests/UnitTests
run: ./UnitTests
env:
TSAN_OPTIONS: ${{ inputs.enable-thread-sanitizer && format('suppressions={0}/.github/tsan_suppressions.txt', github.workspace) || '' }}
# JSC's concurrent GC on Linux uses SIGUSR1 + sem_wait to suspend mutator
# threads at safepoints. TSan's signal interception delays SIGUSR1 delivery
# indefinitely, deadlocking the Collector Thread's sem_wait. Disabling the
# concurrent collector removes the dedicated Collector Thread, so GC runs
# on the mutator without cross-thread signals. macOS JSC uses Mach
# thread_suspend() and is unaffected.
JSC_useConcurrentGC: ${{ inputs.enable-thread-sanitizer && '0' || '' }}