summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2022-08-26 16:26:06 +1000
committerDarren Tucker <dtucker@dtucker.net>2022-08-26 19:22:25 +1000
commit85e1a69243f12be8520438ad6a3cfdc0b7fcbb2d (patch)
treed28d0617f1e234797c4210c7f9842644977e692d
parent92382dbe8bf9ea1225b16858f9b9b208c15c7e8d (diff)
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.
-rwxr-xr-x.github/configs4
-rwxr-xr-x.github/setup_ci.sh43
-rw-r--r--.github/workflows/c-cpp.yml3
3 files changed, 37 insertions, 13 deletions
diff --git a/.github/configs b/.github/configs
index 21bdf24c..c068f5d8 100755
--- a/.github/configs
+++ b/.github/configs
@@ -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"
diff --git a/.github/setup_ci.sh b/.github/setup_ci.sh
index 0f98d774..05e1d7b8 100755
--- a/.github/setup_ci.sh
+++ b/.github/setup_ci.sh
@@ -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
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
index 36d58a42..ec246061 100644
--- a/.github/workflows/c-cpp.yml
+++ b/.github/workflows/c-cpp.yml
@@ -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 }}