Travis: add windows target

Mimic the appveyor cfg without the artifact deployment.
Also upgrade to Visual Studio 2017/v141 toolset.
pull/517/head^2
Maximilian Federle 2020-10-16 21:11:42 +02:00 committed by phkahler
parent 6558cb9ebe
commit 0288c0a98b
3 changed files with 24 additions and 0 deletions

View File

@ -12,6 +12,11 @@ jobs:
dist: bionic dist: bionic
install: ./.travis/install-debian.sh install: ./.travis/install-debian.sh
script: ./.travis/build-debian.sh script: ./.travis/build-debian.sh
- stage: test
name: "Windows Visual Studio 2017"
os: windows
install: ./.travis/install-windows.sh
script: ./.travis/build-windows.sh
- stage: deploy - stage: deploy
name: "OSX" name: "OSX"
os: osx os: osx

16
.travis/build-windows.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh -xe
MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
export PATH=$MSBUILD_PATH:$PATH
if echo $TRAVIS_TAG | grep ^v; then BUILD_TYPE=RelWithDebInfo; else BUILD_TYPE=Debug; fi
mkdir build
cd build
cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=$BUILD_TYPE
MSBuild.exe "src/solvespace.vcxproj"
MSBuild.exe "src/solvespace-cli.vcxproj"
MSBuild.exe "test/solvespace-testsuite.vcxproj"
bin/$BUILD_TYPE/solvespace-testsuite.exe

3
.travis/install-windows.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh -xe
git submodule update --init