Skip to content

Commit 14c84cd

Browse files
committed
Merge branch 'sg/travis-check-untracked'
* sg/travis-check-untracked: travis-ci: check that all build artifacts are .gitignore-d travis-ci: don't store P4 and Git LFS in the working tree
2 parents d702d5c + b92cb86 commit 14c84cd

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

ci/lib-travisci.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ skip_good_tree () {
6767
exit 0
6868
}
6969

70+
check_unignored_build_artifacts ()
71+
{
72+
! git ls-files --other --exclude-standard --error-unmatch \
73+
-- ':/*' 2>/dev/null ||
74+
{
75+
echo "$(tput setaf 1)error: found unignored build artifacts$(tput sgr0)"
76+
false
77+
}
78+
}
79+
7080
# Set 'exit on error' for all CI scripts to let the caller know that
7181
# something went wrong.
7282
# Set tracing executed commands, primarily setting environment variables
@@ -99,8 +109,8 @@ linux-clang|linux-gcc)
99109
export LINUX_P4_VERSION="16.2"
100110
export LINUX_GIT_LFS_VERSION="1.5.2"
101111

102-
P4_PATH="$(pwd)/custom/p4"
103-
GIT_LFS_PATH="$(pwd)/custom/git-lfs"
112+
P4_PATH="$HOME/custom/p4"
113+
GIT_LFS_PATH="$HOME/custom/git-lfs"
104114
export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
105115
;;
106116
osx-clang|osx-gcc)

ci/run-linux32-docker.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ docker run \
2323
daald/ubuntu32:xenial \
2424
/usr/src/git/ci/run-linux32-build.sh $(id -u $USER)
2525

26+
check_unignored_build_artifacts
27+
2628
save_good_tree

ci/run-tests.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@
88
ln -s $HOME/travis-cache/.prove t/.prove
99
make --quiet test
1010

11+
check_unignored_build_artifacts
12+
1113
save_good_tree

ci/test-documentation.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ test -s Documentation/git.xml
1818
test -s Documentation/git.1
1919
grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
2020

21+
rm -f stdout.log stderr.log
22+
check_unignored_build_artifacts
23+
2124
# Build docs with AsciiDoctor
2225
make clean
2326
make --jobs=2 USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
@@ -26,4 +29,7 @@ sed '/^GIT_VERSION = / d' stderr.log
2629
test -s Documentation/git.html
2730
grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
2831

32+
rm -f stdout.log stderr.log
33+
check_unignored_build_artifacts
34+
2935
save_good_tree

0 commit comments

Comments
 (0)