]>
Commit | Line | Data |
---|---|---|
522354d7 LS |
1 | language: c |
2 | ||
6272ed31 LS |
3 | cache: |
4 | directories: | |
5 | - $HOME/travis-cache | |
6 | ||
522354d7 LS |
7 | os: |
8 | - linux | |
9 | - osx | |
10 | ||
11 | compiler: | |
12 | - clang | |
13 | - gcc | |
14 | ||
15 | addons: | |
16 | apt: | |
17 | packages: | |
18 | - language-pack-is | |
19 | ||
20 | env: | |
21 | global: | |
22 | - P4_VERSION="15.2" | |
23 | - GIT_LFS_VERSION="1.1.0" | |
24 | - DEFAULT_TEST_TARGET=prove | |
6272ed31 | 25 | - GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save" |
522354d7 LS |
26 | - GIT_TEST_OPTS="--verbose --tee" |
27 | - CFLAGS="-g -O2 -Wall -Werror" | |
28 | - GIT_TEST_CLONE_2GB=YesPlease | |
29 | # t9810 occasionally fails on Travis CI OS X | |
30 | # t9816 occasionally fails with "TAP out of sequence errors" on Travis CI OS X | |
31 | - GIT_SKIP_TESTS="t9810 t9816" | |
32 | ||
33 | before_install: | |
34 | - > | |
35 | case "${TRAVIS_OS_NAME:-linux}" in | |
36 | linux) | |
37 | mkdir --parents custom/p4 | |
38 | pushd custom/p4 | |
39 | wget --quiet http://filehost.perforce.com/perforce/r$P4_VERSION/bin.linux26x86_64/p4d | |
40 | wget --quiet http://filehost.perforce.com/perforce/r$P4_VERSION/bin.linux26x86_64/p4 | |
41 | chmod u+x p4d | |
42 | chmod u+x p4 | |
43 | export PATH="$(pwd):$PATH" | |
44 | popd | |
45 | mkdir --parents custom/git-lfs | |
46 | pushd custom/git-lfs | |
47 | wget --quiet https://github.com/github/git-lfs/releases/download/v$GIT_LFS_VERSION/git-lfs-linux-amd64-$GIT_LFS_VERSION.tar.gz | |
48 | tar --extract --gunzip --file "git-lfs-linux-amd64-$GIT_LFS_VERSION.tar.gz" | |
49 | cp git-lfs-$GIT_LFS_VERSION/git-lfs . | |
50 | export PATH="$(pwd):$PATH" | |
51 | popd | |
52 | ;; | |
53 | osx) | |
54 | brew_force_set_latest_binary_hash () { | |
55 | FORMULA=$1 | |
56 | SHA=$(brew fetch --force $FORMULA 2>&1 | grep ^SHA256: | cut -d ' ' -f 2) | |
57 | sed -E -i.bak "s/sha256 \"[0-9a-f]{64}\"/sha256 \"$SHA\"/g" \ | |
58 | /usr/local/Library/Taps/homebrew/homebrew-binary/$FORMULA.rb | |
59 | } | |
60 | brew update --quiet | |
61 | brew tap homebrew/binary --quiet | |
62 | brew_force_set_latest_binary_hash perforce | |
63 | brew_force_set_latest_binary_hash perforce-server | |
64 | brew install git-lfs perforce-server perforce gettext | |
65 | brew link --force gettext | |
66 | ;; | |
67 | esac; | |
68 | echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"; | |
69 | p4d -V | grep Rev.; | |
70 | echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"; | |
71 | p4 -V | grep Rev.; | |
72 | echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"; | |
73 | git-lfs version; | |
6272ed31 LS |
74 | mkdir -p $HOME/travis-cache; |
75 | ln -s $HOME/travis-cache/.prove t/.prove; | |
522354d7 LS |
76 | |
77 | before_script: make --jobs=2 | |
78 | ||
79 | script: make --quiet test | |
80 | ||
81 | after_failure: | |
82 | - > | |
83 | : '<-- Click here to see detailed test output! '; | |
84 | for TEST_EXIT in t/test-results/*.exit; | |
85 | do | |
86 | if [ "$(cat "$TEST_EXIT")" != "0" ]; | |
87 | then | |
88 | TEST_OUT="${TEST_EXIT%exit}out"; | |
89 | echo "------------------------------------------------------------------------"; | |
90 | echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)"; | |
91 | echo "------------------------------------------------------------------------"; | |
92 | cat "${TEST_OUT}"; | |
93 | fi; | |
94 | done; | |
95 | ||
96 | notifications: | |
97 | email: false |