travis-ci: enable web server tests t55xx on Linux
[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     - apache2
22
23 env:
24   global:
25     - DEVELOPER=1
26     # The Linux build installs the defined dependency versions below.
27     # The OS X build installs the latest available versions. Keep that
28     # in mind when you encounter a broken OS X build!
29     - LINUX_P4_VERSION="16.1"
30     - LINUX_GIT_LFS_VERSION="1.2.0"
31     - DEFAULT_TEST_TARGET=prove
32     - GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
33     - GIT_TEST_OPTS="--verbose --tee"
34     - GIT_TEST_HTTPD=true
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: Documentation
43       os: linux
44       compiler: clang
45       addons:
46         apt:
47           packages:
48           - asciidoc
49           - xmlto
50       before_install:
51       before_script:
52       script: ci/test-documentation.sh
53       after_failure:
54
55 before_install:
56   - >
57     case "${TRAVIS_OS_NAME:-linux}" in
58     linux)
59       mkdir --parents custom/p4
60       pushd custom/p4
61         wget --quiet http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION/bin.linux26x86_64/p4d
62         wget --quiet http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION/bin.linux26x86_64/p4
63         chmod u+x p4d
64         chmod u+x p4
65         export PATH="$(pwd):$PATH"
66       popd
67       mkdir --parents custom/git-lfs
68       pushd custom/git-lfs
69         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
70         tar --extract --gunzip --file "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
71         cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs .
72         export PATH="$(pwd):$PATH"
73       popd
74       ;;
75     osx)
76       brew_force_set_latest_binary_hash () {
77         FORMULA=$1
78         SHA=$(brew fetch --force $FORMULA 2>&1 | grep ^SHA256: | cut -d ' ' -f 2)
79         sed -E -i.bak "s/sha256 \"[0-9a-f]{64}\"/sha256 \"$SHA\"/g" \
80           /usr/local/Library/Taps/homebrew/homebrew-binary/$FORMULA.rb
81       }
82       brew update --quiet
83       brew tap homebrew/binary --quiet
84       brew_force_set_latest_binary_hash perforce
85       brew_force_set_latest_binary_hash perforce-server
86       brew install git-lfs perforce-server perforce gettext
87       brew link --force gettext
88       ;;
89     esac;
90     echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)";
91     p4d -V | grep Rev.;
92     echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)";
93     p4 -V | grep Rev.;
94     echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)";
95     git-lfs version;
96     mkdir -p $HOME/travis-cache;
97     ln -s $HOME/travis-cache/.prove t/.prove;
98
99 before_script: make --jobs=2
100
101 script: make --quiet test
102
103 after_failure:
104   - >
105     : '<-- Click here to see detailed test output!                                                        ';
106     for TEST_EXIT in t/test-results/*.exit;
107     do
108       if [ "$(cat "$TEST_EXIT")" != "0" ];
109       then
110         TEST_OUT="${TEST_EXIT%exit}out";
111         echo "------------------------------------------------------------------------";
112         echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)";
113         echo "------------------------------------------------------------------------";
114         cat "${TEST_OUT}";
115       fi;
116     done;
117
118 notifications:
119   email: false