forked from GalSim-developers/GalSim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
85 lines (67 loc) · 2.99 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
branches:
only:
- master
- releases/2.0
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
compiler:
- g++
before_install:
- export PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
- sudo apt-get -qq update
- sudo apt-get install -y python-dev libfftw3-dev libav-tools libeigen3-dev
# List current contents of directories that should be being cached.
- ls -l $HOME
- if test -d $HOME/des_data; then ls -l $HOME/des_data; fi
# Get the des data needed for the check_des test.
- if ! test -d $HOME/des_data || ! test -f $HOME/des_data/DECam_00154912_01.fits.fz; then wget http://www.sas.upenn.edu/~mjarvis/des_data.tar.gz && tar xfz des_data.tar.gz -C $HOME --wildcards *_01*; fi
- ln -s $HOME/des_data examples/des/
cache:
ccache: true
pip: true
directories:
- $HOME/des_data
install:
# Install the requirements
# Use -U to make sure we get the latest versions of everything so we notice any
# incompatibilities as soon as possible.
- pip install -U -r requirements.txt
# Also some things just required for tests
# (This includes scipy, which can take a while to install. So tell Travis to be patient.)
- travis_wait 30 pip install -U -r test_requirements.txt
# astroplan isn't available on 2.7
- if [[ $TRAVIS_PYTHON_VERSION > 3.0 ]]; then pip install astroplan; fi
# Note: matplotlib is only required because starlink has an `import matplotlib` in their
# code, despite that not being a dependency.
- pip install matplotlib
# Finally, a few things for the code coverage
- pip install nose codecov coveralls coverage
- pip list
script:
# Install GalSim
- python setup.py install
# If galsim_download_cosmos.py changed, then run it.
- echo $TRAVIS_COMMIT_RANGE
- if git --no-pager diff $TRAVIS_COMMIT_RANGE --name-only | grep -Fxq 'galsim/download_cosmos.py'; then galsim_download_cosmos -s 23.5 -v1; fi
- cd tests
# Use this rather than setup.py test, so we can get the coverage options.
- "nosetests test*.py --with-coverage --cover-package=galsim --with-doctest --cover-erase"
# Without cover-erase, this will append to the .coverage file
- "nosetests run_examples.py --with-coverage --cover-package=galsim --with-doctest"
after_success:
# The multiprocessing stages don't get properly incorporated into the .coverage file unless
# we do this command. (Some of the .coverage.* files are in the ../examples directory.)
- coverage combine . ../examples ../examples/great3 ../examples/des
- coverage xml
# If we start doing multiple python versions here, then only send the report for one of them.
# Otherwise the reported results get weird.
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then coveralls; fi
# Codecov is better at combining the results from different python versions.
- codecov
before_cache:
- rm -rfv $HOME/.cache/pip/log
- rm -rfv $HOME/.cache/pip/http