Skip to content

Commit 791b37a

Browse files
committed
Remove clang-tidy from GCC builds in Linux actions
1 parent ebc02d1 commit 791b37a

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/build_linux.yml

+13-10
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,17 @@ jobs:
146146
147147
- name: Build Zserio C++ runtime (Debug Build)
148148
run: |
149-
if [ -f "`which clang-tidy-14`" ] ; then
150-
export CLANG_TIDY_BIN=clang-tidy-14
151-
fi
152149
# gcovr works only for default gcc version
153150
if [[ `gcc --version` == *" ${{matrix.gcc-version}}."* ]] ; then
154151
export GCOVR_BIN="gcovr"
155152
fi
156153
# sanitizers do not work on cpp_rt-linux32-clang when cross-compiling
157-
scripts/build.sh cpp_rt-linux64-gcc cpp_rt-linux32-gcc cpp_rt-linux64-clang
154+
scripts/build.sh cpp_rt-linux64-gcc cpp_rt-linux32-gcc
155+
156+
if [ -f "`which clang-tidy-14`" ] ; then
157+
export CLANG_TIDY_BIN=clang-tidy-14
158+
fi
159+
scripts/build.sh cpp_rt-linux64-clang
158160
env:
159161
CMAKE_EXTRA_ARGS: "-DZSERIO_ENABLE_WERROR=1 -DCMAKE_BUILD_TYPE=Debug"
160162
LLVM_PROFDATA_BIN: "llvm-profdata-${{matrix.clang-version}}"
@@ -174,10 +176,11 @@ jobs:
174176
- name: Run Zserio C++ tests (Debug Build)
175177
# sanitizers do not work on cpp-linux32-clang when cross-compiling
176178
run: |
179+
scripts/test.sh cpp-linux32-gcc cpp-linux64-gcc
177180
if [ -f "`which clang-tidy-14`" ] ; then
178181
export CLANG_TIDY_BIN=clang-tidy-14
179182
fi
180-
scripts/test.sh cpp-linux32-gcc cpp-linux64-gcc cpp-linux64-clang
183+
scripts/test.sh cpp-linux64-clang
181184
env:
182185
CMAKE_EXTRA_ARGS: "-DZSERIO_ENABLE_WERROR=1 -DCMAKE_BUILD_TYPE=Debug"
183186
SANITIZERS_ENABLED: 1
@@ -205,14 +208,14 @@ jobs:
205208
# sanitizers do not work on cpp-linux32-clang when cross-compiling
206209
# -DZSERIO_ENABLE_WERROR=1 fails for gcc because of false positive warning
207210
run: |
208-
if [ -f "`which clang-tidy-14`" ] ; then
209-
export CLANG_TIDY_BIN=clang-tidy-14
210-
fi
211211
# -withRangeCheckCode -withValidationCode conflicts with -withoutWriterCode
212212
export ZSERIO_EXTRA_ARGS="-withTypeInfoCode -withCodeComments \
213213
-setCppAllocator polymorphic -withReflectionCode"
214-
scripts/test.sh -p -i arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc \
215-
cpp-linux64-clang
214+
scripts/test.sh -p -i arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc
215+
if [ -f "`which clang-tidy-14`" ] ; then
216+
export CLANG_TIDY_BIN=clang-tidy-14
217+
fi
218+
scripts/test.sh -p -i arguments/without_writer_code cpp-linux64-clang
216219
# disabled because of 6 hours time limit
217220
# export ZSERIO_EXTRA_ARGS="${ZSERIO_EXTRA_ARGS} -withRangeCheckCode -withValidationCode"
218221
# scripts/test.sh -p -x arguments/without_writer_code cpp-linux64-gcc cpp-linux32-gcc \

0 commit comments

Comments
 (0)