-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.3 KB
/
build_cmake.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
name: CMake Build Matrix
on: [push, pull_request]
jobs:
build_and_test:
name: "${{ matrix.compiler }} / ${{ matrix.buildType }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler:
- gcc-11
- gcc-12
- llvm-14
- llvm-15
buildType:
- Release
- RelWithDebug
- Debug
- Asan
- AsanDebug
- Tsan
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -yq libgtest-dev libgmock-dev libbenchmark-dev cmake ninja-build
- name: Setup Compiler
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
cmake: true
ninja: true
- name: Configure
run: |
if [ -d "build" ]; then rm -rf ./build; fi
mkdir -p build
cd build
cmake -GNinja ../ -DCMAKE_VERBOSE_MAKEFILE=ON -DCXXITER_WITH_TESTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.buildType }}
- name: Build
run: |
cd build/
cmake --build .
- name: Test
run: |
cd build/
export ASAN_OPTIONS=detect_leaks=0
export TSAN_OPTIONS=ignore_noninstrumented_modules=1
ctest -j4 --output-on-failure