-
Notifications
You must be signed in to change notification settings - Fork 43
166 lines (159 loc) · 5.09 KB
/
build.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Build
on:
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: pre-commit/[email protected]
gcc:
name: GCC
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- gcc: "4.6"
- gcc: "4.7"
- gcc: "4.8"
- gcc: "4.9"
- gcc: "5"
- gcc: "6"
- gcc: "7"
cxxflags: -fsanitize=leak -fno-sanitize-recover=all
- gcc: "8"
cxxflags: -fsanitize=undefined -fno-sanitize-recover=all
- gcc: "9"
cxxflags: -fsanitize=address -fno-sanitize-recover=all
- gcc: "10"
- gcc: "11"
steps:
- name: Install
run: |
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic universe'
sudo apt-get update
sudo apt-get install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
env:
CC: gcc-${{ matrix.gcc }}
CXX: g++-${{ matrix.gcc }}
CXXFLAGS: ${{ matrix.cxxflags }}
- name: Build
run: cmake --build .
- name: Test
run: ctest --output-on-failure -V -C Debug .
env:
UBSAN_OPTIONS: print_stacktrace=1
clang:
name: Clang
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- clang: "3.5"
cxxflags: "-stdlib=libc++"
- clang: "3.6"
cxxflags: "-stdlib=libc++"
- clang: "3.7"
cxxflags: "-stdlib=libc++"
- clang: "3.8"
cxxflags: "-stdlib=libc++"
- clang: "3.9"
cxxflags: "-stdlib=libc++"
- clang: "4.0"
cxxflags: "-stdlib=libc++"
- clang: "5.0"
- clang: "6.0"
- clang: "7"
- clang: "8"
cxxflags: -fsanitize=leak -fno-sanitize-recover=all
- clang: "9"
cxxflags: -fsanitize=undefined -fno-sanitize-recover=all
- clang: "10"
cxxflags: -fsanitize=address -fno-sanitize-recover=all
steps:
- name: Install
run: |
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ xenial universe'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic main'
sudo add-apt-repository -yn 'deb http://archive.ubuntu.com/ubuntu/ bionic universe'
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.clang }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
env:
CC: clang-${{ matrix.clang }}
CXX: clang++-${{ matrix.clang }}
CXXFLAGS: >-
${{ matrix.cxxflags }}
${{ contains(matrix.cxxflags, 'libc++') && '-I/usr/lib/llvm-10/include/c++/v1/' || '' }}
- name: Build
run: cmake --build .
- name: Test
run: ctest --output-on-failure -V -C Debug .
env:
UBSAN_OPTIONS: print_stacktrace=1
xcode:
name: XCode
needs: clang
runs-on: macos-14
strategy:
fail-fast: false
matrix:
include:
- xcode: "16.1"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Select XCode version
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
- name: Build
run: cmake --build .
- name: Test
run: ctest --output-on-failure -V -C Debug .
msvc:
name: Visual Studio
strategy:
fail-fast: false
matrix:
include:
- os: windows-2016
- os: windows-2019
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=Debug .
- name: Build
run: cmake --build .
- name: Test
run: ctest --output-on-failure -V -C Debug .