travis-ci: set DEVELOPER knob for Linux32 build
[git/raj.git] / .travis.yml
blob658a219ee129c0108f6362024b775d162e70073d
1 language: c
3 sudo: false
5 cache:
6   directories:
7     - $HOME/travis-cache
9 os:
10   - linux
11   - osx
13 compiler:
14   - clang
15   - gcc
17 addons:
18   apt:
19     packages:
20     - language-pack-is
21     - git-svn
22     - apache2
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"
40 matrix:
41   include:
42     - env: Windows
43       os: linux
44       compiler:
45       addons:
46       before_install:
47       before_script:
48       script:
49         - >
50           test "$TRAVIS_REPO_SLUG" != "git/git" ||
51           ci/run-windows-build.sh $TRAVIS_BRANCH $(git rev-parse HEAD)
52       after_failure:
53     - env: Linux32
54       os: linux
55       services:
56         - docker
57       before_install:
58         - docker pull daald/ubuntu32:xenial
59       before_script:
60       script:
61         - >
62           docker run
63           --interactive
64           --env DEVELOPER
65           --env DEFAULT_TEST_TARGET
66           --env GIT_PROVE_OPTS
67           --env GIT_TEST_OPTS
68           --env GIT_TEST_CLONE_2GB
69           --volume "${PWD}:/usr/src/git"
70           daald/ubuntu32:xenial
71           /usr/src/git/ci/run-linux32-build.sh $(id -u $USER)
72         # Use the following command to debug the docker build locally:
73         # $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/bash daald/ubuntu32:xenial
74         # root@container:/# /usr/src/git/ci/run-linux32-build.sh
75     - env: Documentation
76       os: linux
77       compiler: clang
78       addons:
79         apt:
80           packages:
81           - asciidoc
82           - xmlto
83       before_install:
84       before_script:
85       script: ci/test-documentation.sh
86       after_failure:
88 before_install:
89   - >
90     case "${TRAVIS_OS_NAME:-linux}" in
91     linux)
92       export GIT_TEST_HTTPD=YesPlease
94       mkdir --parents custom/p4
95       pushd custom/p4
96         wget --quiet http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION/bin.linux26x86_64/p4d
97         wget --quiet http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION/bin.linux26x86_64/p4
98         chmod u+x p4d
99         chmod u+x p4
100         export PATH="$(pwd):$PATH"
101       popd
102       mkdir --parents custom/git-lfs
103       pushd custom/git-lfs
104         wget --quiet https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz
105         tar --extract --gunzip --file "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
106         cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs .
107         export PATH="$(pwd):$PATH"
108       popd
109       ;;
110     osx)
111       brew update --quiet
112       # Uncomment this if you want to run perf tests:
113       # brew install gnu-time
114       brew install git-lfs gettext
115       brew link --force gettext
116       brew install caskroom/cask/perforce
117       ;;
118     esac;
119     echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)";
120     p4d -V | grep Rev.;
121     echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)";
122     p4 -V | grep Rev.;
123     echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)";
124     git-lfs version;
125     mkdir -p $HOME/travis-cache;
126     ln -s $HOME/travis-cache/.prove t/.prove;
128 before_script: make --jobs=2
130 script: make --quiet test
132 after_failure:
133   - >
134     : '<-- Click here to see detailed test output!                                                        ';
135     for TEST_EXIT in t/test-results/*.exit;
136     do
137       if [ "$(cat "$TEST_EXIT")" != "0" ];
138       then
139         TEST_OUT="${TEST_EXIT%exit}out";
140         echo "------------------------------------------------------------------------";
141         echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)";
142         echo "------------------------------------------------------------------------";
143         cat "${TEST_OUT}";
144       fi;
145     done;
147 notifications:
148   email: false