Separate clang-tidy into its own CI task (#2567)

clang-tidy takes 4 minutes on my laptop compared to ALL_TESTS=1 which
takes 8 minutes.  Using a separate tasks avoids duplicating clang-tidy
and unnecessarily slowing CI run-time.
This commit is contained in:
Andrew Gaul 2024-10-24 08:25:30 +09:00 committed by GitHub
parent 31061416bc
commit e43de21e43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,7 +35,6 @@ on:
jobs:
Linux:
runs-on: ubuntu-latest
#
# build matrix for containers
#
@ -114,14 +113,6 @@ jobs:
/bin/sh -c "./configure ${CONFIGURE_OPTIONS}"
make --jobs=$(nproc)
- name: clang-tidy
run: |
# skip if clang-tidy does not exist, e.g., CentOS 7
if command -v clang-tidy; then
make -C src/ clang-tidy
make -C test/ clang-tidy
fi
- name: Cppcheck
run: |
# specify the version range to run cppcheck (cppcheck version number is x.y or x.y.z)
@ -300,6 +291,31 @@ 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:
runs-on: ubuntu-latest
container:
image: fedora:40
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install packages
run: |
.github/workflows/linux-ci-helper.sh fedora:40
- name: Build
run: |
./autogen.sh
/bin/sh -c "./configure ${CONFIGURE_OPTIONS}"
make --jobs=$(nproc)
- name: clang-tidy
run: |
make -C src/ clang-tidy
make -C test/ clang-tidy
#
# Local variables:
# tab-width: 4