forked from nanshe-org/rank_filter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (63 loc) · 2.05 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: c++
compiler: gcc
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
env:
matrix:
- PYTHON_VERSION="2.7" TST_VIGRA="true"
- PYTHON_VERSION="2.7"
- PYTHON_VERSION="3.4"
- PYTHON_VERSION="3.5"
- PYTHON_VERSION="3.6"
before_install:
# Move out of git directory to build root.
- git fetch --unshallow --tags
- git describe
- cd ../..
- pwd
install:
# Update C/C++ compilers to something with C++11 features.
- export EXT_CC=/usr/bin/gcc-4.8
- export EXT_CXX=/usr/bin/g++-4.8
# Download and configure conda.
- wget http://repo.continuum.io/miniconda/Miniconda`echo ${PYTHON_VERSION:0:1} | grep 3`-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes
- conda config --set show_channel_urls True
- conda config --add channels conda-forge
- source activate root
- conda update --all
# Fix root environment to have the correct Python version.
- touch $HOME/miniconda/conda-meta/pinned
- echo "python ${PYTHON_VERSION}.*" >> $HOME/miniconda/conda-meta/pinned
- conda install python=$PYTHON_VERSION
# Install basic conda dependencies.
- touch $HOME/miniconda/conda-meta/pinned
- conda install conda-build
- conda install jinja2
# Return to the git repo.
- cd $TRAVIS_REPO_SLUG
# Get the version.
- VERSION=`python setup.py --version`
- echo $VERSION
# Create the test environment and install dependencies.
- conda create -n testenv python=$PYTHON_VERSION numpy
- source activate testenv
# Clean up downloads as there are quite a few and they waste space/memory.
- conda clean -tipsy
- rm -rfv $HOME/.cache/pip
script:
# Building the recipe will run the tests too.
- mv .git/shallow .git/shallow-not || true
- conda build --python $PYTHON_VERSION rank_filter.recipe
- mv .git/shallow-not .git/shallow || true
# Run the benchmarks.
- conda install --use-local -n testenv rank_filter==$VERSION
- src/benchmark_rank_filter.py