Start post 2.13 cycle
[alt-git.git] / .travis.yml
blob48cb00a581ec784446434d69ffdfe7a84612de12
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       compiler:
56       services:
57         - docker
58       before_install:
59         - docker pull daald/ubuntu32:xenial
60       before_script:
61       script:
62         - >
63           docker run
64           --interactive
65           --env DEVELOPER
66           --env DEFAULT_TEST_TARGET
67           --env GIT_PROVE_OPTS
68           --env GIT_TEST_OPTS
69           --env GIT_TEST_CLONE_2GB
70           --volume "${PWD}:/usr/src/git"
71           daald/ubuntu32:xenial
72           /usr/src/git/ci/run-linux32-build.sh $(id -u $USER)
73         # Use the following command to debug the docker build locally:
74         # $ docker run -itv "${PWD}:/usr/src/git" --entrypoint /bin/bash daald/ubuntu32:xenial
75         # root@container:/# /usr/src/git/ci/run-linux32-build.sh
76     - env: Static Analysis
77       os: linux
78       compiler:
79       addons:
80         apt:
81           packages:
82           - coccinelle
83       before_install:
84       script:
85         # "before_script" that builds Git is inherited from base job
86         - make coccicheck
87       after_failure:
88     - env: Documentation
89       os: linux
90       compiler:
91       addons:
92         apt:
93           packages:
94           - asciidoc
95           - xmlto
96       before_install:
97       before_script: gem install asciidoctor
98       script: ci/test-documentation.sh
99       after_failure:
101 before_install:
102   - >
103     case "${TRAVIS_OS_NAME:-linux}" in
104     linux)
105       export GIT_TEST_HTTPD=YesPlease
107       mkdir --parents custom/p4
108       pushd custom/p4
109         wget --quiet http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION/bin.linux26x86_64/p4d
110         wget --quiet http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION/bin.linux26x86_64/p4
111         chmod u+x p4d
112         chmod u+x p4
113         export PATH="$(pwd):$PATH"
114       popd
115       mkdir --parents custom/git-lfs
116       pushd custom/git-lfs
117         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
118         tar --extract --gunzip --file "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
119         cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs .
120         export PATH="$(pwd):$PATH"
121       popd
122       ;;
123     osx)
124       brew update --quiet
125       # Uncomment this if you want to run perf tests:
126       # brew install gnu-time
127       brew install git-lfs gettext
128       brew link --force gettext
129       brew install caskroom/cask/perforce
130       ;;
131     esac;
132     echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)";
133     p4d -V | grep Rev.;
134     echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)";
135     p4 -V | grep Rev.;
136     echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)";
137     git-lfs version;
138     mkdir -p $HOME/travis-cache;
139     ln -s $HOME/travis-cache/.prove t/.prove;
141 before_script: make --jobs=2
143 script: make --quiet test
145 after_failure:
146   - >
147     : '<-- Click here to see detailed test output!                                                        ';
148     for TEST_EXIT in t/test-results/*.exit;
149     do
150       if [ "$(cat "$TEST_EXIT")" != "0" ];
151       then
152         TEST_OUT="${TEST_EXIT%exit}out";
153         echo "------------------------------------------------------------------------";
154         echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)";
155         echo "------------------------------------------------------------------------";
156         cat "${TEST_OUT}";
157       fi;
158     done;
160 notifications:
161   email: false