2014-09-25 22:25:31 +04:00
language : cpp
2016-08-03 15:16:39 +03:00
sudo : false
2014-09-25 22:25:31 +04:00
2016-07-20 10:07:20 +03:00
2016-07-20 11:28:09 +03:00
os :
- linux
- osx
2016-08-03 15:16:39 +03:00
cache :
ccache : true
directories :
- $HOME/.ccache
- $CLING_BUILD_DEPS
env :
global :
- USE_CCACHE=1
- CCACHE_COMPRESS=1
- CCACHE_MAXSIZE=500M
- CCACHE_CPP2=1
- CLING_BUILD_DEPS=$TRAVIS_BUILD_DIR/deps/
- CLING_LOCAL_BIN=$TRAVIS_BUILD_DIR/bin/
2016-08-05 10:54:08 +03:00
- TIMEOUT=0
2016-08-03 15:16:39 +03:00
2016-08-05 12:04:34 +03:00
# Do not build our sync branch.
branches :
except :
- /^__internal.*$/
2016-07-06 20:23:24 +03:00
matrix :
2016-08-03 15:16:39 +03: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 20:23:24 +03:00
include :
2016-08-03 15:16:39 +03:00
# 1. Linux Clang Builds
2016-07-06 20:23:24 +03:00
- os : linux
2016-08-03 15:16:39 +03:00
compiler : clang
addons : &clang37
apt :
sources : [ 'llvm-toolchain-precise-3.7' , 'ubuntu-toolchain-r-test' ]
packages : [ 'clang-3.7' , '^libc\+\+-dev' ]
env : CXX_COMPILER='clang++-3.7' CC_COMPILER='clang-3.7' BUILD_TYPE='Release'
# 2. Linux GCC Builds
- os : linux
compiler : gcc
addons : &gcc49
apt :
sources : [ 'ubuntu-toolchain-r-test' ]
packages : [ 'g++-4.9' ]
env : CXX_COMPILER='g++-4.9' CC_COMPILER='gcc-4.9' BUILD_TYPE='Release'
- os : linux
compiler : gcc
addons : *gcc49
env : CXX_COMPILER='g++-4.9' CC_COMPILER='gcc-4.9' BUILD_TYPE='Debug'
# 3. OSX Clang Builds
2016-07-20 11:28:09 +03:00
- os : osx
2016-08-03 15:16:39 +03:00
compiler : clang
osx_image : xcode7.2
env : CXX_COMPILER='clang++' CC_COMPILER='clang' BUILD_TYPE='Release'
2014-09-25 22:25:31 +04:00
2016-08-03 15:16:39 +03:00
allow_failures :
- os : osx
# libc++-dev is not whitelisted yet (https://github.com/travis-ci/apt-package-whitelist/issues/3266)
# The build falls back to an old version and fails.
- os : linux
compiler : clang
2014-09-25 22:25:31 +04:00
2016-08-03 15:16:39 +03:00
install :
# If cmake is not in the cache, download it.
2016-07-06 20:23:24 +03:00
- |
if [ $TRAVIS_OS_NAME == 'linux' ]; then
2016-07-20 16:53:44 +03:00
CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.0-Linux-x86_64.tar.gz"
2016-08-03 15:16:39 +03:00
export CMAKE=$CLING_BUILD_DEPS/cmake/bin/cmake
2016-07-20 12:32:02 +03:00
elif [ $TRAVIS_OS_NAME == 'osx' ] ; then
2016-07-20 16:53:44 +03:00
CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.0-Darwin-x86_64.tar.gz"
2016-08-03 15:16:39 +03:00
export CMAKE=$CLING_BUILD_DEPS/cmake/CMake.app/Contents/bin/cmake
2016-08-04 00:21:00 +03:00
brew install ccache
2016-08-04 14:38:46 +03:00
PATH=/usr/local/opt/ccache/libexec:$PATH
2016-08-05 10:54:08 +03:00
# Try to workaround travis-ci/travis-ci#6410 by
# introducing a timeout fulction, which will timeout before the builder,
# returning a 'fake' success (eg. 0), tricking it to store the cache.
TIMEOUT=2400
2016-08-03 15:16:39 +03:00
fi
2016-08-05 10:54:08 +03:00
# Implement a platform-independent timeout function.
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
2016-08-03 15:16:39 +03: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 20:23:24 +03:00
fi
2014-09-25 22:25:31 +04:00
2016-08-03 15:16:39 +03:00
before_script :
- export CC=${CC_COMPILER}
- export CXX=${CXX_COMPILER}
- export PATH=$CLING_LOCAL_BIN:$PATH
#- export
#- which ccache
2016-07-06 20:23:24 +03:00
- $CMAKE --version
- $CC --version
- $CXX --version
script :
- |
if [ -z $TRAVIS_TAG ]; then
2016-08-05 10:54:08 +03:00
timeout $TIMEOUT tools/packaging/cpt.py --current-dev=tar --with-cling-url=https://github.com/vgvassilev/cling --verbose --debug-on-error
2016-07-06 20:23:24 +03:00
else
tools/packaging/cpt.py --last-stable=tar --with-cling-url=https://github.com/vgvassilev/cling
fi
2016-08-05 10:54:08 +03:00
# Convert the timeout exit code to 0.
RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else false; fi;
2016-07-20 17:14:10 +03:00
- ccache -s
2014-09-25 22:25:31 +04:00
notifications :
recipients :
2016-08-05 11:52:36 +03:00
- cling-dev@cern.ch
2014-09-25 22:25:31 +04:00
email :
on_success : change
on_failure : always
template :
2016-08-05 11:52:36 +03:00
- "%{repository}/%{branch} (%{commit} - %{author}): %{message}"
- "Build details: %{build_url}"
- "Change view : %{compare_url}"
2016-07-06 20:23:24 +03:00
before_deploy :
- export RELEASE_TARBALL=$(ls $HOME/ci/build/cling*.tar.bz2)
- echo "Deploying $RELEASE_TARBALL to GitHub releases"
2014-09-25 22:25:31 +04:00
2016-07-06 20:23:24 +03:00
deploy :
provider : releases
skip_cleanup : true
2016-07-20 12:08:18 +03:00
api_key :
secure : eIwVHJNxkAIi6IUYyx7qI1szsgWt3c42ugcJ1vZ6iH//+qJgks77I8dMlbRf0RUrhxpJhJPH5a6vqI/mo1Vq2vmoC8+D1DIQCbj+/WHhY71LQCPC+Wgj2JES5y1Wh91nMt4ybzb1dA8BIfeJOdCUn7ezJTGKk18N+h2jE+a/7IE=
2016-07-06 20:23:24 +03:00
file : '${RELEASE_TARBALL}'
on :
tags : true
repo : vgvassilev/cling
2016-08-03 15:16:39 +03:00
after_failure :
- |
cat /home/travis/ci/build/builddir/CMakeFiles/CMakeOutput.log
cat /home/travis/ci/build/builddir/CMakeFiles/CMakeError.log