2016-01-05 20:30:28 +03:00
# Use "required" for sudo, because we want to use the "trusty" Debian
# distro, which is (currently) only available in the legacy Travis
# infrastructure (i.e., if we put "sudo: false" to use the new container-
# based Travis infrastructure, then "trusty" is not available). We
# need the "trusty" distro because it has more recent versions of the
# GNU Autotools (i.e., autogen.pl will fail if you use the regular
# distro because the GNU Autotools are too old).
2015-12-10 23:00:44 +03:00
sudo : required
dist : trusty
language : c
2016-01-05 20:30:28 +03:00
# Iterate over 2 different compilers
2015-12-10 23:00:44 +03:00
compiler :
- gcc
- clang
2016-01-05 20:30:28 +03:00
# Iterate over 2 different OSs
2015-12-10 23:00:44 +03:00
os :
- linux
- osx
addons :
2016-01-05 20:30:28 +03:00
# For Linux, make sure we have some extra packages that we like to
# build with
2015-12-10 23:00:44 +03:00
apt :
packages :
- autoconf
- automake
- libtool
- libnl-3-200
- libnl-3-dev
- libnl-route-3-200
- libnl-route-3-dev
- libibverbs-dev
- librdmacm-dev
2017-02-27 04:58:51 +03:00
- libhwloc-dev
2015-12-17 07:08:37 +03:00
sources :
- ubuntu-toolchain-r-test
2015-12-10 23:00:44 +03:00
env :
global :
- AM_MAKEFLAGS="-j4"
- CPPFLAGS="-I$HOME/bogus/include"
2016-05-26 09:28:10 +03:00
- LDFLAGS="-L$HOME/bogus/lib"
2015-12-10 23:00:44 +03:00
- LD_LIBRARY_PATH="$HOME/bogus/lib"
2015-12-17 07:08:37 +03:00
matrix :
- GCC_VERSION=default
2016-07-20 09:37:28 +03:00
- GCC_VERSION=6
2015-12-10 23:00:44 +03:00
2015-12-16 16:45:16 +03:00
# Install dependencies for the verbs and usnic providers. Open MPI is
# not currently using the verbs provider in Libfabric, so we might as
# well not build it.
2015-12-10 23:00:44 +03:00
before_install :
2016-07-20 09:37:28 +03:00
- if [[ "GCC_VERSION" == "6" ]]; then COMPILERS="CC=gcc-6 CXX=g++-6 FC=gfortran-6"; fi
2015-12-17 07:08:37 +03:00
- export CONFIGURE_ARGS="--prefix=$HOME/bogus $COMPILERS" DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_ARGS"
- export DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_ARGS"
2015-12-10 23:00:44 +03:00
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git clone https://github.com/ofiwg/libfabric.git ; fi
2016-07-20 09:37:28 +03:00
- if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$GCC_VERSION" == "6" ]] ; then sudo apt-get --assume-yes install gcc-6 g++-6 gfortran-6; fi
2015-12-17 07:08:37 +03:00
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd libfabric && ./autogen.sh && ./configure --prefix=$HOME/bogus --enable-usnic --disable-verbs $COMPILERS && make install && cd .. ; fi
2016-10-05 03:50:34 +03:00
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew upgrade automake || true; brew upgrade libtool || true; fi
2017-02-27 04:58:51 +03:00
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap homebrew/science || true; brew install hwloc || true; brew upgrade hwloc || true ; fi
2016-10-05 03:50:34 +03:00
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] && [[ "$GCC_VERSION" == "6" ]] ; then brew install gcc || true; brew upgrade gcc || true ; fi
2016-05-26 09:28:10 +03:00
- mkdir -p $HOME/bogus/include $HOME/bogus/lib
2015-12-10 23:00:44 +03:00
2016-01-05 20:30:28 +03:00
# Note that we use "make -k" to do the entire build, even if there was a
# build error in there somewhere. This prevents us from needing to submit
# to Travis, see the first error, fix that first error, submit again, ...etc.
2015-12-10 23:00:44 +03:00
install :
- m4 --version
- autoconf --version
- automake --version
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then libtool --version; else glibtool --version; fi
- ./autogen.pl
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "gcc" ]]; then ./configure $CONFIGURE_ARGS --with-libfabric=$HOME/bogus --with-usnic --with-verbs; else ./configure $CONFIGURE_ARGS; fi
travis: use "make -k" to see all failures
One of the criticisms of Travis on the call earlier today was that
when there's a compile failure, you really only see the *first*
compile failure. Then you fix that, resubmit, and 15-60 minutes
later, you see the *next* compile failure.
Per some discussion with @bosilca and @rhc54 this afternoon, use "make
-k", which will have "make" try to continue the build even after
compile failures. Hence, you'll be able to see many more compile
errors that just one at a time.
In some cases (e.g., if there's a typo in a top-level header file), it
will cause a bazillion lines of compile error output, but hopefully
that should be easy to spot / ignore.
2015-12-16 01:07:01 +03:00
- make -k
2015-12-10 23:00:44 +03:00
2016-01-05 20:30:28 +03:00
# We only need to distcheck on one OS / compiler combination (this is just
# a minor optimization to make the overall set of builds faster).
2015-12-10 23:00:44 +03:00
script :
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "gcc" ]]; then make distcheck; else make check; fi
2015-12-17 07:08:37 +03:00
matrix :
exclude :
2016-07-20 09:37:28 +03:00
- env : GCC_VERSION=6
2015-12-17 07:08:37 +03:00
compiler : clang