env:
TESTS_REDUCED_KEYLENGTHS: yes
- CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_COMPRESS: true
CCACHE_MAXSIZE: 200M
# since the compilers are newly installed every time, we have to use this to
matrix:
test: [ win64, win32 ]
env:
+ CCACHE_BASEDIR: ${{ github.workspace }}
OS_NAME: linux
TEST: ${{ matrix.test }}
steps:
name: Logs ${{ github.job }}
path: config.log
retention-days: 5
+
+ native:
+ needs: pre-check
+ if: ${{ needs.pre-check.outputs.should_skip != 'true' }}
+ runs-on: windows-latest
+ strategy:
+ matrix:
+ include:
+ - msystem: MINGW64
+ test: win64
+ - msystem: MINGW32
+ test: win32
+ env:
+ OS_NAME: windows
+ TEST: ${{ matrix.test }}
+ steps:
+ - uses: msys2/setup-msys2@v2
+ with:
+ msystem: ${{ matrix.msystem }}
+ - run: git config --global core.autocrlf input
+ shell: bash
+ - uses: actions/checkout@v2
+ - uses: actions/cache@v2
+ with:
+ path: ~/.ccache
+ key: ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.ref }}:${{ github.sha }}
+ restore-keys: |
+ ccache-${{ runner.os }}-${{ matrix.test }}-${{ github.ref }}:
+ ccache-${{ runner.os }}-${{ matrix.test }}-
+ - run: |
+ ./scripts/test.sh deps
+ pacman --noconfirm -S --needed ccache
+ ccache -z
+ ccache -s
+ shell: msys2 {0}
+ - run: |
+ # the ccache package does not add any symlinks and the scripts in the
+ # mingw-w64-...-ccache packages don't work, so do this via CC
+ case "$TEST" in
+ win64)
+ export CC="ccache x86_64-w64-mingw32-gcc"
+ ;;
+ win32)
+ export CC="ccache i686-w64-mingw32-gcc"
+ ;;
+ esac
+ ./scripts/test.sh
+ shell: msys2 {0}
+ # sometimes streaming/threading tests hang completely
+ timeout-minutes: 30
+ - run: ccache -s
+ shell: msys2 {0}
+ - if: ${{ failure() }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: Logs ${{ github.job }}
+ path: config.log
+ retention-days: 5
+ - if: ${{ always() }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: ccache ${{ matrix.test }}
+ path: ccache.log
+ retention-days: 1
--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
- if test "$APPVEYOR" != "True"; then
+ if test "$OS_NAME" != "windows"; then
TARGET=
+ 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"
- CFLAGS="$CFLAGS -I$OPENSSL_DIR/include"
- LDFLAGS="-L$OPENSSL_DIR"
- export LDFLAGS
+ DEPS="base-devel git"
+ 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
;;
pkg install -y automake autoconf libtool pkgconf && \
pkg install -y bison flex gperf gettext $DEPS
;;
+ windows)
+ pacman --noconfirm -S --needed $DEPS
+ ;;
esac
exit $?
;;