-
Notifications
You must be signed in to change notification settings - Fork 171
122 lines (106 loc) · 3.41 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: linux
on:
push:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
pull_request:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
cxx: [ g++-8, g++-10 ]
build_type: [ Debug, Release ]
std: [ 17 ]
os: [ ubuntu-20.04 ]
with_tests: [ ON ]
include:
# Build and with g++8
- cxx: g++-8
std: 17
os: ubuntu-20.04
with_tests: ON
install: sudo apt -o Acquire::Retries=5 install g++-8
- cxx: g++-13
build_type: Release
std: 23
os: ubuntu-20.04
with_tests: ON
install: sudo apt -o Acquire::Retries=5 install g++-13
- cxx: g++-13
build_type: Debug
std: 23
os: ubuntu-20.04
with_tests: ON
install: sudo apt -o Acquire::Retries=5 install g++-13
# Builds the examples with no exceptions
- cxx: g++-10
build_type: Release
std: 17
os: ubuntu-20.04
with_tests: OFF
cmake_options: -DQUILL_NO_EXCEPTIONS=ON -DQUILL_BUILD_TESTS=ON
# Build and test with valgrind
- cxx: g++-10
build_type: Release
std: 20
os: ubuntu-20.04
with_tests: ON
cmake_options: -DQUILL_USE_VALGRIND=ON
ctest_options: -T memcheck
install: sudo apt -o Acquire::Retries=5 install valgrind
# Build and test address sanitizers
- cxx: clang++-12
build_type: Release
std: 20
os: ubuntu-20.04
with_tests: ON
cmake_options: -DQUILL_SANITIZE_ADDRESS=ON
# Build and test thread sanitizers
- cxx: clang++-12
build_type: Release
std: 20
os: ubuntu-20.04
with_tests: ON
cmake_options: -DQUILL_SANITIZE_THREAD=ON
steps:
- uses: actions/checkout@v4
- name: Add repositories for newer GCC
run: |
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
if: ${{ matrix.cxx == 'g++-13' }}
- name: Create Build Environment
run: |
sudo apt-get update
${{matrix.install}}
cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
working-directory: ${{runner.workspace}}/build
env:
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.cmake_options}} \
-DCMAKE_CXX_STANDARD=${{matrix.std}} -DQUILL_BUILD_TESTS=${{matrix.with_tests}} \
-DQUILL_BUILD_EXAMPLES=ON -DQUILL_VERBOSE_MAKEFILE=ON $GITHUB_WORKSPACE
- name: Build
working-directory: ${{runner.workspace}}/build
run: |
threads=`nproc`
cmake --build . --config ${{matrix.build_type}} --parallel $threads
- name: Test
working-directory: ${{runner.workspace}}/build
run: |
threads=`nproc`
ctest --build-config ${{matrix.build_type}} ${{matrix.ctest_options}} --parallel $threads --output-on-failure
env:
CTEST_OUTPUT_ON_FAILURE: True