Skip to content

Commit e0b0be8

Browse files
CI: add an ASan step and split the small-build from test runs
The static builds with -Os or -Oz are there only so we get the library size in the output. For testing, let's compile as a shared library and properly in debug mode. For Linux, we've had Valgrind. For macOS, this is now an ASan build. Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>
1 parent cb58547 commit e0b0be8

1 file changed

Lines changed: 29 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,53 @@ jobs:
3737
cmakeflags: >-
3838
-DCMAKE_C_FLAGS="-Os -Werror"
3939
-DWITH_FREESTANDING=ON
40+
- name: gcc-small
41+
cmakeflags: >-
42+
-DBUILD_TESTING=OFF
43+
-DCMAKE_C_FLAGS="-Os -Werror"
44+
- name: clang-small
45+
cmakeflags: >-
46+
-DBUILD_TESTING=OFF
47+
-DCMAKE_C_COMPILER=clang
48+
-DCMAKE_C_FLAGS="-Oz -g -Werror"
4049
- name: clang
4150
cmakeflags: >-
4251
-DBUILD_SHARED_LIBS=ON
52+
-DCMAKE_BUILD_TYPE=Debug
4353
-DCMAKE_C_COMPILER=clang
44-
-DCMAKE_C_FLAGS="-Oz -g -Werror"
54+
-DCMAKE_C_FLAGS_DEBUG="-Werror"
4555
-DCMAKE_CXX_COMPILER=clang++
46-
-DCMAKE_CXX_FLAGS="-O2 -g -Werror"
56+
-DCMAKE_CXX_FLAGS_DEBUG="-Werror"
4757
- name: linux-g++
4858
cmakeflags: >-
4959
-DBUILD_SHARED_LIBS=ON
60+
-DCMAKE_BUILD_TYPE=Debug
5061
-DCMAKE_C_COMPILER=gcc
51-
-DCMAKE_C_FLAGS="-Os -g -Werror"
62+
-DCMAKE_C_FLAGS_DEBUG="-Werror"
5263
-DCMAKE_CXX_COMPILER=g++
53-
-DCMAKE_CXX_FLAGS="-O2 -g -Werror"
64+
-DCMAKE_CXX_FLAGS_DEBUG="-Werror"
5465
include:
5566
- os: macos-13
5667
build_cfg:
57-
name: clang
68+
name: clang-small
5869
cmakeflags: >-
70+
-DBUILD_TESTING=OFF
5971
-DCMAKE_C_COMPILER=clang
6072
-DCMAKE_C_FLAGS="-Oz -g -Werror"
6173
-DCMAKE_CXX_COMPILER=clang++
6274
-DCMAKE_CXX_FLAGS="-O2 -g -Werror"
75+
- os: macos-13
76+
build_cfg:
77+
name: clang
78+
cmakeflags: >-
79+
-DBUILD_SHARED_LIBS=ON
80+
-DCMAKE_BUILD_TYPE=Debug
81+
-DCMAKE_C_COMPILER=clang
82+
-DCMAKE_C_FLAGS_DEBUG="-Werror -fsanitize=address"
83+
-DCMAKE_CXX_COMPILER=clang++
84+
-DCMAKE_CXX_FLAGS_DEBUG="-Werror -fsanitize=address"
85+
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address"
86+
-DCMAKE_MODULE_LINKER_FLAGS="-fsanitize=address"
6387
6488
6589
# Default job name is too long to be visible in the "Checks" tab.

0 commit comments

Comments
 (0)