forked from geodynamics/pylith
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
75 lines (66 loc) · 3.19 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
# Travis-CI configuration
sudo: false
language: cpp
# :TODO: @brad Add osx build (need homebrew packages)..
matrix:
include:
- os: linux
env: LD_LIBRARY_PATH="${DEPS_DIR}/lib:${TARGET_DIR}/lib:${LD_LIBRARY_PATH}"
compiler: gcc
- os: linux
env: LD_LIBRARY_PATH="${DEPS_DIR}/lib:${TARGET_DIR}/lib:${LD_LIBRARY_PATH}"
compiler: clang
# Limit number of commits in cloning
git:
depth: 200
# Dependencies installed as packages
addons:
apt:
packages:
- cmake
- python-setuptools
- libcppunit-dev
- libopenmpi-dev
- openmpi-common
- openmpi-bin
- proj-bin
- proj-data
- libproj-dev
- zlib1g
- zlib1g-dev
- swig
# Install dependencies cached on CIG server
install:
- if [ ! -f ${DEPS_DIR}/bin/proj ]; then travis/dependencies.sh build; else echo "Using cached dependencies."; fi
- ls -R ${DEPS_DIR}
script:
- mkdir -p ${TARGET_DIR}/lib/python2.7/site-packages
# Pythia/Pyre
- git clone --recursive --depth 100 https://github.com/geodynamics/pythia.git
- pushd pythia && python setup.py install --prefix=${TARGET_DIR}; popd
# Nemesis
- git clone --recursive --depth 100 https://github.com/geodynamics/nemesis.git
- pushd nemesis && autoreconf --install --verbose --force && ./configure --prefix=${TARGET_DIR} CPPFLAGS="-I${DEPS_DIR}/include -I${TARGET_DIR}/include" LDFLAGS="-L${DEPS_DIR}/lib -L${TARGET_DIR}/lib" CC=mpicc CXX=mpicxx && make -j$(nproc) && make install; popd
# PETSc
- git clone --depth 100 -b knepley/pylith https://bitbucket.org/petsc/petsc.git petsc
- pushd petsc && ./configure --with-c2html=0 --with-x=0 --with-clanguage=C --with-mpicompilers=1 --with-debugging=1 --with-shared-libraries=1 --with-64-bit-points=1 --with-large-file-io=1 --with-hdf5=1 --with-zlib=1 --download-chaco=1 --download-ml=1 --download-f2cblaslapack=1 CPPFLAGS="-I${DEPS_DIR}/include" LDFLAGS="-L${DEPS_DIR}/lib" && make -j$(nproc) -f gmakefile && make test; popd
# Spatialdata
- git clone --recursive --depth 100 https://github.com/geodynamics/spatialdata.git
- pushd spatialdata && autoreconf --install --verbose --force && ./configure --enable-swig --enable-testing --enable-pythia --prefix=${TARGET_DIR} CPPFLAGS="-I${DEPS_DIR}/include -I${TARGET_DIR}/include" LDFLAGS="-L${DEPS_DIR}/lib -L${TARGET_DIR}/lib" && make -j$(nproc) && make install && make -j$(nproc) check; popd
# PyLith
- git fetch --unshallow
- autoreconf --install --verbose --force && ./configure --enable-swig --enable-testing --enable-cubit --enable-hdf5 --prefix=${TARGET_DIR} CPPFLAGS="-I${DEPS_DIR}/include -I${TARGET_DIR}/include" LDFLAGS="-L${DEPS_DIR}/lib -L${TARGET_DIR}/lib" CC=mpicc CXX=mpicxx && make -j$(nproc) && make install && make -j$(nproc) check
env:
global:
- MAX_PYLITH_PROCS=2
- PYTHON_VERSION="2.7"
- PETSC_DIR="${TRAVIS_BUILD_DIR}/petsc"
- PETSC_ARCH="arch-pylith"
- DEPS_DIR="${TRAVIS_BUILD_DIR}/dist/deps"
- TARGET_DIR="${TRAVIS_BUILD_DIR}/dist/target"
- PATH="${DEPS_DIR}/bin:${TARGET_DIR}/bin:${PATH}"
- PYTHONPATH="${DEPS_DIR}/lib/python${PYTHON_VERSION}/site-packages:${TARGET_DIR}/lib/python${PYTHON_VERSION}/site-packages:${PYTHONPATH}"
cache:
timeout: 300
directories:
- $DEPS_DIR