github: Move CI for Windows from AppVeyor to GitHub Actions

These are quite a bit faster than on AppVeyor (with ccache about a fifth,
without less than half - and they run concurrently).

We only keep the AppVeyor builds for now to test against those old
OpenSSL versions (1.1.1 and 1.0.2) for which there is still extended
support available.  Even simplified like that they still take longer
than the builds on GA.
This commit is contained in:
Tobias Brunner
2026-04-21 16:44:18 +02:00
parent e0fb06c9cc
commit 19d73ef156
2 changed files with 85 additions and 15 deletions
+32 -13
View File
@@ -345,14 +345,9 @@ win*)
--enable-tnccs-20
--enable-pki --enable-swanctl --enable-socket-win
--enable-kernel-iph --enable-kernel-wfp --enable-winhttp"
# no make check for Windows binaries unless we run on a Windows host
# building natively is slow, so don't build libimcv to save about 10 minutes
if test "$APPVEYOR" != "True"; then
TARGET=
CONFIG="$CONFIG --enable-imc-attestation --enable-imv-attestation
--enable-imc-os --enable-imv-os --enable-tnc-imv --enable-tnc-imc"
else
CONFIG="$CONFIG --enable-openssl"
# on AppVeyor we only build against old OpenSSL versions
if test "$APPVEYOR" = "True"; then
CONFIG="--disable-defaults --enable-static --enable-pki --enable-openssl --enable-pem --enable-drbg"
CFLAGS="$CFLAGS -I$OPENSSL_DIR/include"
LDFLAGS="-L$OPENSSL_DIR/lib -fuse-ld=lld"
case "$IMG" in
@@ -362,19 +357,40 @@ win*)
;;
esac
export LDFLAGS
# no make check for Windows binaries unless we run on a Windows host
# building natively is slow, so don't build libimcv to save several minutes
elif test "$OS_NAME" != "windows"; then
TARGET=
CONFIG="$CONFIG --enable-imc-attestation --enable-imv-attestation
--enable-imc-os --enable-imv-os --enable-tnc-imv --enable-tnc-imc"
DEPS="gcc-mingw-w64-base"
case "$TEST" in
win64)
DEPS="gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-x86-64-dev $DEPS"
;;
win32)
DEPS="gcc-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-i686-dev $DEPS"
;;
esac
else
CONFIG="$CONFIG --enable-openssl --enable-drbg"
DEPS="base-devel git autotools gperf"
case "$TEST" in
win64)
DEPS="$DEPS mingw-w64-x86_64-toolchain"
;;
win32)
DEPS="$DEPS mingw-w64-i686-toolchain"
;;
esac
fi
CFLAGS="$CFLAGS -mno-ms-bitfields"
DEPS="gcc-mingw-w64-base"
case "$TEST" in
win64)
CONFIG="--host=x86_64-w64-mingw32 $CONFIG --enable-dbghelp-backtraces"
DEPS="gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-x86-64-dev $DEPS"
CC="x86_64-w64-mingw32-gcc"
;;
win32)
CONFIG="--host=i686-w64-mingw32 $CONFIG"
DEPS="gcc-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-i686-dev $DEPS"
CC="i686-w64-mingw32-gcc"
;;
esac
;;
@@ -498,6 +514,9 @@ deps)
pkg install -y automake autoconf libtool pkgconf && \
pkg install -y bison flex gperf $DEPS
;;
windows)
pacman --noconfirm -S --needed $DEPS
;;
esac
exit $?
;;