]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Add cygwin-release test target.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 26 Aug 2022 06:26:06 +0000 (16:26 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 26 Aug 2022 09:22:25 +0000 (19:22 +1000)
This also moves the cygwin package install from the workflow file to
setup_ci.sh so that we can install different sets of Cygwin packages
for different test configs.

.github/configs
.github/setup_ci.sh
.github/workflows/c-cpp.yml

index 21bdf24c445f2229002f256a55ff072465cdab6b..c068f5d8dc0db6876e55963a2462fa451c755a91 100755 (executable)
@@ -34,7 +34,9 @@ case "$config" in
        TEST_TARGET=t-exec
        ;;
     cygwin-release)
-       CONFIGFLAGS="--with-libedit --with-xauth=/usr/bin/xauth --disable-strip --with-security-key-builtin"
+       # See https://cygwin.com/git/?p=git/cygwin-packages/openssh.git;a=blob;f=openssh.cygport;hb=HEAD
+       CONFIGFLAGS="--with-xauth=/usr/bin/xauth --with-security-key-builtin"
+       CONFIGFLAGS="$CONFIGFLAGS --with-kerberos5=/usr --with-libedit --disable-strip"
        ;;
    clang-12-Werror)
        CC="clang-12"
index 0f98d77473f71a43c936b29180badb6dbae31cfa..05e1d7b8bfcb6033ab54fcf0ac225ce2256308fd 100755 (executable)
@@ -1,26 +1,30 @@
 #!/bin/sh
 
+PACKAGES=""
+
  . .github/configs $@
 
 case "`./config.guess`" in
 *cygwin)
-       set -x
+       PACKAGER=setup
        echo Setting CYGWIN sustem environment variable.
        setx CYGWIN "binmode"
-       id
        chmod -R go-rw /cygdrive/d/a
        umask 077
-       set +x
+       PACKAGES="$PACKAGES,autoconf,automake,cygwin-devel,gcc-core"
+       PACKAGES="$PACKAGES,make,openssl-devel,zlib-devel"
        ;;
 *-darwin*)
+       PACKAGER=brew
        brew install automake
        exit 0
        ;;
+*)
+       PACKAGER=apt
 esac
 
 TARGETS=$@
 
-PACKAGES=""
 INSTALL_FIDO_PPA="no"
 export DEBIAN_FRONTEND=noninteractive
 
@@ -46,19 +50,22 @@ fi
 
 for flag in $CONFIGFLAGS; do
     case "$flag" in
-    --with-pam)                PACKAGES="${PACKAGES} libpam0g-dev" ;;
-    --with-libedit)    PACKAGES="${PACKAGES} libedit-dev" ;;
+    --with-pam)                TARGETS="${TARGETS} pam" ;;
+    --with-libedit)    TARGETS="${TARGETS} libedit" ;;
     esac
 done
 
 for TARGET in $TARGETS; do
     case $TARGET in
-    default|without-openssl|without-zlib|c89|libedit|*pam)
+    default|without-openssl|without-zlib|c89)
         # nothing to do
         ;;
     clang-sanitize*)
         PACKAGES="$PACKAGES clang-12"
         ;;
+    cygwin-release)
+        PACKAGES="$PACKAGES libfido2-devel libkrb5-devel"
+        ;;
     gcc-sanitize*)
         ;;
     clang-*|gcc-*)
@@ -71,6 +78,15 @@ for TARGET in $TARGETS; do
     heimdal)
         PACKAGES="$PACKAGES heimdal-dev"
         ;;
+    libedit)
+       case "$PACKAGER" in
+       setup)  PACKAGES="$PACKAGES libedit-devel" ;;
+       apt)    PACKAGES="$PACKAGES libedit-dev" ;;
+       esac
+        ;;
+    *pam)
+        PACKAGES="$PACKAGES libpam0g-dev"
+        ;;
     sk)
         INSTALL_FIDO_PPA="yes"
         PACKAGES="$PACKAGES libfido2-dev libu2f-host-dev libcbor-dev"
@@ -123,9 +139,16 @@ if [ "yes" = "$INSTALL_FIDO_PPA" ]; then
     sudo apt-add-repository -y ppa:yubico/stable
 fi
 
-if [ "x" != "x$PACKAGES" ]; then 
-    sudo apt update -qq
-    sudo apt install -qy $PACKAGES
+if [ "x" != "x$PACKAGES" ]; then
+    case "$PACKAGER" in
+    apt)
+       sudo apt update -qq
+       sudo apt install -qy $PACKAGES
+       ;;
+    setup)
+       /cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,`
+       ;;
+    esac
 fi
 
 if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then
index 36d58a42003c6d1984cc029f219cae68216d2642..ec24606112ec81d7dc2db15b572aec0177435e95 100644 (file)
@@ -20,6 +20,7 @@ jobs:
         # Then we include any extra configs we want to test for specific VMs.
         # Valgrind slows things down quite a bit, so start them first.
         include:
+          - { os: windows-2019, configs: cygwin-release }
           - { os: ubuntu-20.04, configs: valgrind-1 }
           - { os: ubuntu-20.04, configs: valgrind-2 }
           - { os: ubuntu-20.04, configs: valgrind-3 }
@@ -85,8 +86,6 @@ jobs:
     - name: install cygwin
       if: ${{ matrix.os == 'windows-2019' }}
       uses: cygwin/cygwin-install-action@master
-      with:
-        packages: autoconf, automake, cygwin-devel, gcc-core, make, openssl-devel, zlib-devel
     - uses: actions/checkout@v2
     - name: setup CI system
       run: sh ./.github/setup_ci.sh ${{ matrix.configs }}