-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
111 lines (106 loc) · 3.17 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
language: python
matrix:
include:
- python: '2.7'
env: CATEGORY="nightly" EXTRAS="yes"
- python: '3.5'
env: CATEGORY="nightly" EXTRAS="yes"
- python: '3.6'
env: CATEGORY="nightly" EXTRAS="yes"
#- python: '3.7'
# env: CATEGORY="nightly" EXTRAS="yes"
# dist: xenial
# sudo: yes
install:
- sudo apt-get update --quiet
- sudo apt-get install gfortran
#
# Setup miniconda and activate the testenv environment
#
- if [[ "${TRAVIS_PYTHON_VERSION:0:1}" == "2" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
#
# Update conda, then force it to NOT update itself again
#
- conda config --set always_yes yes
- conda update -q -y -c anaconda conda
- conda config --set auto_update_conda false
#
- conda create -f -q -y -n testenv python=${TRAVIS_PYTHON_VERSION}
- source activate testenv
#
# Install supporting packages
#
- conda install -q -y -c conda-forge --no-deps setuptools pip
#
- which python
- python --version
- which pip
- pip --version
#
- if [ "${TRAVIS_PYTHON_VERSION}" == "2.6" ]; then pip install 'cryptography<2.1.1'; fi
- if [ "${TRAVIS_PYTHON_VERSION}" == "2.6" ]; then pip install 'pyOpenSSL<17.5'; fi
- if [ "${TRAVIS_PYTHON_VERSION}" == "2.6" ]; then pip install urllib3; fi
- if [ "${TRAVIS_PYTHON_VERSION}" == "2.6" ]; then pip install ordereddict; fi
#
- pip install coverage
- pip install codecov
- if [ -n "${YAML}" ]; then
pip install --quiet pyyaml;
fi
#- if [ -n "${PYRO}" ]; then
# pip install --quiet $PYRO;
# fi
#- pip install --quiet xlrd
#- pip install --quiet openpyxl
#- pip install sphinx_rtd_theme
#- conda install -q -y -c anaconda pandas networkx
#- if [ "${TRAVIS_PYTHON_VERSION}" != "2.6" -a -n "${EXTRAS}" ]; then
# conda install -q -y -c anaconda scipy;
# fi
#
# Install Pyomo extras
#
- if [ -n "${EXTRAS}" ]; then
conda install -q -y -c conda-forge --no-deps pyomo.extras;
fi
#
# Install freely available solvers
#
- conda install -q -y -c conda-forge glpk
- glpsol -v
- conda install -q -y -c conda-forge ipopt
- ipopt -v
#
# Clone but don't install pyomo-model-libraries
#
#- git clone --quiet https://github.com/Pyomo/pyomo-model-libraries.git
#
# Install PyUtilib (master branch)
#
- pip install --quiet git+https://github.com/PyUtilib/pyutilib
#
# Install Pyomo (master branch)
#
- pip install --quiet git+https://github.com/Pyomo/pyomo
#
# Install this package
#
- python setup.py develop
#
# Verify that the Python interpreter hasn't changed (occasionally conda
# installers will change the installed Python!!)
#
- which python
- python --version
- if [ `python --version |& grep "Python ${TRAVIS_PYTHON_VERSION}" | wc -l` -eq 0 ]; then
exit 1;
fi
script:
- nosetests -x .