Skip to content

Commit f62b471

Browse files
committed
Merge branch 'sg/travis-fixes'
Assorted updates for TravisCI integration. * sg/travis-fixes: travis-ci: use 'set -x' in 'ci/*' scripts for extra tracing output travis-ci: set GIT_TEST_HTTPD in 'ci/lib-travisci.sh' travis-ci: move setting environment variables to 'ci/lib-travisci.sh' travis-ci: introduce a $jobname variable for 'ci/*' scripts
2 parents 0635812 + 4f26366 commit f62b471

File tree

3 files changed

+39
-29
lines changed

3 files changed

+39
-29
lines changed

.travis.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,14 @@ addons:
2121
- git-svn
2222
- apache2
2323

24-
env:
25-
global:
26-
- DEVELOPER=1
27-
# The Linux build installs the defined dependency versions below.
28-
# The OS X build installs the latest available versions. Keep that
29-
# in mind when you encounter a broken OS X build!
30-
- LINUX_P4_VERSION="16.2"
31-
- LINUX_GIT_LFS_VERSION="1.5.2"
32-
- DEFAULT_TEST_TARGET=prove
33-
- GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
34-
- GIT_TEST_OPTS="--verbose-log"
35-
- GIT_TEST_CLONE_2GB=YesPlease
36-
# t9810 occasionally fails on Travis CI OS X
37-
# t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X
38-
- GIT_SKIP_TESTS="t9810 t9816"
39-
4024
matrix:
4125
include:
42-
- env: GETTEXT_POISON=YesPlease
26+
- env: jobname=GETTEXT_POISON
4327
os: linux
4428
compiler:
4529
addons:
4630
before_install:
47-
- env: Windows
31+
- env: jobname=Windows
4832
os: linux
4933
compiler:
5034
addons:
@@ -55,15 +39,15 @@ matrix:
5539
test "$TRAVIS_REPO_SLUG" != "git/git" ||
5640
ci/run-windows-build.sh $TRAVIS_BRANCH $(git rev-parse HEAD)
5741
after_failure:
58-
- env: Linux32
42+
- env: jobname=Linux32
5943
os: linux
6044
compiler:
6145
services:
6246
- docker
6347
before_install:
6448
before_script:
6549
script: ci/run-linux32-docker.sh
66-
- env: Static Analysis
50+
- env: jobname=StaticAnalysis
6751
os: linux
6852
compiler:
6953
addons:
@@ -74,7 +58,7 @@ matrix:
7458
before_script:
7559
script: ci/run-static-analysis.sh
7660
after_failure:
77-
- env: Documentation
61+
- env: jobname=Documentation
7862
os: linux
7963
compiler:
8064
addons:

ci/install-dependencies.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
P4WHENCE=http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION
99
LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
1010

11-
case "${TRAVIS_OS_NAME:-linux}" in
12-
linux)
13-
export GIT_TEST_HTTPD=YesPlease
14-
11+
case "$jobname" in
12+
linux-clang|linux-gcc)
1513
mkdir --parents "$P4_PATH"
1614
pushd "$P4_PATH"
1715
wget --quiet "$P4WHENCE/bin.linux26x86_64/p4d"
@@ -26,7 +24,7 @@ linux)
2624
cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs .
2725
popd
2826
;;
29-
osx)
27+
osx-clang|osx-gcc)
3028
brew update --quiet
3129
# Uncomment this if you want to run perf tests:
3230
# brew install gnu-time

ci/lib-travisci.sh

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,42 @@ skip_branch_tip_with_tag () {
2323

2424
# Set 'exit on error' for all CI scripts to let the caller know that
2525
# something went wrong
26-
set -e
26+
set -ex
2727

2828
skip_branch_tip_with_tag
2929

30-
case "${TRAVIS_OS_NAME:-linux}" in
31-
linux)
30+
if test -z "$jobname"
31+
then
32+
jobname="$TRAVIS_OS_NAME-$CC"
33+
fi
34+
35+
export DEVELOPER=1
36+
export DEFAULT_TEST_TARGET=prove
37+
export GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
38+
export GIT_TEST_OPTS="--verbose-log"
39+
export GIT_TEST_CLONE_2GB=YesPlease
40+
41+
case "$jobname" in
42+
linux-clang|linux-gcc)
43+
export GIT_TEST_HTTPD=YesPlease
44+
45+
# The Linux build installs the defined dependency versions below.
46+
# The OS X build installs the latest available versions. Keep that
47+
# in mind when you encounter a broken OS X build!
48+
export LINUX_P4_VERSION="16.2"
49+
export LINUX_GIT_LFS_VERSION="1.5.2"
50+
3251
P4_PATH="$(pwd)/custom/p4"
3352
GIT_LFS_PATH="$(pwd)/custom/git-lfs"
3453
export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
3554
;;
55+
osx-clang|osx-gcc)
56+
# t9810 occasionally fails on Travis CI OS X
57+
# t9816 occasionally fails with "TAP out of sequence errors" on
58+
# Travis CI OS X
59+
export GIT_SKIP_TESTS="t9810 t9816"
60+
;;
61+
GETTEXT_POISON)
62+
export GETTEXT_POISON=YesPlease
63+
;;
3664
esac

0 commit comments

Comments
 (0)