Add cygwin-release test target.

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.
This commit is contained in:
Darren Tucker 2022-08-26 16:26:06 +10:00
parent 92382dbe8b
commit 85e1a69243
No known key found for this signature in database
3 changed files with 37 additions and 13 deletions

4
.github/configs vendored
View File

@ -34,7 +34,9 @@ case "$config" in
TEST_TARGET=t-exec TEST_TARGET=t-exec
;; ;;
cygwin-release) 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) clang-12-Werror)
CC="clang-12" CC="clang-12"

41
.github/setup_ci.sh vendored
View File

@ -1,26 +1,30 @@
#!/bin/sh #!/bin/sh
PACKAGES=""
. .github/configs $@ . .github/configs $@
case "`./config.guess`" in case "`./config.guess`" in
*cygwin) *cygwin)
set -x PACKAGER=setup
echo Setting CYGWIN sustem environment variable. echo Setting CYGWIN sustem environment variable.
setx CYGWIN "binmode" setx CYGWIN "binmode"
id
chmod -R go-rw /cygdrive/d/a chmod -R go-rw /cygdrive/d/a
umask 077 umask 077
set +x PACKAGES="$PACKAGES,autoconf,automake,cygwin-devel,gcc-core"
PACKAGES="$PACKAGES,make,openssl-devel,zlib-devel"
;; ;;
*-darwin*) *-darwin*)
PACKAGER=brew
brew install automake brew install automake
exit 0 exit 0
;; ;;
*)
PACKAGER=apt
esac esac
TARGETS=$@ TARGETS=$@
PACKAGES=""
INSTALL_FIDO_PPA="no" INSTALL_FIDO_PPA="no"
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
@ -46,19 +50,22 @@ fi
for flag in $CONFIGFLAGS; do for flag in $CONFIGFLAGS; do
case "$flag" in case "$flag" in
--with-pam) PACKAGES="${PACKAGES} libpam0g-dev" ;; --with-pam) TARGETS="${TARGETS} pam" ;;
--with-libedit) PACKAGES="${PACKAGES} libedit-dev" ;; --with-libedit) TARGETS="${TARGETS} libedit" ;;
esac esac
done done
for TARGET in $TARGETS; do for TARGET in $TARGETS; do
case $TARGET in case $TARGET in
default|without-openssl|without-zlib|c89|libedit|*pam) default|without-openssl|without-zlib|c89)
# nothing to do # nothing to do
;; ;;
clang-sanitize*) clang-sanitize*)
PACKAGES="$PACKAGES clang-12" PACKAGES="$PACKAGES clang-12"
;; ;;
cygwin-release)
PACKAGES="$PACKAGES libfido2-devel libkrb5-devel"
;;
gcc-sanitize*) gcc-sanitize*)
;; ;;
clang-*|gcc-*) clang-*|gcc-*)
@ -71,6 +78,15 @@ for TARGET in $TARGETS; do
heimdal) heimdal)
PACKAGES="$PACKAGES heimdal-dev" 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) sk)
INSTALL_FIDO_PPA="yes" INSTALL_FIDO_PPA="yes"
PACKAGES="$PACKAGES libfido2-dev libu2f-host-dev libcbor-dev" PACKAGES="$PACKAGES libfido2-dev libu2f-host-dev libcbor-dev"
@ -124,8 +140,15 @@ if [ "yes" = "$INSTALL_FIDO_PPA" ]; then
fi fi
if [ "x" != "x$PACKAGES" ]; then if [ "x" != "x$PACKAGES" ]; then
sudo apt update -qq case "$PACKAGER" in
sudo apt install -qy $PACKAGES apt)
sudo apt update -qq
sudo apt install -qy $PACKAGES
;;
setup)
/cygdrive/c/setup.exe -q -P `echo "$PACKAGES" | tr ' ' ,`
;;
esac
fi fi
if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then if [ "${INSTALL_HARDENED_MALLOC}" = "yes" ]; then

View File

@ -20,6 +20,7 @@ jobs:
# Then we include any extra configs we want to test for specific VMs. # Then we include any extra configs we want to test for specific VMs.
# Valgrind slows things down quite a bit, so start them first. # Valgrind slows things down quite a bit, so start them first.
include: include:
- { os: windows-2019, configs: cygwin-release }
- { os: ubuntu-20.04, configs: valgrind-1 } - { os: ubuntu-20.04, configs: valgrind-1 }
- { os: ubuntu-20.04, configs: valgrind-2 } - { os: ubuntu-20.04, configs: valgrind-2 }
- { os: ubuntu-20.04, configs: valgrind-3 } - { os: ubuntu-20.04, configs: valgrind-3 }
@ -85,8 +86,6 @@ jobs:
- name: install cygwin - name: install cygwin
if: ${{ matrix.os == 'windows-2019' }} if: ${{ matrix.os == 'windows-2019' }}
uses: cygwin/cygwin-install-action@master uses: cygwin/cygwin-install-action@master
with:
packages: autoconf, automake, cygwin-devel, gcc-core, make, openssl-devel, zlib-devel
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: setup CI system - name: setup CI system
run: sh ./.github/setup_ci.sh ${{ matrix.configs }} run: sh ./.github/setup_ci.sh ${{ matrix.configs }}