forked from santoshphilip/eppy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (63 loc) · 3.25 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
language: generic
dist: trusty
sudo: required
matrix:
include:
- os: linux
env: PYTHON=2.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=8.8.0 ENERGYPLUS_SHA=7c3bbe4830 ENERGYPLUS_INSTALL_VERSION=8-8-0
- os: linux
env: PYTHON=3.6 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=8.8.0 ENERGYPLUS_SHA=7c3bbe4830 ENERGYPLUS_INSTALL_VERSION=8-8-0
- if: branch = master
os: linux
env: PYTHON=2.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=8.7.0 ENERGYPLUS_SHA=78a111df4a ENERGYPLUS_INSTALL_VERSION=8-7-0
- if: branch = master
os: linux
env: PYTHON=3.6 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=8.7.0 ENERGYPLUS_SHA=78a111df4a ENERGYPLUS_INSTALL_VERSION=8-7-0
- if: branch = master
os: osx
env: PYTHON=2.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=8.7.0 ENERGYPLUS_SHA=78a111df4a ENERGYPLUS_INSTALL_VERSION=8-7-0
- if: branch = master
os: osx
env: PYTHON=3.6 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=8.7.0 ENERGYPLUS_SHA=78a111df4a ENERGYPLUS_INSTALL_VERSION=8-7-0
- if: branch = master
os: osx
env: PYTHON=2.7 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=8.8.0 ENERGYPLUS_SHA=7c3bbe4830 ENERGYPLUS_INSTALL_VERSION=8-8-0
- if: branch = master
os: osx
env: PYTHON=3.6 EPPY_INTEGRATION=True ENERGYPLUS_VERSION=8.8.0 ENERGYPLUS_SHA=7c3bbe4830 ENERGYPLUS_INSTALL_VERSION=8-8-0
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; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 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; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo "y\r" | sudo ./$ENERGYPLUS_DOWNLOAD_FILENAME.$EXT; fi
- sudo rm $ENERGYPLUS_DOWNLOAD_FILENAME.$EXT
# install python
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ $PYTHON == 3* ]]; then brew install python3; fi
# activate virtual env
- if [[ $PYTHON == 2* ]]; then virtualenv venv -p python; fi
- if [[ $PYTHON == 3* ]]; then virtualenv venv -p python3; fi
- source venv/bin/activate
# coverage and testing requirements
- pip install --upgrade setuptools
- pip install --upgrade pip
- pip install pytest-cov
- pip install codecov
install:
- 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
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