@@ -49,62 +49,45 @@ jobs:
4949 fail-fast : false
5050 matrix :
5151 platform :
52- - description : " Ubuntu GCC"
53- cpp : g++
54- c : gcc
52+ - description : " Ubuntu GNU"
5553 os : ubuntu-latest
56- - description : " Ubuntu Clang"
57- cpp : clang++
58- c : clang
54+ toolchain : " cmake/gnu-toolchain.cmake"
55+ - description : " Ubuntu LLVM"
5956 os : ubuntu-latest
57+ toolchain : " cmake/llvm-toolchain.cmake"
58+ - description : " Windows MSVC"
59+ os : windows-latest
60+ toolchain : " cmake/msvc-toolchain.cmake"
6061 cpp_version : [17, 20, 23, 26]
6162 cmake_args :
6263 - description : " Default"
63- args : " "
6464 - description : " TSan"
65- args : " -DCMAKE_CXX_FLAGS=-fsanitize=thread "
66- - description : " ASan "
67- args : " -DCMAKE_CXX_FLAGS='-fsanitize=address -fsanitize=undefined' "
65+ args : " -DBEMAN_BUILDSYS_SANITIZER=TSan "
66+ - description : " MaxSan "
67+ args : " -DBEMAN_BUILDSYS_SANITIZER=MaxSan "
6868 include :
6969 - platform :
7070 description : " Ubuntu GCC"
71- cpp : g++
72- c : gcc
7371 os : ubuntu-latest
72+ toolchain : " cmake/gnu-toolchain.cmake"
7473 cpp_version : 17
7574 cmake_args :
7675 description : " Werror"
7776 args : " -DCMAKE_CXX_FLAGS='-Werror=all -Werror=extra'"
7877 - platform :
7978 description : " Ubuntu GCC"
80- cpp : g++
81- c : gcc
8279 os : ubuntu-latest
80+ toolchain : " cmake/gnu-toolchain.cmake"
8381 cpp_version : 17
8482 cmake_args :
8583 description : " Dynamic"
8684 args : " -DBUILD_SHARED_LIBS=on"
85+ exclude :
86+ # MSVC does not support thread sanitizer
8787 - platform :
8888 description : " Windows MSVC"
89- cpp : cl
90- c : cl
91- os : windows-latest
92- cpp_version : 17
93- cmake_args :
94- description : " Default"
95- args : " "
96- - platform :
97- description : " Windows MSVC"
98- cpp : cl
99- c : cl
100- os : windows-latest
101- cpp_version : 17
10289 cmake_args :
103- description : " ASan"
104- # Debug infomation needed to avoid cl: C5072
105- # https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-c5072?view=msvc-170
106- args : " -DCMAKE_CXX_FLAGS='/fsanitize=address /Zi'"
107-
90+ description : " TSan"
10891
10992 name : " Unit: ${{ matrix.platform.description }} ${{ matrix.cpp_version }} ${{ matrix.cmake_args.description }}"
11093 runs-on : ${{ matrix.platform.os }}
@@ -123,26 +106,13 @@ jobs:
123106 - name : Print installed softwares
124107 shell : bash
125108 run : |
126- echo "Compiler:"
127-
128- # cl does not have a --version option
129- if [ "${{ matrix.platform.cpp }}" != "cl" ]; then
130- ${{ matrix.platform.cpp }} --version
131- ${{ matrix.platform.c }} --version
132- else
133- ${{ matrix.platform.cpp }}
134- ${{ matrix.platform.c }}
135- fi
136-
137109 echo "Build system:"
138110 cmake --version
139111 ninja --version
140112 - name : Configure CMake
141113 run : |
142- cmake -B build -S . -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }} ${{ matrix.cmake_args.args }}
114+ cmake -B build -S . -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }} -DCMAKE_TOOLCHAIN_FILE="${{ matrix.platform.toolchain }}" ${{ matrix.cmake_args.args }}
143115 env :
144- CC : ${{ matrix.platform.c }}
145- CXX : ${{ matrix.platform.cpp }}
146116 CMAKE_GENERATOR : " Ninja Multi-Config"
147117 - name : Build Release
148118 run : |
0 commit comments