Expand clang-tidy CI target to all static-checks (#2625)
Relocate cppcheck and Shellcheck into a single CI target instead of running them as part of all distributions. While this modestly reduces run-time by about 20 seconds, more importantly it avoids workarounds for older checker versions and simplifies the code.
This commit is contained in:
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@ -98,19 +98,6 @@ jobs:
|
||||
/bin/sh -c "./configure ${CONFIGURE_OPTIONS}"
|
||||
make --jobs=$(nproc)
|
||||
|
||||
- name: Cppcheck
|
||||
run: |
|
||||
# specify the version range to run cppcheck (cppcheck version number is x.y or x.y.z)
|
||||
if cppcheck --version | sed -e 's/\./ /g' | awk '{if (($2 * 1000 + $3) <= 2004) { exit(1) } }'; then
|
||||
make cppcheck
|
||||
fi
|
||||
|
||||
- name: Shellcheck
|
||||
run: |
|
||||
if shellcheck --version | awk -F '[ .]' '/version:/ && ($2 * 1000 + $3 <= 7) { exit(1) }'; then
|
||||
make shellcheck
|
||||
fi
|
||||
|
||||
- name: Test suite
|
||||
run: |
|
||||
make check -C src
|
||||
@ -276,7 +263,7 @@ jobs:
|
||||
run: |
|
||||
/bin/sh -c "ALL_TESTS=1 ASAN_OPTIONS=${ASAN_OPTIONS} TSAN_OPTIONS=${TSAN_OPTIONS} VALGRIND=${VALGRIND} RETRIES=${RETRIES} make check -C test || (test/filter-suite-log.sh test/test-suite.log; exit 1)"
|
||||
|
||||
clang-tidy:
|
||||
static-checks:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: fedora:41
|
||||
@ -299,6 +286,13 @@ jobs:
|
||||
run: |
|
||||
make clang-tidy
|
||||
|
||||
- name: Cppcheck
|
||||
run: |
|
||||
make cppcheck
|
||||
|
||||
- name: Shellcheck
|
||||
run: |
|
||||
make shellcheck
|
||||
|
||||
#
|
||||
# Local variables:
|
||||
|
||||
Reference in New Issue
Block a user