CI: use compilation database for clang-tidy job
[tinc] / .github / workflows / test.yml
index 209a558..52dd0ef 100644 (file)
@@ -42,6 +42,7 @@ jobs:
 
       - name: Run tests with libgcrypt
         run: sudo -u build CI=1 HOST=${{ matrix.arch }} sh .ci/test/run.sh gcrypt
+        if: always()
 
       - name: Upload test results
         uses: actions/upload-artifact@v2
@@ -60,7 +61,8 @@ jobs:
       - name: Install tools
         run: |
           sudo apt-get install -y astyle clang-tidy-$CLANG
-          sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-$CLANG 100
+          sudo update-alternatives --install /usr/bin/clang-tidy     clang-tidy     /usr/bin/clang-tidy-$CLANG     100
+          sudo update-alternatives --install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-$CLANG 100
           curl -OL "https://github.com/koalaman/shellcheck/releases/download/v$SHELLCHECK/shellcheck-v${SHELLCHECK}.linux.x86_64.tar.xz"
           tar -C ~ --strip-components=1 --wildcards -xf ./shellcheck-*.tar.xz 'shellcheck-*/shellcheck'
           curl -o ~/shfmt -L "https://github.com/mvdan/sh/releases/download/v$SHFMT/shfmt_v${SHFMT}_linux_amd64"
@@ -82,20 +84,16 @@ jobs:
           PATH=$PATH:$HOME ./lint.py
         if: always()
 
-      - name: Run clang-tidy
-        run: sh .ci/tidy/run.sh
-        if: always()
-
-      - name: Check warnings (gcc)
+      - name: Check warnings (clang)
         run: bash .ci/warn/run.sh
         env:
-          CC: gcc-10
+          CC: clang-12
         if: always()
 
-      - name: Check warnings (clang)
+      - name: Check warnings (gcc)
         run: bash .ci/warn/run.sh
         env:
-          CC: clang-12
+          CC: gcc-10
         if: always()
 
   sanitizer:
@@ -120,14 +118,20 @@ jobs:
 
       - name: Run tests with OpenSSL 3
         run: bash .ci/sanitizers/run.sh openssl3
+        if: always()
 
       - name: Sanitize tests with default settings
         run: bash .ci/sanitizers/run.sh default
+        if: always()
 
       - name: Sanitize tests without legacy protocol
         run: bash .ci/sanitizers/run.sh nolegacy
         if: always()
 
+      - name: Run tests with libgcrypt
+        run: bash .ci/sanitizers/run.sh gcrypt
+        if: always()
+
       - name: Upload test results
         uses: actions/upload-artifact@v2
         with:
@@ -143,8 +147,10 @@ jobs:
       matrix:
         os:
           - alpine
+          - alpine:edge
           - centos:7 # aka RHEL 7
           - almalinux:8 # aka RHEL 8
+          - almalinux:9 # aka RHEL 9
           - fedora
           - debian:buster
           - debian:bullseye
@@ -174,6 +180,7 @@ jobs:
 
       - name: Run tests with default settings
         run: sudo -u build CI=1 sh .ci/test/run.sh default
+        if: always()
 
       - name: Run tests without legacy protocol
         run: sudo -u build CI=1 sh .ci/test/run.sh nolegacy
@@ -181,6 +188,7 @@ jobs:
 
       - name: Run tests with libgcrypt
         run: sudo -u build CI=1 sh .ci/test/run.sh gcrypt
+        if: always()
 
       - name: Upload test results
         uses: actions/upload-artifact@v2
@@ -259,6 +267,7 @@ jobs:
 
       - name: Run tests with libgcrypt
         run: sh .ci/test/run.sh gcrypt
+        if: always()
 
       - name: Upload test results
         uses: actions/upload-artifact@v2
@@ -322,6 +331,7 @@ jobs:
       - name: Run tests with libgcrypt
         shell: msys2 {0}
         run: sh .ci/test/run.sh gcrypt
+        if: always()
 
       - name: Upload test results
         uses: actions/upload-artifact@v2