2016-08-03 15:16:39 +03:00
sudo : false
2014-09-25 22:25:31 +04:00
2016-08-15 07:01:39 +03:00
language : cpp
2016-08-03 15:16:39 +03:00
2016-08-19 08:37:49 +03:00
addons : &addons
apt :
2018-06-12 21:55:51 +03:00
packages : coreutils
2016-08-19 08:37:49 +03:00
2016-08-03 15:16:39 +03:00
cache :
2016-08-08 16:05:50 +03:00
apt : true
2016-08-03 15:16:39 +03: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 10:54:08 +03:00
- TIMEOUT=0
2017-06-22 22:01:43 +03:00
- secure : "MWXnhg939UrLRP7Jg5xLFxxquIgale0crNyP9Y2L2Pg+zINTgSExyykP/+s4uV1mj44uYLr4oEU7Ue72w3yGptanau90BUO+ZN5clC7QEUWsfJUDBc/ytilp+xhNRNLA+MJvaYLNOyXJOf9JKf/IzgRAR0m0PGAl9pMRG2vP5Sg="
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-08-12 12:26:56 +03:00
only :
- master
2016-10-17 11:04:41 +03:00
- cling-nightlies
2016-08-05 12:04:34 +03:00
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 :
2017-02-08 19:58:21 +03:00
# There seems to be a hard limit to how many machines a Travis build will
2018-06-12 13:35:53 +03:00
# run across all platforms. By interleaving OS X, the hope is to get in the
2017-02-08 19:58:21 +03:00
# queue faster while not blocking Linux builds from occuring.
2016-08-15 07:01:39 +03:00
- os : linux
2019-09-02 15:34:12 +03:00
dist : trusty
2018-06-12 13:35:53 +03:00
env : COMPILER=g++-4.8 CCOMPILER=gcc-4.8 NIGHTLY_CRON_SYNC=1
2016-08-15 07:01:39 +03:00
compiler : gcc-4.8
2016-08-03 15:16:39 +03:00
2017-06-05 20:16:46 +03:00
- os : osx
env : COMPILER=clang++ CCOMPILER=clang
2019-09-02 15:34:50 +03:00
osx_image : xcode11
2017-06-05 20:16:46 +03:00
compiler : clang
2016-08-15 07:01:39 +03:00
- os : linux
2018-06-12 13:35:53 +03:00
env : COMPILER=g++-5 CCOMPILER=gcc-5
2016-08-15 07:01:39 +03:00
addons :
apt :
2018-06-12 13:35:53 +03:00
sources : ubuntu-toolchain-r-test
2016-08-19 08:37:49 +03:00
packages : g++-5
2016-08-15 07:01:39 +03:00
compiler : gcc-5
2016-08-03 15:16:39 +03:00
- os : linux
2017-06-08 22:55:20 +03:00
env : COMPILER=g++-6 CCOMPILER=gcc-6
addons :
apt :
2018-06-12 13:35:53 +03:00
sources : ubuntu-toolchain-r-test
2017-06-08 22:55:20 +03:00
packages : g++-6
compiler : gcc-6
2017-06-05 20:18:59 +03:00
- os : osx
2018-06-12 13:35:53 +03:00
env : COMPILER=g++-7 CCOMPILER=gcc-7
2019-09-03 16:38:53 +03:00
osx_image : xcode10.1
2019-09-03 13:04:26 +03:00
addons :
2019-09-02 15:35:35 +03:00
homebrew :
2019-09-03 15:11:16 +03:00
packages : gcc@7
update : true
2018-06-12 22:14:31 +03:00
compiler : gcc-7
2017-06-05 20:18:59 +03:00
2016-08-15 07:01:39 +03:00
- os : linux
2018-06-12 13:35:53 +03:00
env : COMPILER=g++-7 CCOMPILER=gcc-7
2016-08-15 07:01:39 +03:00
addons :
apt :
2018-06-12 13:35:53 +03:00
sources : ubuntu-toolchain-r-test
2017-06-08 22:55:20 +03:00
packages : g++-7
compiler : gcc-7
2016-08-08 11:22:34 +03:00
2016-08-15 07:01:39 +03:00
- os : linux
2018-06-13 18:20:03 +03:00
env : CXXLIB=libstdc++ COMPILER=clang++-3.9 CCOMPILER=clang-3.9
2016-08-15 07:01:39 +03:00
addons :
apt :
2018-06-12 13:35:53 +03:00
sources : llvm-toolchain-trusty-3.9
packages : clang-3.9
compiler : clang-3.9
2016-08-03 15:16:39 +03:00
2017-06-08 22:45:36 +03:00
- os : osx
2018-06-13 16:32:46 +03:00
env : COMPILER=clang++ CCOMPILER=clang
osx_image : xcode9.3
compiler : clang
2017-06-08 22:45:36 +03:00
2016-08-15 07:01:39 +03:00
- os : linux
2019-09-03 12:55:03 +03:00
env : CXXLIB=libstdc++ COMPILER=clang++ CCOMPILER=clang
2016-08-15 07:01:39 +03:00
addons :
apt :
2019-09-03 12:55:03 +03:00
compiler : clang
2016-08-03 15:16:39 +03:00
2018-06-12 13:35:53 +03: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 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
- |
2018-06-13 18:29:39 +03:00
echo "travis_fold:""start:install"
2016-08-13 19:11:20 +03:00
CLING_USER_ROOT=`dirname $TRAVIS_BUILD_DIR`
export CLING_BUILD_DEPS="$CLING_USER_ROOT/deps"
export CLING_LOCAL_BIN="$CLING_USER_ROOT/bin"
2017-06-10 22:17:05 +03:00
if [ $TRAVIS_OS_NAME == 'osx' ]; then
2016-08-19 23:40:53 +03:00
brew install ccache python coreutils
2018-06-12 15:33:03 +03:00
PATH="/usr/local/opt/ccache/libexec:$PATH"
2016-08-15 07:01:39 +03:00
fi
2018-06-12 13:35:53 +03:00
if [ "$COMPILER" == "g++-7" ]; then
2017-06-28 03:44:46 +03:00
export CLING_BUILD_FLAGS="-DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON"
# On OS X force the test to reproduce __float128 issues with libstdc++.
if [ $TRAVIS_OS_NAME != 'osx' ]; then
export CLING_BUILD_FLAGS="$CLING_BUILD_FLAGS -DCXX_EXTENSIONS=OFF"
fi
2017-06-10 22:41:57 +03:00
fi
2019-09-03 18:28:54 +03:00
# Only care about cling warnings.
export CLING_BUILD_FLAGS="$CLING_BUILD_FLAGS -DLLVM_ENABLE_WARNINGS=OFF -DCLING_ENABLE_WARNINGS=ON"
2018-06-13 18:29:39 +03:00
echo "travis_fold:""end:install"
2017-06-10 22:41:57 +03:00
2017-06-13 18:58:30 +03:00
# Containers need to timeout before the buildscript exits
TIMEOUT='37m' # Any more and Travis might cancel
2016-08-03 15:16:39 +03:00
2016-08-16 07:00:31 +03: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 10:54:08 +03:00
2016-08-03 15:16:39 +03:00
before_script :
2018-06-12 13:35:53 +03:00
- cmake --version
2016-08-15 07:01:39 +03:00
- export CXX="ccache $COMPILER"
- export CC="ccache $CCOMPILER"
2016-09-22 17:02:38 +03:00
- |
# If we are running our nightly cron job, sync.
2016-09-24 16:16:35 +03:00
if [ -n "$NIGHTLY_CRON_SYNC" ] && [ "$TRAVIS_EVENT_TYPE" = "cron" ] \
2016-09-22 17:02:38 +03:00
&& [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] \
2016-09-23 18:15:51 +03:00
&& [ "$TRAVIS_REPO_SLUG" == "vgvassilev/cling" ] ; then
2018-06-13 18:29:39 +03:00
echo "travis_fold:""start:sync-vgvassilev"
2017-07-05 11:40:55 +03:00
# Override the default travis clone command to enable sync.
cd ../../ && rm -fr ${TRAVIS_REPO_SLUG}
git clone https://$OAUTH_TOKEN@github.com/${TRAVIS_REPO_SLUG} ${TRAVIS_REPO_SLUG}
cd ${TRAVIS_REPO_SLUG}
2017-06-26 13:34:18 +03:00
2016-09-23 18:15:51 +03:00
echo "Syncing repository."
2016-09-25 13:28:15 +03:00
git remote add alt http://root.cern.ch/git/cling.git
2017-07-16 14:44:19 +03:00
git pull alt master
2016-09-25 13:28:15 +03:00
# Move the tag to newest master
2017-07-05 11:40:55 +03:00
git tag --force cling-nightlies master
# Push to origin
git push --verbose origin master
2016-10-14 12:34:08 +03:00
git push --verbose --force origin cling-nightlies
2017-07-05 11:40:55 +03:00
# Some debug output.
git remote -v && git branch -a
2018-06-13 18:29:39 +03:00
echo "travis_fold:""end:sync-vgvassilev"
2016-09-22 17:02:38 +03:00
fi
2016-07-06 20:23:24 +03:00
script :
- |
if [ -z $TRAVIS_TAG ]; then
2018-06-12 21:52:52 +03:00
TIMEOUTEXE=`which timeout`;
if [ "x" = "x$TIMEOUTEXE" ] ; then TIMEOUTEXE=gtimeout; fi
2019-09-24 08:03:04 +03:00
$TIMEOUTEXE -s SIGTERM $TIMEOUT echo yes | tools/packaging/cpt.py \
--check-requirements \
2016-09-12 21:14:26 +03:00
--current-dev=tar \
--with-cling-url=https://github.com/$TRAVIS_REPO_SLUG \
--with-clang-url=http://root.cern.ch/git/clang.git \
--with-llvm-url=http://root.cern.ch/git/llvm.git \
2017-06-10 22:41:57 +03:00
--with-cmake-flags="$CLING_BUILD_FLAGS" \
2016-09-12 21:14:26 +03:00
--skip-cleanup
2016-07-06 20:23:24 +03:00
else
2019-09-24 08:03:04 +03:00
echo yes | tools/packaging/cpt.py \
--check-requirements \
2017-06-30 14:21:02 +03:00
--tarball-tag=$([[ $TRAVIS_TAG = cling-nightlies ]] && echo "master" || echo "$TRAVIS_TAG") \
2016-09-12 21:14:26 +03:00
--with-cling-url=https://github.com/$TRAVIS_REPO_SLUG \
--with-clang-url=http://root.cern.ch/git/clang.git \
2017-06-10 22:41:57 +03:00
--with-llvm-url=http://root.cern.ch/git/llvm.git \
--with-cmake-flags="$CLING_BUILD_FLAGS"
2016-07-06 20:23:24 +03:00
fi
2017-01-30 20:55:33 +03:00
2016-08-19 23:40:53 +03:00
RESULT="$?"
2017-01-30 20:55:33 +03:00
echo "Build Result: $RESULT"
2018-06-13 18:29:39 +03:00
echo "travis_fold:""start:ccache-s"
2017-01-30 20:55:33 +03:00
ccache -s
2018-06-13 18:29:39 +03:00
echo "travis_fold:""end:ccache-s"
2017-01-30 20:55:33 +03:00
if [ $RESULT -ne 124 ]; then
return $RESULT
2016-08-19 23:40:53 +03:00
fi
2016-08-05 10:54:08 +03:00
2017-01-30 20:55:33 +03:00
# Timout occured, pass that on to after_failure so as not to dump logs
export CLING_BUILD_TIMEOUT=1
TRAVIS_TEST_RESULT=124
return $TRAVIS_TEST_RESULT
2014-09-25 22:25:31 +04:00
notifications :
email :
2016-08-08 12:26:04 +03:00
recipients :
2016-08-08 15:47:16 +03:00
#- cling-dev@cern.ch
2014-09-25 22:25:31 +04:00
on_success : change
on_failure : always
2016-08-08 12:26:04 +03:00
template :
- "%{repository}/%{branch} (%{commit} - %{author}): %{message}"
- "Build details: %{build_url}"
- "Change view : %{compare_url}"
2016-07-06 20:23:24 +03:00
2016-08-08 12:47:50 +03:00
2016-07-06 20:23:24 +03:00
before_deploy :
2016-08-08 11:19:23 +03:00
- |
2018-06-13 18:29:39 +03:00
echo "travis_fold:""start:before_deploy"
2016-08-08 11:19:23 +03:00
export RELEASE_TARBALL=$(ls $HOME/ci/build/cling*.tar.bz2)
if [[ $TRAVIS_TAG -eq "cling-nightlies" ]]; then
2016-08-08 15:19:45 +03:00
NIGHTLY="`dirname $RELEASE_TARBALL`/`date "+%Y-%b-%d-"``basename $RELEASE_TARBALL`"
2016-08-08 12:47:50 +03:00
echo "Renaming $RELEASE_TARBALL to $NIGHTLY"
mv $RELEASE_TARBALL $NIGHTLY
export RELEASE_TARBALL=$NIGHTLY
2016-08-08 11:19:23 +03:00
fi
echo "Deploying $RELEASE_TARBALL to GitHub releases"
2018-06-13 18:29:39 +03:00
echo "travis_fold:""end:before_deploy"
2014-09-25 22:25:31 +04:00
2016-08-08 00:04:10 +03:00
2016-07-06 20:23:24 +03:00
deploy :
provider : releases
skip_cleanup : true
2016-08-08 00:04:10 +03:00
api_key : $OAUTH_TOKEN
2016-07-06 20:23:24 +03:00
file : '${RELEASE_TARBALL}'
on :
tags : true
2016-09-25 13:48:54 +03:00
all_branches : true
2016-08-05 12:34:01 +03:00
repo : $TRAVIS_REPO_SLUG
2016-08-03 15:16:39 +03:00
after_failure :
2016-08-16 07:00:31 +03:00
- |
if [ -n "$CCACHE_LOGFILE" ]; then
2018-06-13 18:29:39 +03:00
echo "travis_fold:""start:ccache_log"
2016-08-16 07:00:31 +03:00
echo "ccache log stored to:"
cat "$CCACHE_LOGFILE" | curl -sT - chunk.io
2018-06-13 18:29:39 +03:00
echo "travis_fold:""end:ccache_log"
2016-08-16 07:00:31 +03:00
fi
2016-08-10 12:04:27 +03:00
- |
2016-08-15 07:01:39 +03:00
if [ "$CLING_BUILD_TIMEOUT" != "1" ]; then
2018-06-13 18:29:39 +03:00
echo "travis_fold:""start:env_dump"
2016-08-15 07:01:39 +03:00
echo "Dumping env."
find $CLING_LOCAL_BIN -type f -print0 -exec cat {} \;
2018-06-12 13:35:53 +03:00
cmake --version
2016-08-15 07:01:39 +03:00
$CC --version
$CXX --version
ls -al `which ld` && ld -v
export
2018-06-13 18:29:39 +03:00
echo "travis_fold:""end:env_dump"
2016-08-15 07:01:39 +03:00
fi
2016-08-03 15:16:39 +03:00
- |
2016-08-15 07:01:39 +03:00
if [ "$CLING_BUILD_TIMEOUT" != "1" ]; then
2018-06-13 18:29:39 +03:00
echo "travis_fold:""start:cmakeoutputlog_dump"
2016-08-15 07:01:39 +03:00
echo "Dumping CMakeOutput.log"
cat /home/travis/ci/build/builddir/CMakeFiles/CMakeOutput.log
2018-06-13 18:29:39 +03:00
echo "travis_fold:""end:cmakeoutputlog_dump"
2016-08-15 07:01:39 +03:00
fi
2016-08-09 11:59:08 +03:00
- |
2016-08-15 07:01:39 +03:00
if [ "$CLING_BUILD_TIMEOUT" != "1" ]; then
2018-06-13 18:29:39 +03:00
echo "travis_fold:""start:cmakeerrorlog_dump"
2016-08-15 07:01:39 +03:00
echo "Dumping CMakeError.log"
cat /home/travis/ci/build/builddir/CMakeFiles/CMakeError.log
2018-06-13 18:29:39 +03:00
echo "travis_fold:""end:cmakeerrorlog_dump"
2016-08-15 07:01:39 +03:00
fi
2016-08-09 11:59:08 +03:00
- |
2016-08-15 07:01:39 +03:00
if [ "$CLING_BUILD_TIMEOUT" != "1" ]; then
2018-06-13 18:29:39 +03:00
echo "travis_fold:""start:clingcompiledata_dump"
2016-08-15 07:01:39 +03:00
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 -
2018-06-13 18:29:39 +03:00
echo "travis_fold:""end:clingcompiledata_dump"
2016-08-15 07:01:39 +03:00
fi
2016-08-10 12:04:27 +03:00
- |
2018-06-12 13:35:53 +03:00
if [ "$CLING_BUILD_TIMEOUT" != "1" ]; then
2018-06-13 18:29:39 +03:00
echo "travis_fold:""start:ccache_stats"
2016-08-15 07:01:39 +03:00
echo "Dumping `which ccache`"
ccache -s
ls -la /usr/lib/ccache/ || ls -la /usr/local/opt/ccache/libexec
2018-06-13 18:29:39 +03:00
echo "travis_fold:""end:ccache_stats"
2016-08-15 07:01:39 +03:00
fi