-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
52 lines (52 loc) · 1.82 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
language: generic
sudo: false
env:
matrix:
- PYTHON_VERSION="2.7"
- PYTHON_VERSION="3.5"
- PYTHON_VERSION="3.6"
- PYTHON_VERSION="3.7"
before_install:
# Move out of git directory to build root.
- git fetch --unshallow --tags
- git describe
- cd ../..
- pwd
install:
# 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 config --add channels conda-forge/label/gcc7
- 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