-
Notifications
You must be signed in to change notification settings - Fork 7
113 lines (95 loc) · 3.09 KB
/
ci-code_analysis-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
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
# Leka - LekaOS
# Copyright 2022 APF France handicap
# SPDX-License-Identifier: Apache-2.0
name: Code Analysis - Sanitizers
on:
push:
branches:
- main
- develop
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run_sanitizers:
name: Build & run
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
optimisation_level: "-Og"
compiler:
name: GCC 10
cc: /usr/bin/gcc-10
cxx: /usr/bin/g++-10
- os: ubuntu-22.04
optimisation_level: "-Os"
compiler:
name: GCC 10
cc: /usr/bin/gcc-10
cxx: /usr/bin/g++-10
- os: ubuntu-24.04
optimisation_level: "-Og"
compiler:
name: Clang 18
cc: /usr/bin/clang-18
cxx: /usr/bin/clang++-18
- os: ubuntu-24.04
optimisation_level: "-Os"
compiler:
name: Clang 18
cc: /usr/bin/clang-18
cxx: /usr/bin/clang++-18
- os: ubuntu-24.04
optimisation_level: "-Og"
compiler:
name: GCC 13
cc: /usr/bin/gcc-13
cxx: /usr/bin/g++-13
- os: ubuntu-24.04
optimisation_level: "-Os"
compiler:
name: GCC 13
cc: /usr/bin/gcc-13
cxx: /usr/bin/g++-13
steps:
- uses: actions/checkout@v4
- name: Set CC & CXX env
id: set_cc_cxx_env
shell: bash
run: |
${{ matrix.compiler.cc }} --version
${{ matrix.compiler.cxx }} --version
echo "CC=${{ matrix.compiler.cc }}" >> $GITHUB_ENV
echo "CXX=${{ matrix.compiler.cxx }}" >> $GITHUB_ENV
- name: Setup CI
uses: ./.github/actions/setup
with:
ccache_key: ${{ runner.os }}-ccache-code_analysis-sanitizers-(${{ matrix.compiler.name }})-(${{ matrix.optimisation_level }})
ccache_restore_keys: |
${{ runner.os }}-ccache-code_analysis-sanitizers-(${{ matrix.compiler.name }})-(${{ matrix.optimisation_level }})-
${{ runner.os }}-ccache-code_analysis-sanitizers-(${{ matrix.compiler.name }})-
${{ runner.os }}-ccache-code_analysis-sanitizers-
${{ runner.os }}-ccache-code_analysis-
${{ runner.os }}-ccache-
#
# Mark: - Config, build & run unit tests
#
- name: Ccache pre build
run: |
make ccache_prebuild
- name: Config, build & run
run: |
export ASAN_OPTIONS=detect_leaks=1
export UBSAN_OPTIONS=print_stacktrace=1
make config_unit_tests COVERAGE=ON SANITIZERS=ON CI_UT_OPTIMIZATION_LEVEL="${{ matrix.optimisation_level }}"
make unit_tests
- name: Ccache post build
run: |
make ccache_postbuild
cat ${{ env.CCACHE_LOGFILE }} || True
ccache -z