173 lines
4.5 KiB
YAML
173 lines
4.5 KiB
YAML
language: cpp
|
|
sudo: false
|
|
|
|
|
|
os:
|
|
- linux
|
|
- osx
|
|
|
|
|
|
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/
|
|
- TIMEOUT=0
|
|
- secure: "DQSDJnYWR7kb2ylcE1e4GIfP9KJadHjG696HelK09zmsTJiRoxg2HhDnm3gHkrPh18AxYJAMW1rZHm0ZsnBKpS09NxOcPVseL+z3iWfBFpgCa2ueUMKHy/YBhNghmLOXVeQzGwol6iCU5xbO4ZMJHpytmQCH6Vm9ws7sg8kiatY="
|
|
|
|
|
|
# Do not build our sync branch.
|
|
branches:
|
|
except:
|
|
- /^__internal.*$/
|
|
|
|
|
|
matrix:
|
|
# 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:
|
|
|
|
# 1. Linux Clang Builds
|
|
|
|
- os: linux
|
|
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
|
|
|
|
- os: osx
|
|
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'
|
|
|
|
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
|
|
|
|
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"
|
|
export CMAKE=$CLING_BUILD_DEPS/cmake/bin/cmake
|
|
elif [ $TRAVIS_OS_NAME == 'osx' ] ; then
|
|
CMAKE_URL="https://cmake.org/files/v3.6/cmake-3.6.0-Darwin-x86_64.tar.gz"
|
|
export CMAKE=$CLING_BUILD_DEPS/cmake/CMake.app/Contents/bin/cmake
|
|
brew install ccache python
|
|
PATH=/usr/local/opt/ccache/libexec:$PATH
|
|
# 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
|
|
fi
|
|
|
|
# Implement a platform-independent timeout function.
|
|
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
|
|
|
|
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
|
|
|
|
before_script:
|
|
- export CC=${CC_COMPILER}
|
|
- export CXX=${CXX_COMPILER}
|
|
- export PATH=$CLING_LOCAL_BIN:$PATH
|
|
|
|
#- export
|
|
#- which ccache
|
|
- $CMAKE --version
|
|
- $CC --version
|
|
- $CXX --version
|
|
|
|
script:
|
|
- |
|
|
# 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
|
|
|
|
if [ -z $TRAVIS_TAG ]; then
|
|
timeout $TIMEOUT tools/packaging/cpt.py --current-dev=tar --with-cling-url=https://github.com/$TRAVIS_REPO_SLUG --verbose --debug-on-error
|
|
else
|
|
tools/packaging/cpt.py --tarbal-tag=$TRAVIS_TAG --with-cling-url=https://github.com/$TRAVIS_REPO_SLUG
|
|
fi
|
|
|
|
# Convert the timeout exit code to 0.
|
|
RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else false; fi;
|
|
|
|
- ccache -s
|
|
|
|
notifications:
|
|
recipients:
|
|
- cling-dev@cern.ch
|
|
email:
|
|
on_success: change
|
|
on_failure: always
|
|
template:
|
|
- "%{repository}/%{branch} (%{commit} - %{author}): %{message}"
|
|
- "Build details: %{build_url}"
|
|
- "Change view : %{compare_url}"
|
|
|
|
before_deploy:
|
|
- export RELEASE_TARBALL=$(ls $HOME/ci/build/cling*.tar.bz2)
|
|
- 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
|
|
|
|
after_failure:
|
|
- |
|
|
cat /home/travis/ci/build/builddir/CMakeFiles/CMakeOutput.log
|
|
cat /home/travis/ci/build/builddir/CMakeFiles/CMakeError.log
|