-
Notifications
You must be signed in to change notification settings - Fork 217
/
.travis.yml
63 lines (63 loc) · 1.59 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
language: cpp
matrix:
include:
- os: linux
env: PYTHON=2.7
- os: linux
env: PYTHON=3.5
- os: linux
env: CONDA=2.7
- os: linux
env: CONDA=3.5
- os: osx
env: PYTHON=2.7
- os: osx
env: PYTHON=3.6
- os: osx
env: CONDA=2.7
- os: osx
env: CONDA=3.5
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- deadsnakes
- kubuntu-backports
packages:
- g++-4.8
- python3.5
- python3.5-dev
- cmake
before_install:
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX=g++-4.8 CC=gcc-4.8; fi
if [ -n "$PYTHON" ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "${PYTHON:0:1}" = "3" ]; then
brew update; brew install python3;
fi
pip install --user --upgrade pip virtualenv
virtualenv -p python$PYTHON venv
source venv/bin/activate
elif [ -n "$CONDA" ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ]; then OS=Linux-x86_64; else OS=MacOSX-x86_64; fi
wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda${CONDA:0:1}-latest-$OS.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda config --set always_yes yes --set changeps1 no
conda config --add channels conda-forge
conda update -q conda
conda install -q conda-build
conda create -q -n test-environment python=$CONDA
source activate test-environment
fi
install:
- |
if [ -n "$PYTHON" ]; then
python setup.py sdist
pip install --verbose dist/*.tar.gz
elif [ -n "$CONDA" ]; then
conda build conda.recipe
conda install --use-local cmake_example
fi
script:
- python tests/test.py