-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.travis.yml
More file actions
77 lines (65 loc) · 2.03 KB
/
Copy path.travis.yml
File metadata and controls
77 lines (65 loc) · 2.03 KB
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
language: python
os:
- linux
python:
- "2.7"
- "3.6"
compiler:
- gcc
env:
- INSTALL=yes
- INSTALL=no
install:
- sudo apt-get install -qq build-essential python-scipy python-matplotlib python-pip
- export CONDA_BASE="http://repo.continuum.io/miniconda/Miniconda"
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ "${TRAVIS_PYTHON_VERSION}" == 2* ]]; then
wget ${CONDA_BASE}2-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget ${CONDA_BASE}3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi
else
if [[ "${TRAVIS_PYTHON_VERSION}" == 2* ]]; then
wget ${CONDA_BASE}2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget ${CONDA_BASE}3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
fi
- bash miniconda.sh -b -p ${HOME}/miniconda
- export PATH="${HOME}/miniconda/bin:${PATH}"
- hash -r
# Create the testing environment
# ------------------------------
- conda config --set always_yes yes
- conda config --set changeps1 no
- conda config --set show_channel_urls true
- conda config --add channels conda-forge
- conda update --quiet conda
- ENV_NAME="test-environment"
- conda create --quiet -n ${ENV_NAME} python=${TRAVIS_PYTHON_VERSION}
- source activate ${ENV_NAME}
# Customise the testing environment
# ---------------------------------
- conda install --quiet --file conda-requirements.txt
- pip install --user coveralls progressbar-latest metric-learn nestle
# Summerise environment
# ---------------------
- conda list
- conda info -a
# Install and test
- 'echo "backend: Agg" > matplotlibrc'
- make -C nested_sampling/clustering;
- if [[ "$INSTALL" == "yes" ]]; then
python setup.py install;
else
export PYTHONPATH=$PWD;
export LD_LIBRARY_PATH="${PWD}/nested_sampling/clustering;${LD_LIBRARY_PATH}";
fi
- coverage run setup.py test
script:
- cd examples/lighthouse/
- 'echo "backend: Agg" > matplotlibrc'
- python lighthouse.py 200
- python lighthouse.py 1
- cd ../..
after_success: coveralls