Merge pull request #77 from lichray/fix-ci

Avoid use of cmd.exe in Travis
This commit is contained in:
Pranav 2020-05-12 23:20:57 -05:00 committed by GitHub
commit f1ccf8e1ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 3 deletions

View File

@ -26,13 +26,14 @@ install:
export PATH=~/Library/Python/3.7/bin:$PATH
pip3 install --user ninja cmake
else
pipenv global 3.6
pip install --user ninja cmake
fi
script:
- |
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'
tools/build.bat
else
cmake -Bbuild -G Ninja -DCMAKE_BUILD_TYPE=Release -DARGPARSE_BUILD_TESTS=ON && ninja -C build
sh tools/build.sh
fi
- ./build/test/tests

View File

@ -1,5 +1,4 @@
cmake_minimum_required(VERSION 3.6)
project(ARGPARSE)
if(MSVC)
# Force to always compile with W4

4
tools/build.bat Normal file
View File

@ -0,0 +1,4 @@
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DARGPARSE_BUILD_TESTS=ON
ninja -C build

4
tools/build.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DARGPARSE_BUILD_TESTS=ON
ninja -C build