Browse code

travis: add Visual Studio build

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1573162174-28461-1-git-send-email-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19035.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>

Lev Stipakov authored on 2019/11/08 06:29:34
Showing 4 changed files
... ...
@@ -24,6 +24,13 @@ env:
24 24
 
25 25
 matrix:
26 26
   include:
27
+    - env:
28
+      - SSLLIB="openssl"
29
+      - OPENSSL_VERSION="1.1.1d"
30
+      - P7Z="c:\Program Files\7-Zip\7z.exe"
31
+      - CC="cl"
32
+      os: windows
33
+      compiler: cl
27 34
     - env: SSLLIB="openssl" RUN_COVERITY="1"
28 35
       os: linux
29 36
       compiler: gcc
... ...
@@ -89,7 +96,7 @@ cache:
89 89
 
90 90
 install:
91 91
   - if [ ! -z "${CHOST}" ]; then unset CC; fi
92
-  - .travis/build-deps.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
92
+  - .travis/run-build-deps.sh
93 93
 
94 94
 before_script:
95 95
   - .travis/coverity.sh
... ...
@@ -1,6 +1,11 @@
1 1
 #!/bin/sh
2 2
 set -eux
3 3
 
4
+if [ "${TRAVIS_OS_NAME}" = "windows" ]; then
5
+	PATH="/c/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin/":$PATH
6
+	MSBuild.exe openvpn.sln //p:Platform=x64 && exit 0
7
+fi
8
+
4 9
 if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
5 10
 	export LD_LIBRARY_PATH="${PREFIX}/lib:${LD_LIBRARY_PATH:-}"
6 11
 fi
... ...
@@ -1,6 +1,15 @@
1 1
 #!/bin/sh
2 2
 set -eux
3 3
 
4
+if [ "${TRAVIS_OS_NAME}" = "windows" ]; then
5
+    choco install strawberryperl nasm
6
+    cd ..
7
+    git clone https://github.com/openvpn/openvpn-build.git
8
+    cd openvpn-build
9
+    PATH="/c/Strawberry/perl/bin:":$PATH MODE=DEPS msvc/build.bat
10
+    exit 0
11
+fi
12
+
4 13
 # Set defaults
5 14
 PREFIX="${PREFIX:-${HOME}/opt}"
6 15
 
7 16
new file mode 100755
... ...
@@ -0,0 +1,10 @@
0
+#!/bin/sh
1
+set -eux
2
+
3
+if [ "${TRAVIS_OS_NAME}" = "windows" ]; then
4
+    # for windows we need to print output since openssl build
5
+    # might take more than 10 minutes, which causes build abort
6
+    .travis/build-deps.sh
7
+else
8
+    .travis/build-deps.sh > build-deps.log 2>&1 || (cat build-deps.log && exit 1)
9
+fi