]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
github: Adapt to switch to Ubuntu 24.04 for ubuntu-latest
authorTobias Brunner <tobias@strongswan.org>
Thu, 9 Jan 2025 13:21:10 +0000 (14:21 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 10 Jan 2025 15:14:03 +0000 (16:14 +0100)
.github/workflows/linux.yml
scripts/test.sh

index 92fc975035392db687dcacf9ebc0f52c13e84931..fe8eb7a7f5295d20c4cb18c09a001ed6d5d69c59 100644 (file)
@@ -41,8 +41,7 @@ jobs:
           - test: printf-builtin
             monolithic: yes
         include:
-          - os: ubuntu-24.04
-            test: apidoc
+          - test: apidoc
           - test: coverage
           - test: dist
           - test: nm
@@ -97,17 +96,25 @@ jobs:
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
-        os: [ ubuntu-latest, ubuntu-20.04 ]
+        os: [ ubuntu-latest, ubuntu-22.04, ubuntu-20.04 ]
         test: [ botan, wolfssl, openssl, openssl-3, openssl-awslc, gcrypt ]
         leak-detective: [ no, yes ]
         exclude:
-          # test custom-built libs only on one platform
+          # test custom-built libs only on the latest platform
+          - os: ubuntu-22.04
+            test: botan
           - os: ubuntu-20.04
             test: botan
+          - os: ubuntu-22.04
+            test: wolfssl
           - os: ubuntu-20.04
             test: wolfssl
+          - os: ubuntu-22.04
+            test: openssl-3
           - os: ubuntu-20.04
             test: openssl-3
+          - os: ubuntu-22.04
+            test: openssl-awslc
           - os: ubuntu-20.04
             test: openssl-awslc
     env:
@@ -147,7 +154,7 @@ jobs:
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
-        os: [ ubuntu-20.04 ]
+        os: [ ubuntu-22.04, ubuntu-20.04 ]
         test: [ all, nm ]
         compiler: [ gcc, clang ]
         exclude:
@@ -157,13 +164,16 @@ jobs:
       LEAK_DETECTIVE: ${{ matrix.leak-detective || 'no' }}
       CC: ${{ matrix.compiler || 'gcc' }}
       TEST: ${{ matrix.test }}
-      # LSan causes spurious SIGSEGV after tests due to DTLS handling by glibc
+      # LSan causes spurious SIGSEGV after tests due to DTLS handling by glibc (on 20.04)
       ASAN_OPTIONS: intercept_tls_get_addr=0
     steps:
       - uses: actions/checkout@v4
       - uses: actions/cache@v4
         with:
-          path: ~/.ccache
+          # path is different on newer systems
+          path: |
+            ~/.cache/ccache
+            ~/.ccache
           key: ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}-${{ github.sha }}
           restore-keys: |
             ccache-${{ matrix.os }}-${{ env.CC }}-${{ matrix.test }}-
index 8c5c2791eeebe9a25456727fb7d37424fedbf6b4..83a22422398c1efb94593468671595163b51582a 100755 (executable)
@@ -173,7 +173,7 @@ system_uses_openssl3()
 
 prepare_system_openssl()
 {
-       # On systems that ship OpenSSL 3 (e.g. Ubuntu 22.04), we require debug
+       # On systems that ship OpenSSL 3 (e.g. Ubuntu 22.04+), we require debug
        # symbols to whitelist leaks
        if test "$1" = "deps"; then
                echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted
@@ -181,13 +181,17 @@ prepare_system_openssl()
                        deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted" | \
                        sudo tee -a /etc/apt/sources.list.d/ddebs.list
                sudo apt-get install -qq ubuntu-dbgsym-keyring
-               DEPS="$DEPS libssl3-dbgsym"
+               if [ "$ID" = "ubuntu" -a "$VERSION_ID" = "24.04" ]; then
+                       DEPS="$DEPS libssl3t64-dbgsym"
+               else
+                       DEPS="$DEPS libssl3-dbgsym"
+               fi
        fi
        if test "$LEAK_DETECTIVE" = "yes"; then
                # make sure we can properly whitelist functions with leak detective
                DEPS="$DEPS binutils-dev"
                CONFIG="$CONFIG --enable-bfd-backtraces"
-       else
+       elif [ "$ID" = "ubuntu" -a "$VERSION_ID" != "24.04" ]; then
                # with ASan we have to use the (extremely) slow stack unwind as the
                # shipped version of the library is built with -fomit-frame-pointer
                export ASAN_OPTIONS=fast_unwind_on_malloc=0