|
1 | 1 | #!/usr/bin/env bash |
2 | 2 |
|
3 | | -# Inspired by https://conda.io/docs/travis.html |
4 | 3 | set -e |
5 | 4 | set -v |
6 | 5 |
|
7 | 6 |
|
8 | 7 | if [ "$TRAVIS_OS_NAME" = linux ]; then |
9 | | - sudo apt-get update |
10 | | - MINICONDAVERSION="Linux" |
11 | | -else |
12 | | - MINICONDAVERSION="MacOSX" |
| 8 | + true |
13 | 9 | fi |
14 | 10 |
|
15 | | -if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then |
16 | | - wget https://repo.continuum.io/miniconda/Miniconda2-latest-$MINICONDAVERSION-x86_64.sh -O miniconda.sh; |
17 | | -else |
18 | | - wget https://repo.continuum.io/miniconda/Miniconda3-latest-$MINICONDAVERSION-x86_64.sh -O miniconda.sh; |
19 | | -fi |
| 11 | +if [ "$TRAVIS_OS_NAME" = osx ]; then |
| 12 | + # isntall and configure miniconda |
| 13 | + wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh; |
| 14 | + bash miniconda.sh -b -p $HOME/miniconda |
| 15 | + export PATH="$HOME/miniconda/bin:$PATH" |
| 16 | + hash -r |
| 17 | + conda config --set always_yes yes --set changeps1 no |
| 18 | + conda update -q conda |
| 19 | + conda config --add channels conda-forge |
20 | 20 |
|
21 | | -bash miniconda.sh -b -p $HOME/miniconda |
22 | | -export PATH="$HOME/miniconda/bin:$PATH" |
23 | | -hash -r |
24 | | -conda config --set always_yes yes --set changeps1 no |
25 | | -conda update -q conda |
26 | | -conda config --add channels conda-forge |
27 | | -# Useful for debugging any issues with conda |
28 | | -conda info -a |
29 | | -conda create -q -n testenv python=$TRAVIS_PYTHON_VERSION casacore=2.3.0 |
| 21 | + # Useful for debugging any issues with conda |
| 22 | + conda info -a |
| 23 | + conda create -q -n testenv python=2.7 casacore=2.3.0 |
| 24 | + source activate testenv |
30 | 25 |
|
31 | | -echo "measures.directory: $HOME/data" > $HOME/.casarc |
| 26 | + # setup casacore data |
| 27 | + mkdir $HOME/data |
| 28 | + cd $HOME/data |
| 29 | + wget ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar && tar xf WSRT_Measures.ztar && |
| 30 | + cd $HOME |
| 31 | + echo "measures.directory: $HOME/data" > $HOME/.casarc |
| 32 | +fi |
0 commit comments