solvespace/.travis/build-windows.sh
Koen Schmeets 8f509f1452
Travis: CI improvements and fixing edge builds (#766)
- Fix release notes by using edge deploy provider, see: https://github.com/travis-ci/dpl/pull/1069
- Deploy only on master branch
- Move to arm64-graviton2
- Rename debian -> ubuntu
- Remove appveyor.yml
- Remove redundant deploy stage in build step names
- Get rid of bash code in files using sh, and explicitly use bash in sign-macos.sh script
- Add missing newline to build-windows.sh
- Build x86 for Windows
- Enable OpenMP in test builds
- Disable sanitizers on macOS test build
- Disallow failures on snap build
2020-10-24 11:08:40 +02:00

40 lines
969 B
Bash
Executable File

#!/bin/sh -xe
MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
export PATH=$MSBUILD_PATH:$PATH
mkdir build
cd build
if [ "$1" = "release" ]; then
if [ "$2" = "openmp" ]; then
ENABLE_OPENMP="ON"
else
ENABLE_OPENMP="OFF"
fi
BUILD_TYPE=RelWithDebInfo
cmake \
-G "Visual Studio 15 2017" \
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
-DENABLE_OPENMP="${ENABLE_OPENMP}" \
-DENABLE_LTO=ON \
-DCMAKE_GENERATOR_PLATFORM="Win32" \
..
else
BUILD_TYPE=Debug
cmake \
-G "Visual Studio 15 2017" \
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
-DENABLE_OPENMP="ON" \
-DCMAKE_GENERATOR_PLATFORM="Win32" \
..
fi
cmake --build . --config "${BUILD_TYPE}" -- -maxcpucount
bin/$BUILD_TYPE/solvespace-testsuite.exe
if [ "$2" = "openmp" ]; then
mv bin/$BUILD_TYPE/solvespace.exe bin/$BUILD_TYPE/solvespace-openmp.exe
fi