cling/.travis.yml

226 lines
6.3 KiB
YAML
Raw Normal View History

language: cpp
2016-08-03 15:16:39 +03:00
sudo: false
2016-07-20 10:07:20 +03:00
os:
- linux
- osx
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
- 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-08 16:05:03 +03:00
- EXECUTE_COMMAND=
- CXX_COMPILER=
- CC_COMPILER=
- COMPILER_VERSION=
2016-08-08 00:16:56 +03:00
- secure: "DQSDJnYWR7kb2ylcE1e4GIfP9KJadHjG696HelK09zmsTJiRoxg2HhDnm3gHkrPh18AxYJAMW1rZHm0ZsnBKpS09NxOcPVseL+z3iWfBFpgCa2ueUMKHy/YBhNghmLOXVeQzGwol6iCU5xbO4ZMJHpytmQCH6Vm9ws7sg8kiatY="
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.*$/
only:
- master
2016-08-05 12:04:34 +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
include:
2016-08-03 15:16:39 +03:00
# 1. Linux Clang Builds
- 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++' CC_COMPILER='clang' COMPILER_VERSION='-3.7' BUILD_TYPE='Release'
2016-08-03 15:16:39 +03:00
# 2. Linux GCC Builds
- os: linux
compiler: gcc
addons: &gcc49
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-4.9']
env: CXX_COMPILER='g++' CC_COMPILER='gcc' COMPILER_VERSION='-4.9' BUILD_TYPE='Release'
2016-08-03 15:16:39 +03:00
- os: linux
compiler: gcc
2016-08-08 16:05:03 +03:00
#addons: *gcc49
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['binutils-gold']
sudo: required
dist: trusty
env: CXX_COMPILER='g++' CC_COMPILER='gcc' COMPILER_VERSION='-4.8' BUILD_TYPE='Release'
2016-08-08 16:05:03 +03:00
TIMEOUT=2400 EXECUTE_COMMAND="sudo ln -s `which gold` /usr/local/bin/ld"
2016-08-03 15:16:39 +03:00
# 3. OSX Clang Builds
- 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'
- os: osx
compiler: clang
osx_image: xcode7.3
env: CXX_COMPILER='clang++' CC_COMPILER='clang' BUILD_TYPE='Release'
2016-08-03 15:16:39 +03:00
allow_failures:
- os: osx
2016-08-03 15:16:39 +03:00
# 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
2016-08-10 11:02:29 +03:00
# There are linker failures, which need to be further understood.
- os: linux
dist: trusty
2016-08-03 15:16:39 +03:00
install:
# If cmake is not in the cache, download it.
- |
if [ $TRAVIS_OS_NAME == 'linux' ]; then
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
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-07 19:19:43 +03:00
brew install ccache python
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
fi
2016-08-03 15:16:39 +03:00
before_script:
2016-08-10 12:04:27 +03:00
- |
echo "Making $CXX_COMPILER$COMPILER_VERSION and $CC_COMPILER$COMPILER_VERSION default."
mkdir -pv $CLING_LOCAL_BIN
echo -e "#!/bin/bash\nccache $CXX_COMPILER$COMPILER_VERSION \"\$@\"" > $CLING_LOCAL_BIN/$CXX_COMPILER
echo -e "#!/bin/bash\nccache $CC_COMPILER$COMPILER_VERSION \"\$@\"" > $CLING_LOCAL_BIN/$CC_COMPILER
2016-08-10 12:04:27 +03:00
chmod +x $CLING_LOCAL_BIN/$CXX_COMPILER
chmod +x $CLING_LOCAL_BIN/$CC_COMPILER
2016-08-03 15:16:39 +03:00
- export PATH=$CLING_LOCAL_BIN:$PATH
2016-08-08 16:05:03 +03:00
- eval $EXECUTE_COMMAND
script:
- |
if [ -z $TRAVIS_TAG ]; then
if [ "$TRAVIS_BRANCH" == "master" ]; then
# 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 11:18:13 +03:00
timeout $TIMEOUT tools/packaging/cpt.py --current-dev=tar --with-cling-url=https://github.com/$TRAVIS_REPO_SLUG --verbose --skip-cleanup
else
2016-08-08 00:55:49 +03:00
tools/packaging/cpt.py --tarball-tag=$TRAVIS_TAG --with-cling-url=https://github.com/$TRAVIS_REPO_SLUG
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
notifications:
email:
2016-08-08 12:26:04 +03:00
recipients:
#- cling-dev@cern.ch
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}"
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`"
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"
deploy:
provider: releases
skip_cleanup: true
api_key: $OAUTH_TOKEN
file: '${RELEASE_TARBALL}'
on:
tags: true
repo: $TRAVIS_REPO_SLUG
2016-08-03 15:16:39 +03:00
after_failure:
2016-08-10 12:04:27 +03:00
- |
echo "Dumping env."
find $CLING_LOCAL_BIN -type f -print0 -exec cat {} \;
2016-08-10 12:04:27 +03:00
$CMAKE --version
$CC --version
$CXX --version
ls -al `which ld` && ld -v
export
2016-08-03 15:16:39 +03:00
- |
2016-08-09 11:59:08 +03:00
echo "Dumping CMakeOutput.log"
2016-08-03 15:16:39 +03:00
cat /home/travis/ci/build/builddir/CMakeFiles/CMakeOutput.log
2016-08-09 11:59:08 +03:00
- |
echo "Dumping CMakeError.log"
2016-08-03 15:16:39 +03:00
cat /home/travis/ci/build/builddir/CMakeFiles/CMakeError.log
2016-08-09 11:59:08 +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 -
2016-08-10 12:04:27 +03:00
- |
echo "Dumping `which ccache`"
ccache -s
ls -la /usr/lib/ccache/ || ls -la /usr/local/opt/ccache/libexec