From 26eddf002f0d9e957ff21865bddfbdf25b4521f5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 25 Feb 2026 15:51:59 +0100 Subject: [PATCH] GHA/linux: switch clang-tidy job to cmake for 2x speed, bump to v20, enable for tests Checking lib and src under 3m15s versus 7m15s. Downside: autotools clang-tidy support is no longer CI-tested. The reason for the slowness is invoking a single clang-tidy command with all source files, and clang-tidy checking them in a single thread, sequentially. clang-tidy offers a `run-clang-tidy` Python script for parallel processing, which may help with this. However at this point it's more practical to use cmake, which also supports verifying the whole codebase, not only lib and src. Also: - bump clang-tidy to the latest available, v20 (from v18). - enable running clang-tidy on tests. Takes under 2 minutes. Also tried `_CURL_TESTS_CONCAT=ON`, it brings down the build tests step from 1m47s to 54s, saving 1 minute. Skipped using it for now. Closes #20725 --- .github/workflows/linux.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index d3cbc8038f..32f9382cb9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -276,18 +276,18 @@ jobs: -DCURL_DISABLE_LDAP=ON -DUSE_LIBIDN2=OFF -DCURL_USE_LIBSSH2=OFF - name: 'clang-tidy' - install_packages: clang-19 clang-tidy-19 libssl-dev libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev libkrb5-dev librtmp-dev libgnutls28-dev - install_steps: skipall mbedtls-latest-intel rustls wolfssl-opensslextra-intel + install_packages: clang-20 clang-tidy-20 libssl-dev libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev libkrb5-dev librtmp-dev libgnutls28-dev + install_steps: skiprun mbedtls-latest-intel rustls wolfssl-opensslextra-intel install_steps_brew: gsasl make-custom-target: tidy - LDFLAGS: -Wl,-rpath,/home/runner/wolfssl-opensslextra/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/gsasl/lib - PKG_CONFIG_PATH: /home/linuxbrew/.linuxbrew/opt/gsasl/lib/pkgconfig - CC: clang-19 - configure: >- - CLANG_TIDY=clang-tidy-19 - --with-wolfssl=/home/runner/wolfssl-opensslextra --with-openssl --with-rustls --with-mbedtls=/home/runner/mbedtls --with-gnutls --with-libgsasl - --with-librtmp --with-libssh2 --with-libidn2 - --enable-ech --with-gssapi --enable-ssls-export --disable-typecheck + CC: clang-20 + LDFLAGS: -Wl,-rpath,/home/runner/wolfssl-opensslextra/lib -Wl,-rpath,/home/runner/mbedtls/lib -Wl,-rpath,/home/runner/rustls/lib -Wl,-rpath,/home/linuxbrew/.linuxbrew/opt/gsasl/lib + PKG_CONFIG_PATH: /home/runner/wolfssl-opensslextra/lib/pkgconfig:/home/runner/mbedtls/lib/pkgconfig:/home/runner/rustls/lib/pkgconfig:/home/linuxbrew/.linuxbrew/opt/gsasl/lib/pkgconfig + generate: >- + -DCURL_USE_OPENSSL=ON -DCURL_USE_WOLFSSL=ON -DCURL_USE_GNUTLS=ON -DCURL_USE_MBEDTLS=ON -DCURL_USE_RUSTLS=ON + -DCURL_USE_GSASL=ON -DUSE_LIBRTMP=ON + -DUSE_ECH=ON -DCURL_USE_GSSAPI=ON -DUSE_SSLS_EXPORT=ON + -DCURL_CLANG_TIDY=ON -DCLANG_TIDY=/usr/bin/clang-tidy-20 - name: 'scan-build' install_packages: clang-tools clang libssl-dev libidn2-dev libssh2-1-dev libnghttp2-dev libldap-dev libgss-dev librtmp-dev libgnutls28-dev