4949 with :
5050 fetch-depth : 1
5151
52- - name : Get build config
52+ - name : Get build config (clazy/iwyu)
53+ if : contains(fromJSON('["clazy", "iwyu"]'), inputs.tool)
5354 id : config
5455 uses : ./.github/actions/build-config
5556
@@ -69,52 +70,50 @@ jobs:
6970 with :
7071 extra-packages : iwyu clang ninja-build
7172
72- - name : Install Dependencies (sanitizers)
73- if : contains(fromJSON('["asan", "ubsan", "tsan"]'), inputs.tool)
74- uses : ./.github/actions/install-dependencies
75-
76- - name : Install Qt
73+ - name : Install Qt (clazy/iwyu)
74+ if : contains(fromJSON('["clazy", "iwyu"]'), inputs.tool)
7775 uses : ./.github/actions/qt-install
7876 with :
7977 version : ${{ steps.config.outputs.qt_version }}
8078 host : linux
8179 arch : linux_gcc_64
8280 modules : ${{ steps.config.outputs.qt_modules }}
8381
84- - name : Configure
85- working-directory : ${{ runner.temp }}/build
86- env :
87- CC : ${{ inputs.tool == 'iwyu' && 'clang' || '' }}
88- CXX : ${{ inputs.tool == 'iwyu' && 'clang++' || '' }}
89- run : |
90- CMAKE_ARGS=(
91- -S "${{ github.workspace }}"
92- -B .
93- -G Ninja
94- -DCMAKE_BUILD_TYPE=Debug
82+ - name : Build Setup (sanitizers)
83+ if : contains(fromJSON('["asan", "ubsan", "tsan"]'), inputs.tool)
84+ uses : ./.github/actions/build-setup
85+ with :
86+ qt-host : linux
87+ qt-arch : linux_gcc_64
88+ build-type : Debug
89+ save-cache : false
90+
91+ - name : Install Dependencies (sanitizers)
92+ if : contains(fromJSON('["asan", "ubsan", "tsan"]'), inputs.tool)
93+ uses : ./.github/actions/install-dependencies
94+
95+ - name : Configure (clazy/iwyu)
96+ if : contains(fromJSON('["clazy", "iwyu"]'), inputs.tool)
97+ uses : ./.github/actions/cmake-configure
98+ with :
99+ build-dir : ${{ runner.temp }}/build
100+ build-type : Debug
101+ extra-args : >-
95102 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
96- )
97-
98- if [[ "${{ contains(fromJSON('["asan", "ubsan", "tsan"]'), inputs.tool) }}" == "true" ]]; then
99- CMAKE_ARGS+=(
100- -DQGC_BUILD_TESTING=ON
101- -DQGC_ENABLE_COVERAGE=OFF
102- )
103-
104- case "${{ inputs.tool }}" in
105- asan)
106- CMAKE_ARGS+=(-DQGC_ENABLE_ASAN=ON)
107- ;;
108- ubsan)
109- CMAKE_ARGS+=(-DQGC_ENABLE_UBSAN=ON)
110- ;;
111- tsan)
112- CMAKE_ARGS+=(-DQGC_ENABLE_TSAN=ON)
113- ;;
114- esac
115- fi
103+ ${{ inputs.tool == 'iwyu' && '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++' || '' }}
116104
117- "${QT_ROOT_DIR}/bin/qt-cmake" "${CMAKE_ARGS[@]}"
105+ - name : Configure (sanitizers)
106+ if : contains(fromJSON('["asan", "ubsan", "tsan"]'), inputs.tool)
107+ uses : ./.github/actions/cmake-configure
108+ with :
109+ build-dir : ${{ runner.temp }}/build
110+ build-type : Debug
111+ testing : ' true'
112+ extra-args : >-
113+ -DQGC_ENABLE_COVERAGE=OFF
114+ ${{ inputs.tool == 'asan' && '-DQGC_ENABLE_ASAN=ON' || '' }}
115+ ${{ inputs.tool == 'ubsan' && '-DQGC_ENABLE_UBSAN=ON' || '' }}
116+ ${{ inputs.tool == 'tsan' && '-DQGC_ENABLE_TSAN=ON' || '' }}
118117
119118 - name : Build (sanitizers only)
120119 if : contains(fromJSON('["asan", "ubsan", "tsan"]'), inputs.tool)
@@ -188,14 +187,14 @@ jobs:
188187 env :
189188 ASAN_OPTIONS : ${{ inputs.tool == 'asan' && 'detect_leaks=1:halt_on_error=1:check_initialization_order=1' || '' }}
190189 LSAN_OPTIONS : ${{ inputs.tool == 'asan' && format('suppressions={0}/build/asan_suppressions.txt', runner.temp) || '' }}
191- UBSAN_OPTIONS : ${{ inputs.tool == 'ubsan' && 'print_stacktrace=1:halt_on_error=1' || '' }}
190+ UBSAN_OPTIONS : ${{ inputs.tool == 'ubsan' && format( 'print_stacktrace=1:halt_on_error=1:suppressions={0}/build/ubsan_suppressions.txt', runner.temp) || '' }}
192191 TSAN_OPTIONS : ${{ inputs.tool == 'tsan' && format('second_deadlock_stack=1:halt_on_error=1:suppressions={0}/build/tsan_suppressions.txt', runner.temp) || '' }}
193192 with :
194193 build-dir : ${{ runner.temp }}/build
195194 junit-output : junit-results-analysis-${{ inputs.tool }}.xml
196195 ctest-output : sanitizer-output.txt
197196 include-labels : ' Unit|Integration'
198- exclude-labels : ' Flaky|Network'
197+ exclude-labels : ' Flaky|Network|NoSanitizer '
199198 parallel : ' 1'
200199
201200 - name : Upload Output
0 commit comments