forked from iiasa/message_ix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR removes our depedence on circleci, which should fix our CI issues. Also adds nightly builds on travis. Once travis windows support gets better, we can also drop appveyor.
- Loading branch information
Showing
5 changed files
with
113 additions
and
71 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,43 @@ | ||
language: minimal | ||
|
||
matrix: | ||
include: | ||
- os: linux | ||
env: PYENV=py37 | ||
- os: linux | ||
env: PYENV=py27 | ||
- os: osx | ||
language: generic | ||
env: TOXENV=py27 | ||
env: PYENV=py37 | ||
- os: osx | ||
language: generic | ||
env: TOXENV=py36 | ||
env: PYENV=py27 | ||
# turn these on once travis support gets a little better | ||
# - os: windows | ||
# env: PYENV=py37 | ||
# - os: windows | ||
# env: PYENV=py27 | ||
|
||
before_install: | ||
# install gams | ||
- curl -O https://d37drm4t2jghv5.cloudfront.net/distributions/25.1.1/macosx/osx_x64_64_sfx.exe; | ||
- chmod u+x osx_x64_64_sfx.exe | ||
- ./osx_x64_64_sfx.exe > install.out | ||
- export PATH=$PATH:$PWD/gams25.1_osx_x64_64_sfx | ||
# install conda | ||
- export MINICONDA=$HOME/miniconda | ||
- export PATH="$MINICONDA/bin:$PATH" | ||
- hash -r | ||
- if [ $TOXENV == 'py27']; | ||
then wget http:https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh; | ||
else wget http:https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; | ||
fi | ||
- chmod +x miniconda.sh | ||
- ./miniconda.sh -b -f -p $MINICONDA | ||
- conda update --yes conda | ||
# install ixmp deps | ||
- conda install --yes -c conda-forge ixmp xlsxwriter xlrd | ||
- conda remove --force --yes ixmp | ||
- source ./ci/env.sh | ||
- bash ./ci/travis-install.sh | ||
- source activate testing | ||
|
||
install: | ||
- git clone https://github.com/iiasa/ixmp.git | ||
- cd ixmp && python setup.py install && cd .. | ||
- python setup.py install | ||
|
||
script: | ||
- conda install --yes -c conda-forge pytest | ||
- pytest -v tests | ||
- python -c "import os, sys; assert os.environ['PYVERSION'] == sys.version[0]" | ||
- cd tests | ||
- py.test --verbose --cov=message_ix --cov-config ../ci/.coveragerc --cov-report term-missing | ||
- cd .. | ||
- cd tests/ci | ||
- if [[ ! -z "${MESSAGE_IX_CI_USER}" ]]; then ./run_on_ci.sh; fi | ||
- cd ../.. | ||
- messageix-config --model_path=message_ix/model | ||
- cd doc && pip install -r requirements.txt && make html | ||
- cd doc | ||
- pip install -r requirements.txt | ||
- make html | ||
|
||
after_success: | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[report] | ||
omit = | ||
message_ix/model/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# gams info | ||
case "${TRAVIS_OS_NAME}" in | ||
linux) | ||
OSFIX=linux | ||
GAMSPATH=linux_x64_64_sfx | ||
;; | ||
osx) | ||
OSFIX=macosx | ||
GAMSPATH=osx_x64_64_sfx | ||
;; | ||
windows) | ||
OSFIX=windows | ||
GAMSPATH=windows_x64_64 | ||
;; | ||
esac | ||
|
||
GAMS_VERSION_SHORT=25.1 | ||
GAMS_VERSION_LONG=25.1.1 | ||
|
||
export GAMSFNAME=$GAMSPATH.exe | ||
export GAMSURL=https://d37drm4t2jghv5.cloudfront.net/distributions/$GAMS_VERSION_LONG/$OSFIX/$GAMSFNAME | ||
export PATH=$PATH:$PWD/gams"$GAMS_VERSION_SHORT"_"$GAMSPATH" | ||
|
||
# miniconda info | ||
case "${TRAVIS_OS_NAME}" in | ||
linux) | ||
OSNAME=Linux | ||
EXT=sh | ||
;; | ||
osx) | ||
OSNAME=MacOSX | ||
EXT=sh | ||
;; | ||
windows) | ||
OSNAME=Windows | ||
EXT=exe | ||
;; | ||
esac | ||
|
||
case "${PYENV}" in | ||
py27) | ||
export PYVERSION=2 | ||
;; | ||
py37) | ||
export PYVERSION=3 | ||
;; | ||
esac | ||
|
||
export CONDAURL="https://repo.anaconda.com/miniconda/Miniconda$PYVERSION-latest-$OSNAME-x86_64.$EXT" | ||
export PATH=$HOME/miniconda/bin:$PATH | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -x | ||
set -e | ||
|
||
# install gams | ||
echo "Starting download from $GAMSURL" | ||
wget $GAMSURL | ||
echo "Download complete from $GAMSURL" | ||
chmod u+x $GAMSFNAME | ||
./$GAMSFNAME > install.out | ||
which gams | ||
|
||
# install and update conda | ||
echo "Starting download from $CONDAURL" | ||
wget $CONDAURL -O miniconda.sh | ||
echo "Download complete from $CONDAURL" | ||
chmod +x miniconda.sh | ||
./miniconda.sh -b -p $HOME/miniconda | ||
conda update --yes conda | ||
|
||
# create named env | ||
conda create -n testing python=$PYVERSION --yes | ||
|
||
# install deps | ||
conda install -n testing -c conda-forge --yes \ | ||
ixmp \ | ||
pytest \ | ||
coveralls \ | ||
pytest-cov | ||
conda remove -n testing --force --yes ixmp |