Require pybind 2.6 from environment for gmxapi Python package extension module.
[alexxy/gromacs.git] / python_packaging / sample_restraint / .travis.yml
1 # Recipe for build and integration testing on Travis-CI
2
3 # Try beta version of new travis-yml checker
4 version: "= 0"
5 # For extra debugging of failed jobs, see
6 # https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Locally-in-a-Docker-Image
7
8 os: linux
9 dist: xenial
10 language: cpp
11
12 # If we set 'ccache: true', Travis installs replacement ccache wrappers of system compilers, which we don't want,
13 # so we'll do our own ccache management.
14 # Note the heuristics for whether cache is shared or distinct:
15 # https://docs.travis-ci.com/user/caching/#Caches-and-build-matrices
16 cache:
17   pip: true
18   directories:
19     # Note: if a cache store forks due to a stage with parallel jobs that Travis identifies as part of the same flow,
20     # we must make sure that the parallel jobs do not write to any of the same caches. Also note that all stages use the
21     # same cache, so early stage jobs may see caches from later stages from previous builds in the same branch.
22     - $HOME/.ccache_gromacs
23     - $HOME/.ccache_py
24 # Allows us to build and install GROMACS in one CI stage, then use the installation in a subsequent stage
25 #    - $HOME/install
26
27 compiler: gcc
28
29 env:
30 # Python 2.7 and 3.6 are the only generations provided by pyenv on Travis-CI out-of-the-box
31   - PY=2.7
32   - PY=3.6
33
34 addons:
35   apt:
36     sources:
37     - sourceline: 'ppa:ubuntu-toolchain-r/test'
38     packages:
39     - cmake
40     - cmake-data
41     - doxygen
42     - libblas-dev
43     - libcr-dev
44     - libfftw3-dev
45     - liblapack-dev
46     - libmpich-dev
47     - libxml2-dev
48     - mpich
49
50 # Set up for all jobs
51 before_install:
52   - pyenv versions
53   # get exactly one Python version: the last listed patch version for the selected minor version
54   - pyenv whence python${PY} && export PY_VER=`pyenv whence python${PY} | tail -1`
55   - pyenv shell $PY_VER && pyenv shell
56 #  - python-config --includes
57   - pyenv prefix ${PY_VER} && export PYTHON_PREFIX=`pyenv prefix ${PY_VER}`
58   - pyenv which python && export PYTHON=`pyenv which python`
59   - source ./ci_scripts/set_compilers
60
61 install:
62   - export CCACHE_DIR=$HOME/.ccache_gromacs
63   - ccache -s
64   - ./ci_scripts/install_gromacs_2019.sh
65 # Need to update infrastructure for new CMake version requirements to build against devel.
66 #  - if [ "${TRAVIS_BRANCH}" != "master" ] ; then ./ci_scripts/install_gromacs_devel.sh ; fi
67
68 before_script:
69   - export CCACHE_DIR=$HOME/.ccache_py
70   - ccache -s
71   - pip install --upgrade pip setuptools
72   - pip install --upgrade packaging
73   - pip install --no-cache-dir --upgrade --no-binary ":all:" --force-reinstall networkx mpi4py MarkupSafe
74   - pip install pytest numpy networkx sphinx sphinx_rtd_theme
75
76 script:
77   - source $HOME/install/gromacs_2019/bin/GMXRC && ./ci_scripts/pygmx_0_0_7.sh
78   - ./ci_scripts/sample_restraint.sh
79 # Need to update infrastructure for new CMake version requirements to build against devel.
80 #  - |
81 #    if [ "${TRAVIS_BRANCH}" != master ] ; then
82 #      source $HOME/install/gromacs_devel/bin/GMXRC
83 #      ./ci_scripts/pygmx_devel.sh
84 #      ./ci_scripts/sample_restraint.sh
85 #    fi