forked from skorch-dev/skorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (38 loc) · 1.18 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
language: python
dist: xenial
python:
- "3.7.5"
- "3.6"
- "3.5" # TODO: drop support in 0.10.0
env:
- PYTORCH_VERSION="1.1.0"
- PYTORCH_VERSION="1.2.0"
- PYTORCH_VERSION="1.3.1"
- PYTORCH_VERSION="1.4.0"
- PYTORCH_VERSION="1.5.0"
cache:
apt: true
pip: true
timeout: 1000
directories:
- $HOME/cache
before_cache:
- find ${HOME}/conda/pkgs/ -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \;
install:
- sudo apt-get update
- mkdir -p ${HOME}/cache/pkgs
- "[ ! -f ${HOME}/cache/miniconda.sh ] && wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ${HOME}/cache/miniconda.sh || :"
- bash ${HOME}/cache/miniconda.sh -b -p ${HOME}/conda && export PATH=${HOME}/conda/bin:$PATH
- rm -rf ${HOME}/conda/pkgs && ln -s ${HOME}/cache/pkgs ${HOME}/conda/pkgs
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda create -y -n skorch-env python=${TRAVIS_PYTHON_VERSION}
- source activate skorch-env
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- python setup.py install
- conda install -c pytorch pytorch==${PYTORCH_VERSION}
script:
- pytest