-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path.travis.yml
77 lines (69 loc) · 2.4 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
sudo: false
language: python
cache:
directories:
- $HOME/.cache/pip
- $HOME/.ccache
matrix:
include:
- os: linux
python: 2.7
- os: linux
python: 3.5
- os: linux
python: 3.6
dist: trusty
branches:
only:
- master
notifications:
email: true
install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
sudo apt-get update;
fi;
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi;
else
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi;
fi;
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- export CONDA_BLD_PATH="$HOME/conda-bld"
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
- if [[ "$BRANCH" == "master" ]]; then
export CONDA_BUILD_ARGS_EXTRA="";
else
export CONDA_BUILD_ARGS_EXTRA="--no-anaconda-upload";
fi;
- pip install --upgrade pip
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda config --set anaconda_upload yes
- conda config --add channels menpo
- conda update -q conda
- conda info -a
- conda install -q -y pip requests conda-build anaconda-client
- conda create -q -n test-build-environment python=$TRAVIS_PYTHON_VERSION
- conda install -q -y -c menpo opencv3
- export PYTHON="$TRAVIS_PYTHON_VERSION"
- source activate test-build-environment
- export PYBOT_CONDA_BLD_OUTPUT="$(conda build tools/conda.recipe --output)"
- conda build tools/conda.recipe --python $TRAVIS_PYTHON_VERSION $CONDA_BUILD_ARGS_EXTRA
- conda convert -p all -o $CONDA_BLD_PATH $PYBOT_CONDA_BLD_OUTPUT
- conda install -q -y pybot --use-local
after_success:
- if [[ "$BRANCH" == "master" ]]; then
anaconda -v -t $ANACONDA_API_TOKEN upload -u $ANACONDA_USER --force $CONDA_BLD_PATH/**/*.tar.bz2;
fi;
script:
- python -c 'import pybot'