forked from santoshphilip/eppy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
104 lines (94 loc) · 4.31 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
language: generic
dist: trusty
sudo: required
matrix:
include:
# Linux, not on master
- if: branch != master
os: linux
env: PYTHON=2.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1 NUMPY=True
- if: branch != master
os: linux
env: PYTHON=3.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1 NUMPY=True
# Linux, on master
- if: branch = master
os: linux
env: PYTHON=2.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1
- if: branch = master
os: linux
env: PYTHON=3.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1
- if: branch = master
os: linux
env: PYTHON=2.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1 NUMPY=True
- if: branch = master
os: linux
env: PYTHON=3.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1 NUMPY=True
# OSX, not on master
- if: branch != master
os: osx
env: PYTHON=2.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1 NUMPY=True
- if: branch != master
os: osx
env: PYTHON=3.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1 NUMPY=True
# OSX, on master
- if: branch = master
os: osx
env: PYTHON=2.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1
- if: branch = master
os: osx
env: PYTHON=3.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1
- if: branch = master
os: osx
env: PYTHON=2.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1 NUMPY=True
- if: branch = master
os: osx
env: PYTHON=3.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=9.0.1 ENERGYPLUS_SHA=bb7ca4f0da ENERGYPLUS_INSTALL_VERSION=9-0-1 NUMPY=True
before_install:
# install EnergyPlus
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then EXT=dmg; PLATFORM=Darwin; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then EXT=sh; PLATFORM=Linux; fi
- ENERGYPLUS_DOWNLOAD_BASE_URL=https://github.com/NREL/EnergyPlus/releases/download/v$ENERGYPLUS_VERSION
- ENERGYPLUS_DOWNLOAD_FILENAME=EnergyPlus-$ENERGYPLUS_VERSION-$ENERGYPLUS_SHA-$PLATFORM-x86_64
- ENERGYPLUS_DOWNLOAD_URL=$ENERGYPLUS_DOWNLOAD_BASE_URL/$ENERGYPLUS_DOWNLOAD_FILENAME.$EXT
- curl -SLO $ENERGYPLUS_DOWNLOAD_URL
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
sudo hdiutil attach $ENERGYPLUS_DOWNLOAD_FILENAME.$EXT;
sudo installer -pkg /Volumes/$ENERGYPLUS_DOWNLOAD_FILENAME/$ENERGYPLUS_DOWNLOAD_FILENAME.pkg -target /;
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo chmod +x $ENERGYPLUS_DOWNLOAD_FILENAME.$EXT;
echo "y\r" | sudo ./$ENERGYPLUS_DOWNLOAD_FILENAME.$EXT;
fi
- sudo rm $ENERGYPLUS_DOWNLOAD_FILENAME.$EXT
# install python for OSX
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O ~/miniconda.sh;
bash ~/miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
conda update --yes conda;
conda create --yes -n venv python=$PYTHON;
fi
# activate environment
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then source activate venv; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
virtualenv venv;
source venv/bin/activate;
fi
- python --version;
install:
- pip install --upgrade setuptools
- pip install --upgrade pip
- python setup.py install
# install numpy and remove tinynumpy if testing with numpy
- if [[ $NUMPY == numpy ]]; then pip install numpy; pip uninstall tinynumpy -y; fi
# we wait to install test dependencies after installing eppy, so as to catch any missing dependencies during setup.py
- pip install pytest-cov==2.7.1
- pip install codecov
script:
- py.test ./eppy/tests --cov=./ -v
after_success:
# coverage reporting on CodeCov
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] &&
[[ $PYTHON == 3* ]] &&
[[ $EPPY_INTEGRATION == True ]] &&
[[ $NUMPY == numpy ]]; then codecov; fi