When building on Travis, use clone that Travis has already done. Saves some time, and necessary for pull-requests.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
This commit is contained in:
Frederich Munch 2016-08-13 12:11:20 -04:00 committed by sftnight
parent eeb1e10e8b
commit 6e13c66259
2 changed files with 18 additions and 4 deletions

View File

@ -20,8 +20,6 @@ env:
- 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
- EXECUTE_COMMAND=
- CXX_COMPILER=
@ -109,6 +107,9 @@ matrix:
install:
# If cmake is not in the cache, download it.
- |
CLING_USER_ROOT=`dirname $TRAVIS_BUILD_DIR`
export CLING_BUILD_DEPS="$CLING_USER_ROOT/deps"
export CLING_LOCAL_BIN="$CLING_USER_ROOT/bin"
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
@ -147,7 +148,7 @@ before_script:
script:
- |
if [ -z $TRAVIS_TAG ]; then
if [ "$TRAVIS_BRANCH" == "master" ]; then
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; 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

View File

@ -1736,7 +1736,20 @@ if args['current_dev']:
'utf-8')
fetch_llvm(llvm_revision)
fetch_clang(llvm_revision)
fetch_cling('master')
# Travis has already cloned the repo out, so don;t do it again
# Particularly important for building a pull-request
travisBuildDir = os.environ.get('TRAVIS_BUILD_DIR', None)
if travisBuildDir:
clingDir = os.path.join(srcdir, 'tools', 'cling')
os.rename(travisBuildDir, clingDir)
# Check validity and show some info
box_draw("Using Travis clone, last 5 commits:")
exec_subprocess_call('git log -5 --pretty=format:"%h <%ae> %<(60,trunc)%s"', clingDir)
print('\n')
else:
fetch_cling('master')
set_version()
if args['current_dev'] == 'tar':
if OS == 'Windows':