Merge pull request #31 from zhihaoy/ci-overhaul

Use OSX CI and Windows to test other toolchains
This commit is contained in:
Pranav Srinivas Kumar 2019-08-05 11:37:39 -05:00 committed by GitHub
commit 1635efdc44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,23 +1,31 @@
sudo: false
language: cpp
compiler:
- gcc
- clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-5.0
packages:
- g++-7
- clang-5.0
env:
- CXXFLAGS="-std=c++17"
matrix:
include:
- os: linux
dist: bionic
language: cpp
compiler: gcc
- os: osx
osx_image: xcode10.2
language: cpp
compiler: clang
- os: windows
language: bash
env: CXX=cl.exe
install:
- "[ $CXX = g++ ] && export CXX=g++-7 || true"
- "[ $CXX = clang++ ] && export CXX=clang++-5.0 || true"
- |
if [[ $TRAVIS_OS_NAME == 'windows' ]]; then
choco install ninja cmake
elif [[ $TRAVIS_OS_NAME == 'osx' ]]; then
export PATH=~/Library/Python/3.7/bin:$PATH
pip3 install --user ninja cmake
else
pip install --user ninja cmake
fi
script:
- cd test
- mkdir build && cd build
- cmake ../.
- make && ./tests
- |
if [[ $TRAVIS_OS_NAME == 'windows' ]]; then
cmd.exe /C '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64 && cmake -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DARGPARSE_BUILD_TESTS=ON && ninja -C build'
else
cmake -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DARGPARSE_BUILD_TESTS=ON && ninja -C build
fi
- ./build/test/tests