forked from NanoComp/meep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
77 lines (71 loc) · 3.29 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
language: python
dist: trusty
sudo: false
##################################################
# required linux packages and python packages
##################################################
addons:
apt:
packages:
- guile-2.0-dev
- libgsl0-dev
- libfftw3-dev
- gfortran
- liblapack-dev
- swig
- libhdf5-serial-dev
- libopenmpi-dev
- mpi-default-bin
- openmpi-bin
install:
- pip install numpy mpi4py h5py scipy
##################################################
# environment variables applied to all build cases
##################################################
env:
global:
- CPPFLAGS=-I${HOME}/local/include LDFLAGS=-L${HOME}/local/lib GEN_CTL_IO=${HOME}/local/bin/gen-ctl-io
- CORETESTS1="known_results symmetry bragg_transmission one_dimensional integrate convergence_cyl_waveguide aniso_disp harmonics stress_tensor near2far"
- CORETESTS2="h5test three_d bench flux cylindrical two_dimensional physical 2D_convergence pml"
##################################################
# common installations performed before all build cases
##################################################
before_script:
- git clone https://github.com/stevengj/libctl libctl-src
- (cd libctl-src && git checkout master && sh autogen.sh --prefix=$HOME/local --enable-shared && make -j 2 && make install)
- git clone https://github.com/stevengj/harminv
- (cd harminv && git checkout c221b2bcbaaa761f683aa5e2c6fa7efbbecdca1f && sh autogen.sh --prefix=$HOME/local --enable-shared && make -j 2 && make install)
- git clone https://github.com/stevengj/mpb
- (cd mpb && git checkout master && sh autogen.sh --prefix=$HOME/local --enable-shared LIBS=-ldl --with-libctl=$HOME/local/share/libctl --with-hermitian-eps && make -j 2 && make install)
##################################################
# build matrix:
##################################################
matrix:
include:
- python: "2.7"
env: MPICONF="--without-mpi" CORETESTS="${CORETESTS1}" MKCHECKFLAGS="-j 2"
- python: "2.7"
env: MPICONF="--with-mpi" CORETESTS="${CORETESTS1}" MKCHECKFLAGS=""
- python: "3.4"
env: MPICONF="--without-mpi" CORETESTS="${CORETESTS2}" MKCHECKFLAGS="-j 2"
- python: "3.4"
env: MPICONF="--with-mpi" CORETESTS="${CORETESTS2}" MKCHECKFLAGS=""
##################################################
# build/test instructions
##################################################
script:
- autoreconf --verbose --install --symlink --force
- export MEEP_VERSION=$(./configure -V | grep meep | awk '{print $3}')
- mkdir -p build && pushd build
- ../configure --enable-maintainer-mode --prefix=$HOME/local --with-libctl=$HOME/local/share/libctl ${MPICONF}
- make ${MKCHECKFLAGS} distcheck DISTCHECK_CONFIGURE_FLAGS="--with-libctl=${HOME}/local/share/libctl ${MPICONF}"
after_script:
- BUILD_PREFIX=${TRAVIS_BUILD_DIR}/build/meep-${MEEP_VERSION}/_build
- MEEP_LOG=${BUILD_PREFIX}/tests/test-suite.log
- if [[ -e ${MEEP_LOG} ]]; then cat ${MEEP_LOG}; fi
- MEEPGEOM_LOG=${BUILD_PREFIX}/libmeepgeom/test-suite.log
- if [[ -e ${MEEPGEOM_LOG} ]]; then cat ${MEEPGEOM_LOG}; fi
- PYMPB_LOG=${BUILD_PREFIX}/libpympb/tests/test-suite.log
- if [[ -e ${PYMPB_LOG} ]]; then cat ${PYMPB_LOG}; fi
- PYTHON_LOG=${BUILD_PREFIX}/python/test-suite.log
- if [[ -e ${PYTHON_LOG} ]]; then cat ${PYTHON_LOG}; fi