Skip to content

Commit ac6fd38

Browse files
committed
travis: uwlcm tests: manual installation of boost, since we need newer boost python
1 parent c39e16f commit ac6fd38

File tree

2 files changed

+55
-10
lines changed

2 files changed

+55
-10
lines changed

.travis.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ env:
4848
# - TEST_SUITE=UWLCM MPI=mvapich2
4949

5050
cache:
51+
packages: true
52+
pip: true
5153
directories:
5254
- ${TRAVIS_BUILD_DIR}/deps/mvapich2-2.3b
5355
- ${TRAVIS_BUILD_DIR}/deps/boost
@@ -68,7 +70,7 @@ aliases:
6870
# language: cpp
6971
# compiler: gcc
7072
install:
71-
- . ./.travis_scripts/install_common.sh
73+
- . ./.travis_scripts/deps_install/install_common.sh
7274
script: echo "Preparing cache finished"
7375

7476
jobs:
@@ -87,6 +89,12 @@ jobs:
8789
env: TEST_SUITE=pbl MPI=mvapich2
8890
- <<: *precache_default
8991
env: TEST_SUITE=bconds_div MPI=mvapich2
92+
- <<: *precache_default
93+
env: TEST_SUITE=UWLCM_MT MPI=none
94+
- <<: *precache_default
95+
env: TEST_SUITE=UWLCM_unit_iles MPI=none
96+
- <<: *precache_default
97+
env: TEST_SUITE=UWLCM_unit_smg MPI=none
9098

9199
# excluded jobs
92100
exclude:
@@ -191,7 +199,7 @@ before_install:
191199
- sudo pip$PY3DEB install --upgrade pip
192200

193201
install:
194-
- . ./.travis_scripts/install_common.sh
202+
- . ./.travis_scripts/deps_install/install_common.sh
195203

196204
# - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo $apt_get_install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" libpango-1.0-0 libpangocairo-1.0-0 libhdf5-dev; fi
197205
# - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo $apt_get_install hdf5-tools; fi

.travis_scripts/install_common.sh renamed to .travis_scripts/deps_install/install_common.sh

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,13 @@ if [[ $MPI != 'none' ]]; then export CC=${DEPS_DIR}/mvapich2-2.3b/bin/mpicc ;
6666
#if [[ $TRAVIS_OS_NAME == 'linux' && $MPI != 'none' ]]; then sudo $apt_get_install libboost-mpi1.55-dev; fi
6767
#if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew reinstall boost --c++11; fi # ...what takes too long :(
6868

69-
# no MPI get boost from the repository
70-
if [[ $TRAVIS_OS_NAME == 'linux' && $MPI == 'none' ]]; then sudo $apt_get_install boost1.61; fi
71-
72-
# for MPI we need boost>=1.59 with mpi support, boost installation based on https://github.com/boostorg/compute/blob/master/.travis.yml
73-
if [[ $TRAVIS_OS_NAME == 'linux' && $MPI != 'none' ]]; then
69+
# no MPI
70+
if [[ $TRAVIS_OS_NAME == 'linux' && $MPI == 'none' ]]; then
71+
# not UWLCM test - get boost from the repository
72+
if [[ $TEST_SUITE != 'UWLCM_MT' && $TEST_SUITE != 'UWLCM_unit_iles' && $TEST_SUITE != 'UWLCM_unit_smg' ]]; then
73+
sudo $apt_get_install boost1.61
74+
# UWLCM test without MPI - we need boost.python3 >=1.63(?) for libcloud bindings
75+
else
7476
ls -A ${DEPS_DIR}/boost
7577
if [[ -z "$(ls -A ${DEPS_DIR}/boost)" ]]; then
7678
wget http://sourceforge.net/projects/boost/files/boost/1.65.1/boost_1_65_1.tar.gz
@@ -79,15 +81,15 @@ if [[ $TRAVIS_OS_NAME == 'linux' && $MPI == 'none' ]]; then sudo $apt_get_instal
7981
# configure and install
8082
if [[ $COMPILER == 'g++' ]]; then echo "using gcc : 6.2 : g++-6 ;" > $HOME/user-config.jam; fi
8183
if [[ $COMPILER == 'clang++' ]]; then echo "using clang : 5.0 : clang++-5.0 ;" > $HOME/user-config.jam; fi
82-
echo "using mpi : $CC ;" >> $HOME/user-config.jam
84+
echo "using python : 3.5 : /opt/pyenv/shims/python3 ;" >> $HOME/user-config.jam
8385
cat $HOME/user-config.jam
8486
if [[ $COMPILER == 'g++' ]]; then
85-
./bootstrap.sh --prefix=${DEPS_DIR}/boost/ --with-libraries=serialization,mpi,thread,date_time,system,iostreams,timer,filesystem
87+
./bootstrap.sh --prefix=${DEPS_DIR}/boost/ --with-libraries=thread,date_time,system,iostreams,timer,filesystem,program_options,python
8688
./b2 -d0 install
8789
fi
8890
if [[ $COMPILER == 'clang++' ]]; then
8991
#clang installation taken from https://gist.github.com/jimporter/10442880
90-
./bootstrap.sh --prefix=${DEPS_DIR}/boost/ --with-libraries=serialization,mpi,thread,date_time,system,iostreams,timer,filesystem --with-toolset=clang
92+
./bootstrap.sh --prefix=${DEPS_DIR}/boost/ --with-libraries=thread,date_time,system,iostreams,timer,filesystem,program_options,python --with-toolset=clang
9193
./b2 clean
9294
./b2 toolset=clang cxxflags="-std=c++14 -stdlib=libc++" linkflags="-stdlib=libc++" --prefix=${DEPS_DIR}/boost/ -j 4 stage release
9395
./b2 install toolset=clang cxxflags="-std=c++14 -stdlib=libc++" linkflags="-stdlib=libc++" --prefix=${DEPS_DIR}/boost/
@@ -102,6 +104,41 @@ if [[ $TRAVIS_OS_NAME == 'linux' && $MPI == 'none' ]]; then sudo $apt_get_instal
102104
export LIBRARY_PATH=${DEPS_DIR}/boost/lib:${LIBRARY_PATH}
103105
export CPATH=${DEPS_DIR}/boost/include:${CPATH}
104106
fi
107+
fi
108+
109+
# for MPI we need boost>=1.59 with mpi support, boost installation based on https://github.com/boostorg/compute/blob/master/.travis.yml
110+
if [[ $TRAVIS_OS_NAME == 'linux' && $MPI != 'none' ]]; then
111+
ls -A ${DEPS_DIR}/boost
112+
if [[ -z "$(ls -A ${DEPS_DIR}/boost)" ]]; then
113+
wget http://sourceforge.net/projects/boost/files/boost/1.65.1/boost_1_65_1.tar.gz
114+
tar xf boost_1_65_1.tar.gz
115+
cd boost_1_65_1
116+
# configure and install
117+
if [[ $COMPILER == 'g++' ]]; then echo "using gcc : 6.2 : g++-6 ;" > $HOME/user-config.jam; fi
118+
if [[ $COMPILER == 'clang++' ]]; then echo "using clang : 5.0 : clang++-5.0 ;" > $HOME/user-config.jam; fi
119+
echo "using mpi : $CC ;" >> $HOME/user-config.jam
120+
cat $HOME/user-config.jam
121+
if [[ $COMPILER == 'g++' ]]; then
122+
./bootstrap.sh --prefix=${DEPS_DIR}/boost/ --with-libraries=serialization,mpi,thread,date_time,system,iostreams,timer,filesystem
123+
./b2 -d0 install
124+
fi
125+
if [[ $COMPILER == 'clang++' ]]; then
126+
#clang installation taken from https://gist.github.com/jimporter/10442880
127+
./bootstrap.sh --prefix=${DEPS_DIR}/boost/ --with-libraries=serialization,mpi,thread,date_time,system,iostreams,timer,filesystem --with-toolset=clang
128+
./b2 clean
129+
./b2 toolset=clang cxxflags="-std=c++14 -stdlib=libc++" linkflags="-stdlib=libc++" --prefix=${DEPS_DIR}/boost/ -j 4 stage release
130+
./b2 install toolset=clang cxxflags="-std=c++14 -stdlib=libc++" linkflags="-stdlib=libc++" --prefix=${DEPS_DIR}/boost/
131+
fi
132+
cd ..
133+
else
134+
echo "Using cached boost."
135+
fi
136+
export BOOST_ROOT=${DEPS_DIR}/boost
137+
export LD_LIBRARY_PATH=${DEPS_DIR}/boost/lib:${LD_LIBRARY_PATH}
138+
export LD_RUN_PATH=${DEPS_DIR}/boost/lib:${LD_RUN_PATH}
139+
export LIBRARY_PATH=${DEPS_DIR}/boost/lib:${LIBRARY_PATH}
140+
export CPATH=${DEPS_DIR}/boost/include:${CPATH}
141+
fi
105142

106143
# blitz
107144
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install blitz; fi

0 commit comments

Comments
 (0)