forked from firedrakeproject/firedrake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
83 lines (83 loc) · 2.86 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
74
75
76
77
78
79
80
81
82
83
sudo: false
notifications:
irc:
channels: "chat.freenode.net#firedrake"
skip_join: true
on_success: change
on_failure: always
template: "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message} | %{build_url}"
# language: python
language: c
# We're not Python 2.6 compatible at the moment
# python: "2.7"
addons:
apt:
packages:
- build-essential
- python-dev
- git
- mercurial
- python-pip
- libopenmpi-dev
- openmpi-bin
- libblas-dev
- liblapack-dev
- gfortran
- libspatialindex-dev
- gmsh
os:
- linux
- osx
# Separate cache directories for OSX and Linux
cache:
directories:
- $HOME/cached_dependencies_$TRAVIS_OS_NAME
env:
global:
- CC=mpicc
# The install script expects to see this environment variable
- CACHE_DIRECTORY=$HOME/cached_dependencies_$TRAVIS_OS_NAME
- FIREDRAKE_TRAVIS_TESTS=1
- PACKAGE_MANAGER="--no-package-manager"
matrix:
- PYOP2_BACKEND=none
matrix:
exclude:
- env: PYOP2_BACKEND=none
include:
- os: osx
# Only test a few things on OSX until we can cache some of the
# build dependencies, otherwise we often get timeouts.
env: PYOP2_BACKEND=sequential PYOP2_TESTS="extrusion" TEST_ADJOINT="TRUE" PACKAGE_MANAGER=""
- os: linux
env: PYOP2_BACKEND=sequential PYOP2_TESTS=regression
- os: linux
env: OMP_NUM_THREADS=2 PYOP2_BACKEND=openmp PYOP2_TESTS=regression
- os: linux
env: PYOP2_BACKEND=sequential PYOP2_TESTS="extrusion output multigrid benchmarks demos" TEST_ADJOINT="TRUE"
- os: linux
env: OMP_NUM_THREADS=2 PYOP2_BACKEND=openmp PYOP2_TESTS="extrusion output multigrid benchmarks" TEST_ADJOINT="TRUE"
before_install:
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update; brew install python; brew link --overwrite python ; fi
- pip install -U --user pip
- pip install -U --user virtualenv
# Fail fast on lint errors
- pip install -U --user flake8
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then export PATH=$PATH:$HOME/Library/Python/2.7/bin; fi
- make lint
install:
- export CC=mpicc
- mkdir tmp
- cd tmp
- PETSC_CONFIGURE_OPTIONS="--download-hypre" ../scripts/firedrake-install --disable-ssh --minimal-petsc --adjoint ${PACKAGE_MANAGER}
- . ./firedrake/bin/activate
# Test that running firedrake-update works
- firedrake-update
# Having activated the virtualenv, attempt to save cached dependencies
# This saves PETSc and petsc4py to speed up building
- (cd firedrake; ../../scripts/firedrake-install --write-cache)
# command to run tests
script:
- (cd firedrake/src/firedrake; make lint)
- (rc=0; for t in ${PYOP2_TESTS}; do py.test --short -v firedrake/src/firedrake/tests/${t} || rc=$?; done; exit $rc)
- if [ "x$TEST_ADJOINT" != "x" ]; then python firedrake/src/dolfin-adjoint/tests_firedrake/test.py; fi