Skip to content

Commit

Permalink
add refdata to caching
Browse files Browse the repository at this point in the history
  • Loading branch information
wkerzendorf committed Aug 23, 2018
1 parent 076bfbe commit d70a893
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 24 deletions.
34 changes: 11 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ python:
virtualenv:
system_site_packages: true

cache:
apt: true
directories:
- $HOME/miniconda
addons:
apt:
packages:
Expand All @@ -27,56 +23,48 @@ env:
- ASTROPY_USE_SYSTEM_PYTEST=1
- SETUP_CMD='test'
- TEST_MODE='normal'
- TARDIS_REF_DATA_URL='https://github.com/tardis-sn/tardis-refdata.git'
- REF_DATA_HOME=$HOME/tardis-refdata
- MINICONDA_URL='http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh'
- SAVE_COVERAGE=false
- GIT_LFS_SKIP_SMUDGE=1

matrix:
include:
- python: 2.7
env:
- COMPILER=gcc
- SETUP_CMD='test --coverage --args="--tardis-refdata=$HOME/tardis-refdata/"'
- SETUP_CMD='test --coverage --args="--tardis-refdata=$REF_DATA_HOME"'
- TEST_MODE='spectrum'
- SAVE_COVERAGE=true

- python: 2.7
env:
- COMPILER=clang
- SETUP_CMD='test --args="--tardis-refdata=$HOME/tardis-refdata/"'
- SETUP_CMD='test --args="--tardis-refdata=$REF_DATA_HOME"'
- TEST_MODE='spectrum'

#trouble with osx building due to segfault at cython (https://github.com/cython/cython/issues/2199)
- os: osx
language: generic
env:
- COMPILER=clang
- SETUP_CMD='test --args="--tardis-refdata=$HOME/tardis-refdata/"'
- SETUP_CMD='test --args="--tardis-refdata=$REF_DATA_HOME"'
- TEST_MODE='spectrum'
- MINICONDA_URL='http://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh'


- python: 2.7
env: SETUP_CMD='test'
cache:
apt: true
directories:
- $HOME/miniconda
- $REF_DATA_HOME


before_install:
# We do this to make sure we get the dependencies so pip works below
- source ci-helpers/install_miniconda.sh
- if [[ $TEST_MODE == 'spectrum' ]]; then conda install -c conda-forge git-lfs=2.2.1 -y; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then git lfs install --skip-smudge; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then git clone $TARDIS_REF_DATA_URL $HOME/tardis-refdata; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then cd $HOME/tardis-refdata; fi
# Use the following to get the ref-data from the master;
- if [[ $TEST_MODE == 'spectrum' ]]; then git fetch origin; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then git checkout origin/master; fi
# Use the following to get the ref-data from a specific pull request;
# - if [[ $TEST_MODE == 'spectrum' ]]; then git fetch origin pull/11/head:thomson-ref; fi
# - if [[ $TEST_MODE == 'spectrum' ]]; then git checkout thomson-ref; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then git lfs pull --include="atom_data/kurucz_cd23_chianti_H_He.h5" origin; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then git lfs pull --include="atom_data/chianti_He.h5" origin; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then git lfs pull --include="plasma_reference/" origin; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then git lfs pull --include="unit_test_data.h5" origin; fi
- if [[ $TEST_MODE == 'spectrum' ]]; then cd $TRAVIS_BUILD_DIR; fi


install:
Expand Down
16 changes: 16 additions & 0 deletions ci-helpers/fetch_reference_data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
git lfs install

if test -e $REF_DATA_HOME; then
git clone https://github.com/tardis-sn/tardis-refdata.git $REF_DATA_HOME
else
cd $REF_DATA_HOME
# Use the following to get the ref-data from the master;
git fetch origin
checkout origin/master
# Use the following to get the ref-data from a specific pull request
#git fetch origin pull/11/head:thomson-ref
git lfs pull --include="atom_data/kurucz_cd23_chianti_H_He.h5" origin
git lfs pull --include="atom_data/chianti_He.h5" origin
git lfs pull --include="plasma_reference/" origin
git lfs pull --include="unit_test_data.h5" origin
cd $TRAVIS_BUILD_DIR
3 changes: 2 additions & 1 deletion tardis_env27.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ dependencies:
- docopt=0.6.2
- pytest-cov=2.2.1
- codecov

#testing requirements
- git-lfs=2.4
- pip:
- sphinx_bootstrap_theme
- sphinxcontrib-bibtex
Expand Down

0 comments on commit d70a893

Please sign in to comment.