OSDN Git Service

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