forked from usnistgov/fipy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (73 loc) · 2.81 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
# inspired by http://conda.pydata.org/docs/travis.html
#
# language: python causes grief on osx
language: generic
os:
- osx
# - linux
env:
- TRAVIS_PYTHON_VERSION=2.7 MPIRUN= FIPY_SOLVERS=pysparse
# - TRAVIS_PYTHON_VERSION=2.7 MPIRUN= FIPY_SOLVERS=pysparse FIPY_INLINE=1
# - TRAVIS_PYTHON_VERSION=2.7 MPIRUN= FIPY_SOLVERS=scipy
- TRAVIS_PYTHON_VERSION=2.7 MPIRUN= FIPY_SOLVERS=trilinos
- TRAVIS_PYTHON_VERSION=2.7 MPIRUN="mpirun -np 2" FIPY_SOLVERS=trilinos
- TRAVIS_PYTHON_VERSION=2.7 MPIRUN= FIPY_SOLVERS=petsc
- TRAVIS_PYTHON_VERSION=2.7 MPIRUN="mpirun -np 2" FIPY_SOLVERS=petsc
- TRAVIS_PYTHON_VERSION=3.6 MPIRUN= FIPY_SOLVERS=scipy
- TRAVIS_PYTHON_VERSION=3.6 MPIRUN= FIPY_SOLVERS=petsc
- TRAVIS_PYTHON_VERSION=3.6 MPIRUN="mpirun -np 2" FIPY_SOLVERS=petsc
cache: apt
branches:
except:
- nist-pages
before_install:
# sudo ln -s /usr/lib/lapack/liblapack.so.3gf /usr/lib/lapack/liblapack.so.3;
# sudo ldconfig;
- if [[ $TRAVIS_OS_NAME = "linux" ]]; then
sudo apt-get update;
fi
# We do this conditionally because it saves us some downloading if the
# version is the same.
- PY3K=$(echo "$TRAVIS_PYTHON_VERSION >= 3.0" | bc)
- if [[ $TRAVIS_OS_NAME = "linux" ]]; then
export MINICONDA_OS_NAME=Linux;
elif [[ $TRAVIS_OS_NAME = "osx" ]]; then
export MINICONDA_OS_NAME=MacOSX;
fi
- if [[ $PY3K -eq 1 ]]; then
export MINICONDA_VERSION=3;
else
export MINICONDA_VERSION=2;
fi
- wget https://repo.continuum.io/miniconda/Miniconda${MINICONDA_VERSION}-latest-${MINICONDA_OS_NAME}-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda create --quiet --name test-environment --show-channel-urls --channel conda-forge python=$TRAVIS_PYTHON_VERSION fipy "gmsh<4.0";
- source activate test-environment
- conda remove --quiet --channel conda-forge --force fipy
# Useful for debugging any issues with conda
- conda info -a
- pip install scikit-fmm
install:
- python setup.py install
before_script:
# lack of display causes tests to abort at VtkViewer
# Workaround @ http://docs.enthought.com/mayavi/mayavi/tips.html#rendering-using-the-virtual-framebuffer
# and https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
- if [[ $TRAVIS_OS_NAME = "linux" ]]; then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
sleep 3;
fi
# inline must be run twice to clear out compiler warnings
# we don't care if it fails the first time
- if [[ ! -z "${FIPY_INLINE}" ]]; then
travis_wait 40 $MPIRUN python setup.py test || true;
fi
script:
- $MPIRUN python setup.py test --deprecation-errors;
after_success:
- conda env export