-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
95 lines (83 loc) · 2.67 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
84
85
86
87
88
89
90
91
92
93
94
95
language: cpp
compiler:
- clang
os:
- osx
env:
- DEBUG=YES MPI=YES TMPDIR=/tmp
# Test with GCC on Linux an Clang on Mac
matrix:
exclude:
- compiler: clang
os: linux
- compiler: gcc
os: osx
before_install:
- if [ $TRAVIS_OS_NAME == "linux" -a "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
- if [ $TRAVIS_OS_NAME == "linux" ]; then sudo apt-get update; fi || true
install:
# g++-4.9
- if [ $TRAVIS_OS_NAME == "linux" -a "$CXX" == "g++" ]; then sudo apt-get install -qq g++-4.9; fi
- if [ $TRAVIS_OS_NAME == "linux" -a "$CXX" == "g++" ]; then export CXX="g++-4.9"; fi
# Back out of the mfem directory to install the libraries
- cd ..
# OpenMPI
- if [ $TRAVIS_OS_NAME == "linux" ]; then
sudo apt-get install openmpi-bin openmpi-common openssh-client openssh-server libopenmpi1.3 libopenmpi-dbg libopenmpi-dev;
else
travis_wait brew install open-mpi;
fi
# hypre
- if [ $MPI == "YES" ]; then
if [ ! -d hypre-2.10.0b ]; then
wget https://computation.llnl.gov/project/linear_solvers/download/hypre-2.10.0b.tar.gz --no-check-certificate;
tar xvzf hypre-2.10.0b.tar.gz;
cd hypre-2.10.0b/src;
./configure --disable-fortran --without-fei CC=mpicc CXX=mpic++;
make -j 4;
cd ../..;
else
echo "Reusing cached hypre-2.10.0b/";
fi;
else
echo "Serial build, not using hypre";
fi
# METIS
- if [ ! -d metis-4.0 ]; then
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD/metis-4.0.3.tar.gz;
tar xvzf metis-4.0.3.tar.gz;
cd metis-4.0.3;
make -j 4;
cd ..;
mv metis-4.0.3 metis-4.0;
else
echo "Reusing cached metis-4.0/";
fi
# # Delete an expired cache here: https://travis-ci.org/mfem/mfem/caches
# cache:
# directories:
# - $TRAVIS_BUILD_DIR/../hypre-2.10.0b
# - $TRAVIS_BUILD_DIR/../metis-4.0
script:
# Compiler
- if [ $MPI == "YES" ]; then
export MYCXX=mpic++;
export OMPI_CXX="$CXX";
$MYCXX --showme:version;
else
export MYCXX="$CXX";
fi
# Print the compiler version
- $MYCXX -v
# Build the code and do a quick check (debug mode) or a full tests run (non-debug mode)
- if [ $DEBUG == "NO" ]; then
export MFEM_TEST_TARGET="test";
else
export MFEM_TEST_TARGET="check";
fi
# Build and check/test MFEM, its examples and miniapps
- cd $TRAVIS_BUILD_DIR &&
make config MFEM_USE_MPI=$MPI MFEM_DEBUG=$DEBUG MFEM_CXX="$MYCXX" &&
make info &&
make all -j 4 &&
make $MFEM_TEST_TARGET 1>&2