-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.travis.yml
108 lines (94 loc) · 3.64 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
language: python
#cache: pip
services: mongodb
env:
global:
- ABINIT_VERSION=8.10.1
- ABIPY_PYTEST=yes
- OPENBLAS_NUM_THREADS=1
- OMP_NUM_THREADS=1
# We don't actually use the Travis Python but conda
matrix:
include:
- os: linux
python: 3.6
env:
- ABIPY_INSTALLER=pip
- os: linux
python: 3.7
env:
- ABIPY_INSTALLER=pip ABIPY_COVERALLS=yes
- os: linux
python: 3.7
env:
- ABIPY_INSTALLER=conda
#dist: precise
sudo: false
install:
- env
#- set -ev # exit on first error, print each command
- ulimit -s unlimited
- |
if [ "${ABIPY_INSTALLER}" == "pip" ]; then
# pip-based installation.
source dev_scripts/conda_get.sh # Needed for Abinit
#echo "Installing abinit from abinit channel ..."
#conda config --add channels conda-forge
#conda install -y -c abinit abinit=${ABINIT_VERSION}
#abinit --version
#abinit --build
# Install python code in the same env as ABINIT
source activate abinit-environment
travis_wait pip install -r requirements.txt
travis_wait pip install -r requirements-optional.txt
elif [ "${ABIPY_INSTALLER}" == "conda" ]; then
# Python software stack is installed in test-environment while ABINIT in abinit-environment
# hence we need to activate abinit-environment before running ABINT.
source dev_scripts/conda_get.sh
conda config --add channels abinit
source dev_scripts/conda_install.sh
#conda uninstall -y mongoengine
#pip install mongoengine -U
#conda uninstall -y pymatgen
#conda uninstall -y abipy
fi
- pip install coverage -U
- pip install pytest-cov -U
# Use gmatteo's pymatgen fork
#- git clone --depth=50 https://github.com/gmatteo/pymatgen.git && cd pymatgen && python setup.py install && cd ../
#- git clone --depth=50 https://github.com/gmatteo/pymatgen.git && cd pymatgen && pip install -r requirements.txt && pip install -r requirements-optional.txt && python setup.py install && cd ../
# Use pymatgen master
#- git clone --depth=50 https://github.com/materialsproject/pymatgen.git && cd pymatgen && pip install -r requirements.txt && pip install -r requirements-optional.txt && python setup.py install && cd ../
#- rm -rf pymatgen
# Install abipy from github (develop)
#- git clone --depth=50 https://github.com/abinit/abipy.git && cd abipy && python setup.py install && cd ../
#- git clone --depth=50 https://github.com/abinit/abipy.git && cd abipy && pip install -r requirements.txt && pip install -r requirements-optional.txt && python setup.py install && cd ../
#- python setup.py install
- mkdir -p ${HOME}/.abinit/abipy
- cp ./dev_scripts/travis_scheduler.yml ${HOME}/.abinit/abipy/scheduler.yml
- cp ./dev_scripts/travis_manager.yml ${HOME}/.abinit/abipy/manager.yml
- rm -rf abipy
- ./dev_scripts/pyclean.py .
#before_script:
# This to run tests requiring a graphical user e.g. mayavi
# https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
#- "export DISPLAY=:99.0"
#- "sh -e /etc/init.d/xvfb start"
#- sleep 3 # give xvfb some time to start
# https://github.com/travis-ci/travis-ci/issues/6307
#- if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then rvm get head; fi
# command to run tests
script: ./dev_scripts/runtests.sh
branches:
only:
- master
- develop
after_success:
- if [[ "${ABIPY_COVERALLS}" == "yes" ]]; then coveralls; fi
notifications:
email:
recipients:
on_success: change
on_failure: always