]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: test build with supported cryptolibs to some degree 21888/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 24 Dec 2021 10:50:37 +0000 (11:50 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 24 Dec 2021 15:24:16 +0000 (16:24 +0100)
Let's assign a specific -Dcryptolib= value to each job to have at least
some coverage for all supported cryptolibs without unnecessarily
multiplying the test matrix.

Should provide coverage for #21880.

.github/workflows/build_test.sh
.github/workflows/build_test.yml

index 192db85f57dc073d8f35c49c643418c122ea0187..713a413bf902ace3038143b80de142c9b06dc73e 100755 (executable)
@@ -10,7 +10,7 @@ success() { echo >&2 -e "\033[32;1m$1\033[0m"; }
 ARGS=(
     "--optimization=0"
     "--optimization=s"
-    "--optimization=3 -Db_lto=true"
+    "--optimization=3 -Db_lto=true -Ddns-over-tls=false"
     "--optimization=3 -Db_lto=false"
     "--optimization=3 -Ddns-over-tls=openssl"
     "--optimization=3 -Dfexecve=true -Dstandalone-binaries=true -Dstatic-libsystemd=true -Dstatic-libudev=true"
@@ -62,6 +62,7 @@ PACKAGES=(
 COMPILER="${COMPILER:?}"
 COMPILER_VERSION="${COMPILER_VERSION:?}"
 LINKER="${LINKER:?}"
+CRYPTOLIB="${CRYPTOLIB:?}"
 RELEASE="$(lsb_release -cs)"
 
 bash -c "echo 'deb-src http://archive.ubuntu.com/ubuntu/ $RELEASE main restricted universe multiverse' >>/etc/apt/sources.list"
@@ -121,7 +122,7 @@ for args in "${ARGS[@]}"; do
          CC="$CC" CC_LD="$LINKER" CFLAGS="-Werror" \
          CXX="$CXX" CXX_LD="$LINKER" CXXFLAGS="-Werror" \
          meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
-               $args build; then
+               -Dcryptolib="${CRYPTOLIB:?}" $args build; then
 
         fatal "meson failed with $args"
     fi
index 69487fa594cd7f0ff017f38e764d2427d71adaf6..f0b9fe495cd379c85386270bd21a544e2de66c9e 100644 (file)
@@ -19,20 +19,20 @@ jobs:
   build:
     runs-on: ubuntu-20.04
     concurrency:
-      group: ${{ github.workflow }}-${{ matrix.env.COMPILER }}-${{ matrix.env.COMPILER_VERSION }}-${{ matrix.env.LINKER }}-${{ github.ref }}
+      group: ${{ github.workflow }}-${{ toJSON(matrix.env) }}-${{ github.ref }}
       cancel-in-progress: true
     strategy:
       fail-fast: false
       matrix:
         env:
-          - { COMPILER: "gcc",   COMPILER_VERSION: "10", LINKER: "bfd"  }
-          - { COMPILER: "gcc",   COMPILER_VERSION: "11", LINKER: "gold" }
-          - { COMPILER: "clang", COMPILER_VERSION: "11", LINKER: "bfd"  }
-          - { COMPILER: "clang", COMPILER_VERSION: "12", LINKER: "gold" }
-          - { COMPILER: "clang", COMPILER_VERSION: "13", LINKER: "lld"  }
+          - { COMPILER: "gcc",   COMPILER_VERSION: "10", LINKER: "bfd",  CRYPTOLIB: "gcrypt"  }
+          - { COMPILER: "gcc",   COMPILER_VERSION: "11", LINKER: "gold", CRYPTOLIB: "openssl" }
+          - { COMPILER: "clang", COMPILER_VERSION: "11", LINKER: "bfd",  CRYPTOLIB: "auto"    }
+          - { COMPILER: "clang", COMPILER_VERSION: "12", LINKER: "gold", CRYPTOLIB: "gcrypt"  }
+          - { COMPILER: "clang", COMPILER_VERSION: "13", LINKER: "lld",  CRYPTOLIB: "openssl" }
     env: ${{ matrix.env }}
     steps:
       - name: Repository checkout
         uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
-      - name: Build check (${{ env.COMPILER }}-${{ env.COMPILER_VERSION }}-${{ env.LINKER }})
+      - name: ${{ format('Build check ({0}-{1}-{2}-{3})', env.COMPILER, env.COMPILER_VERSION, env.LINKER, env.CRYPTOLIB) }}
         run: sudo -E .github/workflows/build_test.sh