-
-
Notifications
You must be signed in to change notification settings - Fork 59
65 lines (53 loc) · 1.92 KB
/
sanitizers.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
name: Sanitizers
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
type: [Debug, RelWithDebInfo, MinSizeRel, Release]
sanitizer: [address, memory, undefined]
exclude:
- {os: "macOS-latest", sanitizer: "memory"}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Setup dependencies
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get install -y clang
- name: Configure CMake (macOS)
shell: bash
if: startsWith(matrix.os, 'macOS')
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DUTEST_USE_SANITIZER=${{ matrix.sanitizer }}
- name: Configure CMake with Clang (Ubuntu)
shell: bash
if: startsWith(matrix.os, 'ubuntu')
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUTEST_USE_SANITIZER=${{ matrix.sanitizer }}
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config ${{ matrix.type }}
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: ./utest_test
- name: Test Whole Program Optimization
working-directory: ${{github.workspace}}/build
shell: bash
run: ./utest_test_wpo
- name: Test with random order
working-directory: ${{github.workspace}}/build
shell: bash
run: ./utest_test --random-order
- name: Test with random order and seed
working-directory: ${{github.workspace}}/build
shell: bash
run: ./utest_test --random-order=42