Skip to content
Permalink
Browse files

[travis] download eigen3.3 to avoid excessive warnings from gcc6+

  • Loading branch information
evaleev committed Apr 8, 2019
1 parent 6b7cd70 commit 281e2970b65470d97d22793afd0677cdf736c1ea
Showing with 53 additions and 8 deletions.
  1. +1 −1 .travis.yml
  2. +2 −3 bin/docker-travis-build.sh
  3. +42 −0 bin/travisci_build_eigen3_linux.sh
  4. +8 −4 bin/travisci_build_linux.sh
@@ -14,8 +14,8 @@ addons:
- llvm-toolchain-xenial-8
packages: &base_packages
- libgmp-dev
- libeigen3-dev
- automake
- cmake # for eigen
- libboost-dev

matrix:
@@ -22,7 +22,7 @@ echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" | tee -a /et
apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
#apt-add-repository -y "ppa:boost-latest/ppa"
apt-get -yq update >> ~/apt-get-update.log
apt-get -yq --no-install-suggests --no-install-recommends --force-yes install g++-5 g++-6 g++-7 g++-8 gfortran-5 gfortran-6 gfortran-7 gfortran-8 libgmp-dev libeigen3-dev automake libboost-dev clang-8 libc++-8-dev libc++abi-8-dev gdb
apt-get -yq --no-install-suggests --no-install-recommends --force-yes install g++-5 g++-6 g++-7 g++-8 gfortran-5 gfortran-6 gfortran-7 gfortran-8 libgmp-dev automake cmake libboost-dev clang-8 libc++-8-dev libc++abi-8-dev gdb
mkdir -p ${TRAVIS_BUILD_TOPDIR}
cd ${TRAVIS_BUILD_TOPDIR}
git clone https://github.com/evaleev/libint.git ${TRAVIS_BUILD_TOPDIR}/evaleev/libint
@@ -38,7 +38,7 @@ cd /home/travis/_build
export BUILD_PREFIX=/home/travis/_build
export INSTALL_PREFIX=/home/travis/_install
export TRAVIS_BUILD_DIR=${TRAVIS_BUILD_TOPDIR}/evaleev/libint
./travisci_build_linux.sh
${TRAVIS_BUILD_DIR}/bin/travisci_build_linux.sh
END
chmod +x $build

@@ -64,7 +64,6 @@ RUN /home/travis/_build/$setup
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# copy travis scripts
ADD travisci_build_linux.sh /home/travis/_build/travisci_build_linux.sh
ADD $build /home/travis/_build/$build
END

@@ -0,0 +1,42 @@
#! /bin/sh

# Exit on error
set -ev

# Install packages

# Environment variables
if [ "$CXX" = "g++" ]; then
export CC=/usr/bin/gcc-$GCC_VERSION
export CXX=/usr/bin/g++-$GCC_VERSION
export EXTRACXXFLAGS="-mno-avx"
else
export CC=/usr/bin/clang-$CLANG_VERSION
export CXX=/usr/bin/clang++-$CLANG_VERSION
export EXTRACXXFLAGS="-mno-avx -stdlib=libc++"
fi

# Print compiler information
$CC --version
$CXX --version

# log the CMake version (need 3+)
cmake --version

# Install Eigen3 unless previous install is cached ... must manually wipe cache on version bump or toolchain update
export INSTALL_DIR=${INSTALL_PREFIX}/eigen3
if [ ! -d "${INSTALL_DIR}" ]; then
cd ${BUILD_PREFIX}
wget -q http://bitbucket.org/eigen/eigen/get/3.3.5.tar.bz2
tar -xjf 3.3.5.tar.bz2
cd eigen-*
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_FLAGS="${EXTRACXXFLAGS}" \
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}
make install
else
echo "Eigen3 already installed ..."
fi
@@ -1,5 +1,7 @@
#!/bin/sh

${TRAVIS_BUILD_DIR}/bin/travisci_build_eigen3_linux.sh

set -e

if [ "$CXX" = "g++" ]; then
@@ -17,23 +19,25 @@ else
export EXTRAFLAGS="-stdlib=libc++"
fi
export CXXFLAGS="-std=c++11 -Wno-enum-compare $OPENMPFLAGS $EXTRAFLAGS"
export LDFLAGS=$OPENMPFLAGS
export LDFLAGS="$OPENMPFLAGS $EXTRAFLAGS"
export LIBINT_NUM_THREADS=2

cd ${TRAVIS_BUILD_DIR}
./autogen.sh
cd ${BUILD_PREFIX}
mkdir -p build
cd build
${TRAVIS_BUILD_DIR}/configure CPPFLAGS='-I/usr/include/eigen3' --with-max-am=2,2 --with-eri-max-am=2,2 --with-eri3-max-am=3,2 --enable-eri=1 --enable-eri3=1 --enable-1body=1 --disable-1body-property-derivs --with-multipole-max-order=2
${TRAVIS_BUILD_DIR}/configure CPPFLAGS="-I${INSTALL_PREFIX}/eigen3/include/eigen3" --with-max-am=2,2 --with-eri-max-am=2,2 --with-eri3-max-am=3,2 --enable-eri=1 --enable-eri3=1 --enable-1body=1 --disable-1body-property-derivs --with-multipole-max-order=2
make -j2
make check
cd src/bin/test_eri; ./stdtests.pl; cd ../../..
make export

# try building exported lib in Release mode without system boost to check the bundled boost unpacking and use
if [ "$BUILD_TYPE" = "Release" ]; then
sudo apt-get remove --purge libboost-dev
sudo apt-get purge libboost-dev
# why is boost still found afterwards?
sudo apt list --installed | grep boost
fi
cd ${BUILD_PREFIX}
mkdir -p export_build
@@ -42,7 +46,7 @@ cd export_build
tar -xvzf libint-*.tgz
rm -f libint-*.tgz
cd libint-*
./configure CPPFLAGS='-I/usr/include/eigen3 -DLIBINT2_DISABLE_BOOST_CONTAINER_SMALL_VECTOR=1' --enable-fortran
./configure CPPFLAGS="-I${INSTALL_PREFIX}/eigen3/include/eigen3 -DLIBINT2_DISABLE_BOOST_CONTAINER_SMALL_VECTOR=1" --enable-fortran
make -j2
make check
# build F03 interface

0 comments on commit 281e297

Please sign in to comment.
You can’t perform that action at this time.