-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (81 loc) · 2.43 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
language: python
sudo: false
cache: pip
env:
global:
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
- SEGFAULT_SIGNALS=all
matrix:
- TOXENV=check
- TOXENV=docs
matrix:
include:
- python: '3.6'
os: linux
env:
- TOXENV=py36,report,codecov
- os: linux
env:
- TOXENV=py37,report,codecov
- CONDA_PYTHON_VERSION=3.7
- language: generic
os: osx
env:
- TOXENV=py36,report,codecov
allow_failures:
- env: TOXENV=docs
before_install:
- python --version
- uname -a
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then lsb_release -a; fi
install:
# Figure out which Python version we're testing
- export CONDA_PYTHON_VERSION=${CONDA_PYTHON_VERSION:-${TRAVIS_PYTHON_VERSION:-"3.6"}}
# We do this conditionally because it saves us some downloading if the
# version is the same.
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
elif [[ "$CONDA_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes
# Useful for debugging any issues with conda
- conda info -a
# Install packages using conda for ease with compiled dependencies (PyAV, h5py)
- conda create -q -n test-environment python=$CONDA_PYTHON_VERSION pip virtualenv
numpy hdf5 h5py pandas
- source activate test-environment
- conda install -n test-environment av tifffile -c conda-forge
- pip install tox
# Double-check versions installed
- which pip
- which tox
- python --version
- virtualenv --version
- pip --version
- tox --version
# Download test data
- mkdir -p data && pushd data
- |
if [[ $TOXENV == py* ]]; then
wget -O travis_data.tar.bz2 'https://liveuclac-my.sharepoint.com/:u:/g/personal/cceacoo_ucl_ac_uk/EZ4umIJF3oFHnQgzYbYHRfQBYjbA7JfsbCFYDFcpvxzKrw?e=Irtuyx&download=1' \
&& tar xjvf travis_data.tar.bz2 \
&& export SILVERLAB_DATA_DIR=`pwd`
fi
- popd
script:
- tox -v
after_failure:
- env
- more .tox/log/* | cat
- more .tox/*/log/* | cat
notifications:
email:
on_success: never
on_failure: always