-
Notifications
You must be signed in to change notification settings - Fork 13
/
.travis.yml
84 lines (74 loc) · 3.39 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Recipe for build and integration testing on Travis-CI
# See article on Validating .travis.yml files:
# https://support.travis-ci.com/hc/en-us/articles/115002904174-Validating-travis-yml-files
# For extra debugging of failed jobs, see
# https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Locally-in-a-Docker-Image
dist: bionic
language: cpp
# Different compiler or env are supposed to trigger different caches, but I had a hard time diagnosing problems
# in gromacs-gmxapi until I specified a separate ccache for each matrix build element.
# Note the heuristics for whether cache is shared or distinct:
# https://docs.travis-ci.com/user/caching/#Caches-and-build-matrices
cache:
pip: true
directories:
# Note: if a cache store forks due to a stage with parallel jobs that Travis identifies as part of the same flow,
# we must make sure that the parallel jobs do not write to any of the same caches. Also note that all stages use the
# same cache, so early stage jobs may see caches from later stages from previous builds in the same branch.
- $HOME/.ccache_gmxapi
# Allows us to build and install GROMACS in one CI stage, then use the installation in a subsequent stage
# - $HOME/install
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.6
- CI_MPI=0 PY=3.7
- CI_MPI=0 PY=3.8
addons:
apt:
packages:
- doxygen
- libblas-dev
- libcr-dev
- libfftw3-dev
- liblapack-dev
- libmpich-dev
- libxml2-dev
- mpich
# Set up for all jobs
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
- ccache -s
- ./ci_scripts/install_gromacs_2020.sh
before_script:
- export CCACHE_DIR=$HOME/.ccache_gmxapi
- ccache -s
- ./ci_scripts/prepare_python.sh
script:
- source $HOME/install/gromacs_2020/bin/GMXRC && ./ci_scripts/test_installers.sh
- source $HOME/install/gromacs_2020/bin/GMXRC && ./ci_scripts/pygmx.sh
- source $HOME/install/gromacs_2020/bin/GMXRC && ./ci_scripts/sample_restraint.sh