2016-08-03 14:16:39 +02:00
sudo : false
2014-09-25 20:25:31 +02:00
2016-08-15 00:01:39 -04:00
language : cpp
2016-08-03 14:16:39 +02:00
2016-08-19 01:37:49 -04:00
addons : &addons
apt :
2016-08-19 16:40:53 -04:00
packages : timeout
2016-08-19 01:37:49 -04:00
sources : &sources
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
- llvm-toolchain-precise-3.6
- llvm-toolchain-precise-3.7
- llvm-toolchain-precise-3.8
- llvm-toolchain-precise
2016-08-03 14:16:39 +02:00
cache :
2016-08-08 15:05:50 +02:00
apt : true
2016-08-03 14:16:39 +02:00
ccache : true
directories :
- $HOME/.ccache
- $CLING_BUILD_DEPS
env :
global :
- USE_CCACHE=1
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=500M
- CCACHE_CPP2=1
2016-08-05 09:54:08 +02:00
- TIMEOUT=0
2016-08-07 23:16:56 +02:00
- secure : "DQSDJnYWR7kb2ylcE1e4GIfP9KJadHjG696HelK09zmsTJiRoxg2HhDnm3gHkrPh18AxYJAMW1rZHm0ZsnBKpS09NxOcPVseL+z3iWfBFpgCa2ueUMKHy/YBhNghmLOXVeQzGwol6iCU5xbO4ZMJHpytmQCH6Vm9ws7sg8kiatY="
2016-08-03 14:16:39 +02:00
2016-08-05 11:04:34 +02:00
# Do not build our sync branch.
branches :
except :
- /^__internal.*$/
2016-08-12 11:26:56 +02:00
only :
- master
2016-08-05 11:04:34 +02:00
2016-07-06 22:53:24 +05:30
matrix :
2016-08-03 14:16:39 +02:00
# Abort all builds on a single failing matrix entry.
fast_finish : true
exclude :
# Note: Workaround travis-ci/travis-ci#4681
# Exclude default job which lacks our included environment variables.
- os : osx
- os : linux
2016-07-06 22:53:24 +05:30
include :
2016-08-15 00:01:39 -04:00
- os : linux
env : DIST=pangolin COMPILER=g++-4.7 CCOMPILER=gcc-4.7
addons :
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
packages : g++-4.7
2016-08-15 00:01:39 -04:00
compiler : gcc-4.7
2016-08-03 14:16:39 +02:00
2016-08-15 00:01:39 -04:00
- os : linux
env : DIST=pangolin COMPILER=g++-4.8 CCOMPILER=gcc-4.8
addons :
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
packages : g++-4.8
2016-08-15 00:01:39 -04:00
compiler : gcc-4.8
2016-08-03 14:16:39 +02:00
2016-07-06 22:53:24 +05:30
- os : linux
2016-08-15 00:01:39 -04:00
env : DIST=pangolin COMPILER=g++-4.9 CCOMPILER=gcc-4.9
addons :
2016-08-03 14:16:39 +02:00
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
packages : g++-4.9
2016-08-15 00:01:39 -04:00
compiler : gcc-4.9
2016-08-03 14:16:39 +02:00
2016-08-15 00:01:39 -04:00
- os : linux
env : DIST=pangolin COMPILER=g++-5 CCOMPILER=gcc-5
addons :
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
packages : g++-5
2016-08-15 00:01:39 -04:00
compiler : gcc-5
2016-08-03 14:16:39 +02:00
- os : linux
2016-08-15 00:01:39 -04:00
env : DIST=pangolin COMPILER=g++-6 CCOMPILER=gcc-6
addons :
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
packages : g++-6
2016-08-15 00:01:39 -04:00
compiler : gcc-6
- os : linux
env : DIST=trusty COMPILER=g++-4.7 CCOMPILER=gcc-4.7
sudo : required
dist : trusty
addons :
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
packages : g++-4.7
2016-08-15 00:01:39 -04:00
compiler : gcc-4.7
- os : linux
env : DIST=trusty COMPILER=g++-4.8 CCOMPILER=gcc-4.8
sudo : required
dist : trusty
addons :
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
packages : g++-4.8
2016-08-15 00:01:39 -04:00
compiler : gcc-4.8
- os : linux
env : DIST=trusty COMPILER=g++-4.9 CCOMPILER=gcc-4.9
sudo : required
dist : trusty
addons :
2016-08-03 14:16:39 +02:00
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
packages : g++-4.9
2016-08-15 00:01:39 -04:00
compiler : gcc-4.9
2016-08-03 14:16:39 +02:00
- os : linux
2016-08-15 00:01:39 -04:00
env : DIST=trusty COMPILER=g++-5 CCOMPILER=gcc-5
sudo : required
dist : trusty
2016-08-08 15:05:03 +02:00
addons :
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
packages : g++-5
2016-08-15 00:01:39 -04:00
compiler : gcc-5
- os : linux
env : DIST=trusty COMPILER=g++-6 CCOMPILER=gcc-6
2016-08-08 10:22:34 +02:00
sudo : required
dist : trusty
2016-08-15 00:01:39 -04:00
addons :
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
packages : g++-6
2016-08-15 00:01:39 -04:00
compiler : gcc-6
2016-08-08 10:22:34 +02:00
2016-08-15 00:01:39 -04:00
- os : linux
env : CXXLIB=libstdc++ COMPILER=clang++-3.7 CCOMPILER=clang-3.7
addons :
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
2016-08-15 00:01:39 -04:00
packages : [ 'clang-3.7' , 'libstdc++-5-dev' ]
compiler : clang-3.7
2016-08-03 14:16:39 +02:00
2016-08-15 00:01:39 -04:00
- os : linux
env : CXXLIB=libstdc++ COMPILER=clang++-3.8 CCOMPILER=clang-3.8
addons :
apt :
2016-08-19 01:37:49 -04:00
sources : *sources
2016-08-15 00:01:39 -04:00
packages : [ 'clang-3.8' , 'libstdc++-6-dev' ]
compiler : clang-3.8
2016-08-03 14:16:39 +02:00
2016-07-20 10:28:09 +02:00
- os : osx
2016-08-15 00:01:39 -04:00
env : COMPILER=clang++ CCOMPILER=clang
osx_image : xcode6.4
compiler : clang
- os : osx
env : COMPILER=clang++ CCOMPILER=clang
osx_image : xcode7
2016-08-03 14:16:39 +02:00
compiler : clang
2014-09-25 20:25:31 +02:00
2016-08-05 16:04:30 +02:00
- os : osx
2016-08-15 00:01:39 -04:00
env : COMPILER=clang++ CCOMPILER=clang
osx_image : xcode7.1
2016-08-05 16:04:30 +02:00
compiler : clang
2016-08-15 00:01:39 -04:00
- os : osx
env : COMPILER=clang++ CCOMPILER=clang
osx_image : xcode7.2
compiler : clang
- os : osx
env : COMPILER=clang++ CCOMPILER=clang
2016-08-05 16:04:30 +02:00
osx_image : xcode7.3
2016-08-15 00:01:39 -04:00
compiler : clang
2016-08-05 16:04:30 +02:00
- os : osx
2016-08-15 00:01:39 -04:00
env : COMPILER=clang++ CCOMPILER=clang
osx_image : xcode8
2016-08-03 14:16:39 +02:00
compiler : clang
2016-08-10 10:02:29 +02:00
2016-08-15 00:01:39 -04:00
allow_failures :
# clang-3.5 crashes compiling clang-3.9 with libc++-3.9
- env : CXXLIB=libc++ COMPILER=clang++-3.5 CCOMPILER=clang-3.5
2014-09-25 20:25:31 +02:00
2016-08-03 14:16:39 +02:00
install :
# If cmake is not in the cache, download it.
2016-07-06 22:53:24 +05:30
- |
2016-08-13 12:11:20 -04:00
CLING_USER_ROOT=`dirname $TRAVIS_BUILD_DIR`
export CLING_BUILD_DEPS="$CLING_USER_ROOT/deps"
export CLING_LOCAL_BIN="$CLING_USER_ROOT/bin"
2016-07-06 22:53:24 +05:30
if [ $TRAVIS_OS_NAME == 'linux' ]; then
2016-07-20 15:53:44 +02:00
CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.0-Linux-x86_64.tar.gz"
2016-08-03 14:16:39 +02:00
export CMAKE=$CLING_BUILD_DEPS/cmake/bin/cmake
2016-07-20 11:32:02 +02:00
elif [ $TRAVIS_OS_NAME == 'osx' ] ; then
2016-08-19 16:40:53 -04:00
brew install ccache python coreutils
2016-07-20 15:53:44 +02:00
CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.0-Darwin-x86_64.tar.gz"
2016-08-03 14:16:39 +02:00
export CMAKE=$CLING_BUILD_DEPS/cmake/CMake.app/Contents/bin/cmake
2016-08-19 16:40:53 -04:00
PATH="/usr/local/opt/ccache/libexec:$PATH"
# This is where timeout is hiding now, is the above still neccessary?
PATH="$PATH:/usr/local/opt/coreutils/libexec/gnubin"
2016-08-15 00:01:39 -04:00
fi
# Containers need to timeout before the buildscript exists
if [ $TRAVIS_OS_NAME == 'osx' ] || [ "$DIST" == "trusty" ]; then
2016-08-19 16:40:53 -04:00
TIMEOUT='44m' # Any more and Travis might cancel
2016-08-03 14:16:39 +02:00
fi
2016-08-16 00:00:31 -04:00
# If we timeout, objects can be corrupted in the cache, causing link errors
# Turn this on to get the mapping to the cache.o to delete
# export CCACHE_LOGFILE="$CLING_USER_ROOT/ccache.log"
2016-08-05 09:54:08 +02:00
2016-08-03 14:16:39 +02:00
if [ ! -f $CMAKE ]; then
mkdir -pv $CLING_BUILD_DEPS/cmake
travis_retry curl -k $CMAKE_URL | tar --strip-components=1 -xz -C $CLING_BUILD_DEPS/cmake
2016-07-06 22:53:24 +05:30
fi
2014-09-25 20:25:31 +02:00
2016-08-03 14:16:39 +02:00
before_script :
2016-08-15 00:01:39 -04:00
- $CMAKE --version
- export CXX="ccache $COMPILER"
- export CC="ccache $CCOMPILER"
2016-07-06 22:53:24 +05:30
script :
- |
2016-08-16 00:00:31 -04:00
function run_ccache() {
2016-08-19 16:40:53 -04:00
# Save our build result and propogate it to Travis
# When build succeeds, but ccache fails that should return an error
2016-08-16 00:00:31 -04:00
ccache -s
CCACHE_RSLT="$?"
if [ "$1" -eq 0 ]; then
return $CCACHE_RSLT
fi
return $1
}
2016-07-06 22:53:24 +05:30
if [ -z $TRAVIS_TAG ]; then
2016-08-13 12:11:20 -04:00
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
2016-08-08 15:13:12 +02:00
# Move the tag to newest master
git tag --force cling-nightlies HEAD
git push --force https://$OAUTH_TOKEN@github.com/${TRAVIS_REPO_SLUG} cling-nightlies
fi
2016-08-08 10:18:13 +02:00
2016-08-19 16:40:53 -04:00
timeout -s SIGTERM $TIMEOUT tools/packaging/cpt.py --current-dev=tar --with-cling-url=https://github.com/$TRAVIS_REPO_SLUG --skip-cleanup
2016-07-06 22:53:24 +05:30
else
2016-08-07 23:55:49 +02:00
tools/packaging/cpt.py --tarball-tag=$TRAVIS_TAG --with-cling-url=https://github.com/$TRAVIS_REPO_SLUG
2016-07-06 22:53:24 +05:30
fi
2016-08-19 16:40:53 -04:00
RESULT="$?"
echo "RESULT: $RESULT"
if [ $RESULT -eq 124 ]; then
# Timout occured, pass that on to after_failure so as not to dump logs
export CLING_BUILD_TIMEOUT=1
fi
2016-08-05 09:54:08 +02:00
2016-08-19 16:40:53 -04:00
run_ccache "$RESULT"
2014-09-25 20:25:31 +02:00
notifications :
email :
2016-08-08 11:26:04 +02:00
recipients :
2016-08-08 14:47:16 +02:00
#- cling-dev@cern.ch
2014-09-25 20:25:31 +02:00
on_success : change
on_failure : always
2016-08-08 11:26:04 +02:00
template :
- "%{repository}/%{branch} (%{commit} - %{author}): %{message}"
- "Build details: %{build_url}"
- "Change view : %{compare_url}"
2016-07-06 22:53:24 +05:30
2016-08-08 11:47:50 +02:00
2016-07-06 22:53:24 +05:30
before_deploy :
2016-08-08 10:19:23 +02:00
- |
export RELEASE_TARBALL=$(ls $HOME/ci/build/cling*.tar.bz2)
if [[ $TRAVIS_TAG -eq "cling-nightlies" ]]; then
2016-08-08 14:19:45 +02:00
NIGHTLY="`dirname $RELEASE_TARBALL`/`date "+%Y-%b-%d-"``basename $RELEASE_TARBALL`"
2016-08-08 11:47:50 +02:00
echo "Renaming $RELEASE_TARBALL to $NIGHTLY"
mv $RELEASE_TARBALL $NIGHTLY
export RELEASE_TARBALL=$NIGHTLY
2016-08-08 10:19:23 +02:00
fi
echo "Deploying $RELEASE_TARBALL to GitHub releases"
2014-09-25 20:25:31 +02:00
2016-08-07 23:04:10 +02:00
2016-07-06 22:53:24 +05:30
deploy :
provider : releases
skip_cleanup : true
2016-08-07 23:04:10 +02:00
api_key : $OAUTH_TOKEN
2016-07-06 22:53:24 +05:30
file : '${RELEASE_TARBALL}'
on :
tags : true
2016-08-05 11:34:01 +02:00
repo : $TRAVIS_REPO_SLUG
2016-08-03 14:16:39 +02:00
after_failure :
2016-08-16 00:00:31 -04:00
- |
if [ -n "$CCACHE_LOGFILE" ]; then
echo "ccache log stored to:"
cat "$CCACHE_LOGFILE" | curl -sT - chunk.io
fi
2016-08-10 11:04:27 +02:00
- |
2016-08-15 00:01:39 -04:00
if [ "$CLING_BUILD_TIMEOUT" != "1" ]; then
echo "Dumping env."
find $CLING_LOCAL_BIN -type f -print0 -exec cat {} \;
$CMAKE --version
$CC --version
$CXX --version
ls -al `which ld` && ld -v
export
fi
2016-08-03 14:16:39 +02:00
- |
2016-08-15 00:01:39 -04:00
if [ "$CLING_BUILD_TIMEOUT" != "1" ]; then
echo "Dumping CMakeOutput.log"
cat /home/travis/ci/build/builddir/CMakeFiles/CMakeOutput.log
fi
2016-08-09 10:59:08 +02:00
- |
2016-08-15 00:01:39 -04:00
if [ "$CLING_BUILD_TIMEOUT" != "1" ]; then
echo "Dumping CMakeError.log"
cat /home/travis/ci/build/builddir/CMakeFiles/CMakeError.log
fi
2016-08-09 10:59:08 +02:00
- |
2016-08-15 00:01:39 -04:00
if [ "$CLING_BUILD_TIMEOUT" != "1" ]; then
echo "Dumping cling-compiledata.h..."
COMPILE_DATA_H=$HOME/ci/build/builddir/tools/cling/lib/Interpreter/cling-compiledata.h
cat $COMPILE_DATA_H
echo "Running cling-compiledata compiler..."
COMPDATA_CXX=$(cat $COMPILE_DATA_H | cut -c 18- | sed "s,\",,g")
eval echo | LC_ALL=C $COMPDATA_CXX -xc++ -E -v -
fi
2016-08-10 11:04:27 +02:00
- |
2016-08-15 00:01:39 -04:00
if [ "$CLING_BUILD_TIMEOUT" != "1" ]; then
echo "Dumping `which ccache`"
ccache -s
ls -la /usr/lib/ccache/ || ls -la /usr/local/opt/ccache/libexec
fi