Changeset 9684


Ignore:
Timestamp:
Feb 23, 2015, 11:54:54 PM (9 years ago)
Author:
steve
Message:

Setup install.sh so that it can be used manually and via travis ci

Location:
trunk/anuga_core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/.travis.yml

    r9683 r9684  
    88    - PYTHON_VERSION="2.6"  PARALLEL="false"   DISTRIB="conda"
    99
    10 install: source tools/install.sh
     10install:
     11    - source tools/install.sh
     12    - python setup.py install
    1113
    12 script: python runtests.py
     14script:
     15    - python runtests.py
    1316
    1417after_success:
  • trunk/anuga_core/tools/install.sh

    r9683 r9684  
    1010set -e
    1111
     12
     13[ -z "$PYTHON_VERSION" ] && PYTHON_VERSION="2.7"
     14[ -z "$DISTRIB" ] && DISTRIB="conda"
     15[ -z "$PARALLEL" ] && PARALLEL="mpich2"
     16
    1217sudo apt-get update -qq
    1318sudo apt-get install gfortran
     
    1520if [[ "$PARALLEL" == "mpich2" ]]; then
    1621    sudo apt-get install mpich2;
    17     mpirun -np 4 pwd;
    1822fi
    1923
     
    2125    # Deactivate the travis-provided virtual environment and setup a
    2226    # conda-based environment instead
    23     deactivate
     27    deactivate || echo "deactivate failed"
    2428
    2529    # Use the miniconda installer for faster download
     
    2832        -O miniconda.sh
    2933    chmod +x miniconda.sh && ./miniconda.sh -b
    30     export PATH=/home/travis/miniconda/bin:$PATH
    31 
    32     # Let conda install run with waiting for y/n reply
    33     conda config --set always_yes yes --set changeps1 no
     34   
     35    export PATH=$HOME/miniconda/bin:$PATH
    3436    conda update --yes conda
    3537
     
    3941    # Configure the conda environment and put it in the path using the
    4042    # provided versions
    41     conda create -n testenv --yes python=$PYTHON_VERSION pip numpy scipy netcdf4 \
     43    conda create -n anuga_env --yes python=$PYTHON_VERSION pip numpy scipy netcdf4 \
    4244        nose matplotlib
    43     source activate testenv
     45    source activate anuga_env
    4446
    4547    if [[ "$PYTHON_VERSION" == "2.7" ]]; then
    46         conda install -c pingucarsti gdal;
    47         #conda install -c anaconda gdal;
     48        conda install --yes -c pingucarsti gdal;
    4849    fi
    4950
    50     if [[ "$PYTHON_VERSION" == "2.6" ]]; then conda install gdal; fi
     51    if [[ "$PYTHON_VERSION" == "2.6" ]]; then conda install --yes gdal; fi
    5152
    5253    export GDAL_DATA=`gdal-config --datadir`;
     
    5657
    5758    # python 2.6 doesn't have argparse by default
    58     if [[ "$PYTHON_VERSION" == "2.6" ]]; then conda install argparse; fi
     59    if [[ "$PYTHON_VERSION" == "2.6" ]]; then conda install --yes argparse; fi
    5960
    6061elif [[ "$DISTRIB" == "ubuntu" ]]; then
     
    6869# Install pypar if parallel
    6970if [[ "$PARALLEL" == "mpich2" ]]; then
    70     svn checkout http://pypar.googlecode.com/svn/ pypar;
    71     pushd pypar/source;
     71    git clone https://github.com/daleroberts/pypar;
     72    pushd pypar;
    7273    python setup.py install;
    7374    popd;
     
    7980fi
    8081
    81 python setup.py install
Note: See TracChangeset for help on using the changeset viewer.