]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Convert most github hosted tests to new config structure.
authorDarren Tucker <dtucker@dtucker.net>
Wed, 17 Feb 2021 07:41:30 +0000 (18:41 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Wed, 17 Feb 2021 09:46:03 +0000 (20:46 +1100)
.github/configs
.github/setup_ci.sh
.github/workflows/c-cpp.yml

index 1cf80027bee4284c2956da670f3d4205f519d39d..fa0ceff78ec841ba234a1257202d49f02ef111c1 100755 (executable)
@@ -21,13 +21,38 @@ LIBCRYPTOFLAGS=""
 case "$config" in
     default|sol64)
        ;;
+    kitchensink)
+       CONFIGFLAGS="--with-kerberos5 --with-libedit --with-pam --with-security-key-builtin"
+       CONFIGFLAGS="${CONFIGFLAGS} --with-selinux"
+       ;;
+    hardenedmalloc)
+       CONFIGFLAGS="--with-ldflags=-lhardened_malloc"
+       ;;
+    kerberos5)
+       CONFIGFLAGS="--with-kerberos5"
+       ;;
+    libedit)
+       CONFIGFLAGS="--with-libedit"
+       ;;
     *pam)
        CONFIGFLAGS="--with-pam"
        SSHD_CONFOPTS="UsePam yes"
        ;;
+    libressl-head)
+       LIBCRYPTOFLAGS="--with-ssl-dir=/opt/libressl/head --with-rpath=-Wl,-rpath,"
+       ;;
+    openssl-head)
+       LIBCRYPTOFLAGS="--with-ssl-dir=/opt/openssl/head --with-rpath=-Wl,-rpath,"
+       ;;
+    selinux)
+       CONFIGFLAGS="--with-selinux"
+       ;;
+    sk)
+       CONFIGFLAGS="--with-security-key-builtin"
+        ;;
     without-openssl)
        LIBCRYPTOFLAGS="--without-openssl"
-        TEST_TARGET=t-exec
+       TEST_TARGET=t-exec
        ;;
     *)
        echo "Unknown configuration $config"
@@ -53,8 +78,8 @@ esac
 # If we have a local openssl/libressl, use that.
 if [ -z "${LIBCRYPTOFLAGS}" ]; then
        # last-match
-       for i in /usr/local /usr/local/ssl; do
-               if [ -x ${i}/bin/openssl ]; then
+       for i in /usr/local /usr/local/ssl /usr/local/opt/openssl; do
+               if [ -d ${i}/bin/openssl ]; then
                        LIBCRYPTOFLAGS="--with-ssl-dir=${i}"
                fi
        done
index 187a4fad69a00919b318855275727074d3eeeff0..16eca54522c12dd277ad9f224bf1ab051985c25f 100755 (executable)
@@ -18,35 +18,39 @@ set -ex
 
 lsb_release -a
 
+if [ "${TARGETS}" = "kitchensink" ]; then
+       TARGETS="kerberos5 libedit pam sk selinux"
+fi
+
 for TARGET in $TARGETS; do
     case $TARGET in
-    ""|--without-openssl|--without-zlib|--with-Werror|--with-rpath*|--with-ssl-dir=*|--with-zlib=*)
+    default|without-openssl|without-zlib)
         # nothing to do
         ;;
-    "--with-kerberos5")
+    kerberos5)
         PACKAGES="$PACKAGES heimdal-dev"
         #PACKAGES="$PACKAGES libkrb5-dev"
         ;;
-    "--with-libedit")
+    libedit)
         PACKAGES="$PACKAGES libedit-dev"
         ;;
-    "--with-pam")
+    *pam)
         PACKAGES="$PACKAGES libpam0g-dev"
         ;;
-    "--with-security-key-builtin")
+    sk)
         INSTALL_FIDO_PPA="yes"
         PACKAGES="$PACKAGES libfido2-dev libu2f-host-dev"
         ;;
-    "--with-selinux")
+    selinux)
         PACKAGES="$PACKAGES libselinux1-dev selinux-policy-dev"
         ;;
-    "--with-ldflags=-lhardened_malloc")
+    hardenedmalloc)
         INSTALL_HARDENED_MALLOC=yes
        ;;
-    "--with-ssl-dir=/opt/openssl/head")
+    openssl-head)
         INSTALL_OPENSSL_HEAD=yes
        ;;
-    "--with-ssl-dir=/opt/libressl/head")
+    libressl-head)
         INSTALL_LIBRESSL_HEAD=yes
        ;;
     *) echo "Invalid option '${TARGET}'"
index 7d02bc319ca4698159c008e0f149dd2a08bfc5da..fe910bb7bc66511a6af57cc25bb6f2a7f2e71a83 100644 (file)
@@ -7,77 +7,27 @@ on:
     branches: [ master ]
 
 jobs:
-  ubuntu-20_04:
+  linux:
     if: github.repository != 'openssh/openssh-portable-selfhosted'
-    runs-on: ubuntu-20.04
     strategy:
+      fail-fast: false
       matrix:
-        configs:
-        - ""
-        - "--with-kerberos5 --with-libedit --with-pam --with-security-key-builtin --with-selinux --with-Werror"
-        - "--with-ldflags=-lhardened_malloc"
-        - "--with-ssl-dir=/opt/openssl/head --with-rpath=-Wl,-rpath,"
-        - "--with-ssl-dir=/opt/libressl/head --with-rpath=-Wl,-rpath,"
-    steps:
-    - uses: actions/checkout@v2
-    - name: setup CI system
-      run: ./.github/setup_ci.sh ${{ matrix.configs }}
-    - name: autoreconf
-      run: autoreconf
-    - name: configure
-      run: ./configure ${{ matrix.configs }}
-    - name: make
-      run: make -j2
-    - name: copy moduli
-      run: sudo cp moduli /usr/local/etc/
-    - name: make tests
-      run: ./.github/run_test.sh ${{ matrix.configs }}
-      env:
-        SUDO: sudo
-        TEST_SSH_UNSAFE_PERMISSIONS: 1
-
-
-  ubuntu-18_04:
-    if: github.repository != 'openssh/openssh-portable-selfhosted'
-    runs-on: ubuntu-18.04
-    strategy:
-      matrix:
-        configs:
-        - ""
-        - "--with-kerberos5"
-        - "--with-libedit"
-        - "--with-pam"
-        - "--with-security-key-builtin"
-        - "--with-selinux"
-        - "--with-kerberos5 --with-libedit --with-pam --with-security-key-builtin --with-selinux"
-        - "--without-openssl --without-zlib"
-    steps:
-    - uses: actions/checkout@v2
-    - name: setup CI system
-      run: ./.github/setup_ci.sh ${{ matrix.configs }}
-    - name: autoreconf
-      run: autoreconf
-    - name: configure
-      run: ./configure ${{ matrix.configs }}
-    - name: make
-      run: make -j2
-    - name: copy moduli
-      run: sudo cp moduli /usr/local/etc/
-    - name: make tests
-      run: ./.github/run_test.sh ${{ matrix.configs }}
-      env:
-        SUDO: sudo
-        TEST_SSH_UNSAFE_PERMISSIONS: 1
-
-
-  ubuntu-16_04:
-    if: github.repository != 'openssh/openssh-portable-selfhosted'
-    runs-on: ubuntu-16.04
-    strategy:
-      matrix:
-        configs:
-        - ""
-        - "--with-pam --with-selinux --with-libedit --with-kerberos5 "
+        os: [ubuntu-16_04, ubuntu-18_04, ubuntu-20.04]
+        configs: [default, pam]
+        # Then we include any extra configs we want to test for specific VMs.
+        include:
+          - { os: ubuntu-20.04, configs: kitchensink }
+          - { os: ubuntu-20.04, configs: hardenedmalloc }
+          - { os: ubuntu-20.04, configs: libressl-head }
+          - { os: ubuntu-20.04, configs: openssl-head }
+          - { os: ubuntu-18.04, configs: kerberos5 }
+          - { os: ubuntu-18.04, configs: libedit }
+          - { os: ubuntu-18.04, configs: sk }
+          - { os: ubuntu-18.04, configs: selinux }
+          - { os: ubuntu-18.04, configs: kitchensink }
+          - { os: ubuntu-18.04, configs: without-openssl }
+          - { os: ubuntu-16_04, configs: kitchensink }
+    runs-on: ${{ matrix.os }}
     steps:
     - uses: actions/checkout@v2
     - name: setup CI system
@@ -85,7 +35,7 @@ jobs:
     - name: autoreconf
       run: autoreconf
     - name: configure
-      run: ./configure ${{ matrix.configs }}
+      run: ./.github/configure.sh ${{ matrix.configs }}
     - name: make
       run: make -j2
     - name: copy moduli
@@ -96,15 +46,12 @@ jobs:
         SUDO: sudo
         TEST_SSH_UNSAFE_PERMISSIONS: 1
 
-
   macos:
     if: github.repository != 'openssh/openssh-portable-selfhosted'
     strategy:
       matrix:
         os: [ macos-10.15, macos-11.0 ]
-        configs:
-        - ""
-        - "--with-pam"
+        configs: [default, pam]
     runs-on: ${{ matrix.os }}
     steps:
     - uses: actions/checkout@v2