forked from onnx/onnxmltools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (48 loc) · 1.62 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
dist: xenial
language: python
env:
- ONNX_ML=1
addons:
apt:
packages:
- build-essential
- curl
- git
python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
curl -L https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -o $HOME/miniconda.sh;
else
curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o $HOME/miniconda.sh;
fi
- export ONNX_VERSION="";
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.5" ]]; then
export ONNX_VERSION="==1.1.2";
fi
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
export ONNX_VERSION="==1.2.3";
fi
- cd $HOME && bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- export LD_LIBRARY_PATH="$HOME/miniconda/lib:$LD_LIBRARY_PATH"
- export LIBRARY_PATH="$HOME/miniconda/lib:$LIBRARY_PATH"
- export CPATH="$HOME/miniconda/include:$CPATH"
- conda config --set always_yes yes --set changeps1 no
- conda install -c conda-forge protobuf
- conda install -c conda-forge numpy
- conda install -c conda-forge cmake
- conda install -c conda-forge openmpi
- conda install -c conda-forge tensorflow
- cd $TRAVIS_BUILD_DIR && pip install -r requirements-dev.txt
- cd $TRAVIS_BUILD_DIR && pip install cntk
- cd $TRAVIS_BUILD_DIR && pip install -I "onnx$ONNX_VERSION"
- cd $TRAVIS_BUILD_DIR && export PYTHONPATH=pwd
- if [[ "$TRAVIS_PYTHON_VERSION" != "2.7" ]]; then
pip install onnxruntime;
fi
script:
- python -m pytest --cov=onnxmltools --cov-report=term --cov-report=html --cov-report=xml tests