forked from grackle-project/grackle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
111 lines (101 loc) · 2.47 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
109
110
111
language: python
sudo: false
cache:
directories:
- $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853
- $YT_DATA_DIR
pip: true
addons:
apt:
update: true
packages:
- csh
- libhdf5-serial-dev
- gfortran
- libtool
env:
global:
YT_DATA_DIR=$HOME/yt_test
before_install:
- |
echo "backend : Agg" > $HOME/matplotlibrc
export MATPLOTLIBRC=$HOME
if [ ! -d $YT_DATA_DIR/IsolatedGalaxy ]; then
# Download test data
mkdir -p $YT_DATA_DIR
pushd $YT_DATA_DIR
wget --quiet http://yt-project.org/data/IsolatedGalaxy.tar.gz
tar xzf IsolatedGalaxy.tar.gz
rm IsolatedGalaxy.tar.gz
popd
fi
install:
- |
# setup environment
ccache -s
# Upgrade pip and setuptools and wheel to get clean install
pip install --upgrade pip
pip install --upgrade wheel
pip install --upgrade setuptools
# Install dependencies
pip install numpy cython h5py matplotlib fastcache flake8 pytest yt
# Install Grackle
./configure
cd src/clib
make machine-linux-gnu
if [[ $TRAVIS_BUILD_STAGE_NAME = "Omp" ]]; then
make omp-on
fi
make
mkdir -p $HOME/local
make install
export LD_LIBRARY_PATH=$HOME/local/lib:$LD_LIBRARY_PATH
if [[ $TRAVIS_BUILD_STAGE_NAME != "Omp" ]]; then
cd ../python
python setup.py develop
fi
cd ../
jobs:
include:
- stage: tests
name: "tests with Python 2.7"
python: 2.7
script: py.test python/tests
- stage: tests
name: "tests with Python 3.5"
python: 3.5
script: py.test python/tests
- stage: tests
name: "tests with Python 3.6"
python: 3.6
script: py.test python/tests
- stage: docs
name: "docs build test"
python: 3.6
before_install: skip
install:
- |
# setup environment
ccache -s
# Upgrade pip and setuptools and wheel to get clean install
pip install --upgrade pip
pip install --upgrade wheel
pip install --upgrade setuptools
# Install dependencies
pip install sphinx
script:
- |
cd doc/source
python -m sphinx -M html "." "_build" -W
- stage: omp
name: "Code example tests with OpenMP"
python: 3.6
before_install: skip
script:
- |
export OMP_NUM_THREADS=4
py.test python/tests/test_code_examples.py
stages:
- tests
- omp
- docs