blob: c20ec540c8488e1d3b589a66a69ba269342159d7 [file] [log] [blame]
Lars Schneider522354d2015-11-27 10:23:27 +01001language: c
2
Lars Schneiderce59dff2016-01-26 10:53:43 +01003sudo: false
4
Lars Schneider6272ed32016-01-26 10:53:42 +01005cache:
6 directories:
7 - $HOME/travis-cache
8
Lars Schneider522354d2015-11-27 10:23:27 +01009os:
10 - linux
11 - osx
12
13compiler:
14 - clang
15 - gcc
16
17addons:
18 apt:
19 packages:
20 - language-pack-is
Lars Schneidere7e9f5e2016-05-19 11:10:08 +020021 - git-svn
Lars Schneider522354d2015-11-27 10:23:27 +010022
23env:
24 global:
Lars Schneider658df952016-02-25 09:42:22 +010025 - DEVELOPER=1
Lars Schneider3d319f22016-04-28 08:26:32 +020026 # 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"
Lars Schneider522354d2015-11-27 10:23:27 +010031 - DEFAULT_TEST_TARGET=prove
Lars Schneider6272ed32016-01-26 10:53:42 +010032 - GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
Lars Schneider522354d2015-11-27 10:23:27 +010033 - GIT_TEST_OPTS="--verbose --tee"
Lars Schneider522354d2015-11-27 10:23:27 +010034 - GIT_TEST_CLONE_2GB=YesPlease
35 # t9810 occasionally fails on Travis CI OS X
36 # t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X
37 - GIT_SKIP_TESTS="t9810 t9816"
38
Lars Schneiderb98712b2016-05-04 10:38:36 +020039matrix:
40 include:
41 - env: Documentation
42 os: linux
43 compiler: clang
44 addons:
45 apt:
46 packages:
47 - asciidoc
48 - xmlto
49 before_install:
50 before_script:
51 script: ci/test-documentation.sh
52 after_failure:
53
Lars Schneider522354d2015-11-27 10:23:27 +010054before_install:
55 - >
56 case "${TRAVIS_OS_NAME:-linux}" in
57 linux)
58 mkdir --parents custom/p4
59 pushd custom/p4
Lars Schneider3d319f22016-04-28 08:26:32 +020060 wget --quiet http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION/bin.linux26x86_64/p4d
61 wget --quiet http://filehost.perforce.com/perforce/r$LINUX_P4_VERSION/bin.linux26x86_64/p4
Lars Schneider522354d2015-11-27 10:23:27 +010062 chmod u+x p4d
63 chmod u+x p4
64 export PATH="$(pwd):$PATH"
65 popd
66 mkdir --parents custom/git-lfs
67 pushd custom/git-lfs
Lars Schneider3d319f22016-04-28 08:26:32 +020068 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
69 tar --extract --gunzip --file "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
70 cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs .
Lars Schneider522354d2015-11-27 10:23:27 +010071 export PATH="$(pwd):$PATH"
72 popd
73 ;;
74 osx)
75 brew_force_set_latest_binary_hash () {
76 FORMULA=$1
77 SHA=$(brew fetch --force $FORMULA 2>&1 | grep ^SHA256: | cut -d ' ' -f 2)
78 sed -E -i.bak "s/sha256 \"[0-9a-f]{64}\"/sha256 \"$SHA\"/g" \
79 /usr/local/Library/Taps/homebrew/homebrew-binary/$FORMULA.rb
80 }
81 brew update --quiet
82 brew tap homebrew/binary --quiet
83 brew_force_set_latest_binary_hash perforce
84 brew_force_set_latest_binary_hash perforce-server
85 brew install git-lfs perforce-server perforce gettext
86 brew link --force gettext
87 ;;
88 esac;
89 echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)";
90 p4d -V | grep Rev.;
91 echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)";
92 p4 -V | grep Rev.;
93 echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)";
94 git-lfs version;
Lars Schneider6272ed32016-01-26 10:53:42 +010095 mkdir -p $HOME/travis-cache;
96 ln -s $HOME/travis-cache/.prove t/.prove;
Lars Schneider522354d2015-11-27 10:23:27 +010097
98before_script: make --jobs=2
99
100script: make --quiet test
101
102after_failure:
103 - >
104 : '<-- Click here to see detailed test output! ';
105 for TEST_EXIT in t/test-results/*.exit;
106 do
107 if [ "$(cat "$TEST_EXIT")" != "0" ];
108 then
109 TEST_OUT="${TEST_EXIT%exit}out";
110 echo "------------------------------------------------------------------------";
111 echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)";
112 echo "------------------------------------------------------------------------";
113 cat "${TEST_OUT}";
114 fi;
115 done;
116
117notifications:
118 email: false