Skip to content

Commit

Permalink
Make .travis.yml more readable with YAML multi line syntax "|".
Browse files Browse the repository at this point in the history
  • Loading branch information
Jun Aruga committed Sep 16, 2018
1 parent eee8135 commit 2af3d1c
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .travis.yml
Expand Up @@ -22,18 +22,32 @@ addons:
- cmake-data

before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then CMAKE_INSTALLER=install-cmake.sh && curl -sSL https://cmake.org/files/v3.11/cmake-3.11.3-Linux-x86_64.sh -o ${CMAKE_INSTALLER} && chmod +x ${CMAKE_INSTALLER} && sudo ./${CMAKE_INSTALLER} --prefix=/usr/local --skip-license; fi
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
CMAKE_INSTALLER=install-cmake.sh && \
curl -sSL https://cmake.org/files/v3.11/cmake-3.11.3-Linux-x86_64.sh -o ${CMAKE_INSTALLER} && \
chmod +x ${CMAKE_INSTALLER} && \
sudo ./${CMAKE_INSTALLER} --prefix=/usr/local --skip-license
fi
- alias cmake=/usr/local/bin/cmake
- export PATH=/usr/local/bin/cmake/bin:/usr/local/bin:${PATH}
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then echo "need cmake 3.2"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update && brew install ccache; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew upgrade cmake; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
echo "need cmake 3.2" && \
brew update && \
brew install ccache && \
brew upgrade cmake && \
export PATH="/usr/local/opt/ccache/libexec:$PATH"
fi
- mkdir antsbin
- cd antsbin

script:
- cmake -DRUN_LONG_TESTS=OFF -DRUN_SHORT_TESTS=ON ./.. && make -j 2 && cd ANTS-build/ && make test
- |
cmake -DRUN_LONG_TESTS=OFF -DRUN_SHORT_TESTS=ON ./.. && \
make -j 2 && \
cd ANTS-build/ && \
make test
notifications:
email:
Expand Down

0 comments on commit 2af3d1c

Please sign in to comment.