]>
Commit | Line | Data |
---|---|---|
522354d7 LS |
1 | language: c |
2 | ||
ce59dffb LS |
3 | sudo: false |
4 | ||
6272ed31 LS |
5 | cache: |
6 | directories: | |
7 | - $HOME/travis-cache | |
8 | ||
522354d7 LS |
9 | os: |
10 | - linux | |
11 | - osx | |
12 | ||
13 | compiler: | |
14 | - clang | |
15 | - gcc | |
16 | ||
17 | addons: | |
18 | apt: | |
19 | packages: | |
20 | - language-pack-is | |
e7e9f5e7 | 21 | - git-svn |
522354d7 LS |
22 | |
23 | env: | |
24 | global: | |
658df95a | 25 | - DEVELOPER=1 |
3d319f2c LS |
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" | |
522354d7 | 31 | - DEFAULT_TEST_TARGET=prove |
6272ed31 | 32 | - GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save" |
522354d7 | 33 | - GIT_TEST_OPTS="--verbose --tee" |
522354d7 LS |
34 | - 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 | ||
b98712b9 LS |
39 | matrix: |
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 | ||
522354d7 LS |
54 | before_install: |
55 | - > | |
56 | case "${TRAVIS_OS_NAME:-linux}" in | |
57 | linux) | |
58 | mkdir --parents custom/p4 | |
59 | pushd custom/p4 | |
3d319f2c LS |
60 | 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 | |
522354d7 LS |
62 | 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 | |
3d319f2c LS |
68 | 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 . | |
522354d7 LS |
71 | 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 | |
e3efa94b JS |
85 | # Uncomment this if you want to run perf tests: |
86 | # brew install gnu-time | |
522354d7 LS |
87 | brew install git-lfs perforce-server perforce gettext |
88 | brew link --force gettext | |
89 | ;; | |
90 | esac; | |
91 | echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"; | |
92 | p4d -V | grep Rev.; | |
93 | echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"; | |
94 | p4 -V | grep Rev.; | |
95 | echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"; | |
96 | git-lfs version; | |
6272ed31 LS |
97 | mkdir -p $HOME/travis-cache; |
98 | ln -s $HOME/travis-cache/.prove t/.prove; | |
522354d7 LS |
99 | |
100 | before_script: make --jobs=2 | |
101 | ||
102 | script: make --quiet test | |
103 | ||
104 | after_failure: | |
105 | - > | |
106 | : '<-- Click here to see detailed test output! '; | |
107 | for TEST_EXIT in t/test-results/*.exit; | |
108 | do | |
109 | if [ "$(cat "$TEST_EXIT")" != "0" ]; | |
110 | then | |
111 | TEST_OUT="${TEST_EXIT%exit}out"; | |
112 | echo "------------------------------------------------------------------------"; | |
113 | echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)"; | |
114 | echo "------------------------------------------------------------------------"; | |
115 | cat "${TEST_OUT}"; | |
116 | fi; | |
117 | done; | |
118 | ||
119 | notifications: | |
120 | email: false |