Skip to content

Commit

Permalink
Add CMake 3.17 to Travis-CI build.
Browse files Browse the repository at this point in the history
  • Loading branch information
eirrgang committed Apr 15, 2020
1 parent d88b84b commit 553cacf
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
22 changes: 20 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ compiler: gcc

env:
# Python 2.7 and 3.6 are the only generations provided by pyenv on Travis-CI out-of-the-box
- CI_MPI=0 PY=3.5
- CI_MPI=0 PY=3.6
- CI_MPI=0 PY=3.7
- CI_MPI=0 PY=3.8
Expand All @@ -35,7 +34,6 @@ addons:
apt:
packages:
- doxygen
- g++-6
- libblas-dev
- libcr-dev
- libfftw3-dev
Expand All @@ -49,6 +47,26 @@ before_install:
- source ./ci_scripts/set_compilers
- export CCACHE_DIR=$HOME/.ccache_gmxapi
- source ./ci_scripts/set_python
# Ref https://riptutorial.com/cmake/example/4723/configure-travis-ci-with-newest-cmake
# first we create a directory for the CMake binaries
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir ${DEPS_DIR} && cd ${DEPS_DIR}
# we use wget to fetch the cmake binaries
- travis_retry wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v3.17.1/cmake-3.17.1-Linux-x86_64.tar.gz
# this is optional, but useful:
# do a quick checksum to ensure that the archive we downloaded did not get compromised
- echo "23dd30da0bacf0e644d82298907b8e03edbc59c4ed40839afdeeb3b86e66bc93 cmake-3.17.1-Linux-x86_64.tar.gz" > cmake_sha256.txt
- sha256sum -c cmake_sha256.txt
# extract the binaries; the output here is quite lengthy,
# so we swallow it to not clutter up the travis console
- tar -xvf cmake-3.17.1-Linux-x86_64.tar.gz > /dev/null
- mv cmake-3.17.1-Linux-x86_64 cmake-install
# add both the top-level directory and the bin directory from the archive
# to the system PATH. By adding it to the front of the path we hide the
# preinstalled CMake with our own.
- PATH=${DEPS_DIR}/cmake-install:${DEPS_DIR}/cmake-install/bin:$PATH
# don't forget to switch back to the main build directory once you are done
- cd ${TRAVIS_BUILD_DIR}

install:
- export CCACHE_DIR=$HOME/.ccache_gmxapi
Expand Down
4 changes: 2 additions & 2 deletions ci_scripts/set_compilers
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export MPICC=`which mpicc`
export MPICXX=`which mpicxx`
export CC=`which gcc-6`
export CXX=`which g++-6`
export CC=`which gcc`
export CXX=`which g++`
export CCACHE_COMPILERCHECK=content
${CC} --version
${CXX} --version
Expand Down

0 comments on commit 553cacf

Please sign in to comment.