Skip to content

Commit

Permalink
Avoid use of cmd.exe in Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
lichray committed May 13, 2020
1 parent 33101e7 commit 15e4d44
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cmake_minimum_required(VERSION 3.6)
project(ARGPARSE)

if(MSVC)
# Force to always compile with W4
Expand Down
4 changes: 4 additions & 0 deletions tools/build.bat
Original file line number Diff line number Diff line change
@@ -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 changes: 4 additions & 0 deletions tools/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DARGPARSE_BUILD_TESTS=ON
ninja -C build

0 comments on commit 15e4d44

Please sign in to comment.