travis: Define a Windows build test using MinGW
authorMartin Willi <martin@revosec.ch>
Thu, 8 May 2014 15:08:42 +0000 (17:08 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 4 Jun 2014 14:22:43 +0000 (16:22 +0200)
.travis.yml
scripts/test.sh

index 2a23fea..697425f 100644 (file)
@@ -37,3 +37,5 @@ matrix:
   include:
     - compiler: gcc
       env: TEST=dist
+    - compiler: gcc
+      env: TEST=win MONOLITHIC=yes
index b70e3c0..8824817 100755 (executable)
@@ -50,6 +50,22 @@ all)
                  libnm-glib-dev libnm-glib-vpn-dev libpcsclite-dev libpam0g-dev
                  binutils-dev libunwind7-dev libjson0-dev"
        ;;
+win)
+       CONFIG="--host=x86_64-w64-mingw32 --disable-defaults --enable-svc --enable-ikev2
+                       --enable-ikev1 --enable-static --enable-test-vectors --enable-nonce
+                       --enable-constraints --enable-revocation --enable-pem --enable-pkcs1
+                       --enable-pkcs8 --enable-x509 --enable-pubkey --enable-acert
+                       --enable-eap-tnc --enable-eap-ttls --enable-eap-identity
+                       --enable-tnccs-20 --enable-imc-attestation --enable-imv-attestation
+                       --enable-imc-os --enable-imv-os --enable-tnc-imv --enable-tnc-imc
+                       --enable-pki --enable-swanctl"
+       # no make check for Windows binaries
+       TARGET=
+       CFLAGS="$CFLAGS -mno-ms-bitfields"
+       DEPS="gcc-mingw-w64-x86-64 binutils-mingw-w64-x86-64 gcc-mingw-w64-base
+                 mingw-w64-dev"
+       CC="x86_64-w64-mingw32-gcc"
+       ;;
 dist)
        TARGET=distcheck
        ;;
@@ -70,5 +86,5 @@ CONFIG="$CONFIG
        --enable-monolithic=${MONOLITHIC-no}
        --enable-leak-detective=${LEAK_DETECTIVE-no}"
 
-echo "$ ./configure $CONFIG && make $TARGET"
-CFLAGS="$CFLAGS" ./configure $CONFIG && make -j4 $TARGET
+echo "$ CC="$CC" CFLAGS="$CFLAGS" ./configure $CONFIG && make $TARGET"
+CC="$CC" CFLAGS="$CFLAGS" ./configure $CONFIG && make -j4 $TARGET