Commit 14c84cd5 authored by Junio C Hamano's avatar Junio C Hamano

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
parents d702d5c5 b92cb86e
...@@ -67,6 +67,16 @@ skip_good_tree () { ...@@ -67,6 +67,16 @@ skip_good_tree () {
exit 0 exit 0
} }
check_unignored_build_artifacts ()
{
! git ls-files --other --exclude-standard --error-unmatch \
-- ':/*' 2>/dev/null ||
{
echo "$(tput setaf 1)error: found unignored build artifacts$(tput sgr0)"
false
}
}
# Set 'exit on error' for all CI scripts to let the caller know that # Set 'exit on error' for all CI scripts to let the caller know that
# something went wrong. # something went wrong.
# Set tracing executed commands, primarily setting environment variables # Set tracing executed commands, primarily setting environment variables
...@@ -99,8 +109,8 @@ linux-clang|linux-gcc) ...@@ -99,8 +109,8 @@ linux-clang|linux-gcc)
export LINUX_P4_VERSION="16.2" export LINUX_P4_VERSION="16.2"
export LINUX_GIT_LFS_VERSION="1.5.2" export LINUX_GIT_LFS_VERSION="1.5.2"
P4_PATH="$(pwd)/custom/p4" P4_PATH="$HOME/custom/p4"
GIT_LFS_PATH="$(pwd)/custom/git-lfs" GIT_LFS_PATH="$HOME/custom/git-lfs"
export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH" export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH"
;; ;;
osx-clang|osx-gcc) osx-clang|osx-gcc)
......
...@@ -23,4 +23,6 @@ docker run \ ...@@ -23,4 +23,6 @@ docker run \
daald/ubuntu32:xenial \ daald/ubuntu32:xenial \
/usr/src/git/ci/run-linux32-build.sh $(id -u $USER) /usr/src/git/ci/run-linux32-build.sh $(id -u $USER)
check_unignored_build_artifacts
save_good_tree save_good_tree
...@@ -8,4 +8,6 @@ ...@@ -8,4 +8,6 @@
ln -s $HOME/travis-cache/.prove t/.prove ln -s $HOME/travis-cache/.prove t/.prove
make --quiet test make --quiet test
check_unignored_build_artifacts
save_good_tree save_good_tree
...@@ -18,6 +18,9 @@ test -s Documentation/git.xml ...@@ -18,6 +18,9 @@ test -s Documentation/git.xml
test -s Documentation/git.1 test -s Documentation/git.1
grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
rm -f stdout.log stderr.log
check_unignored_build_artifacts
# Build docs with AsciiDoctor # Build docs with AsciiDoctor
make clean make clean
make --jobs=2 USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.log >&2) 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 ...@@ -26,4 +29,7 @@ sed '/^GIT_VERSION = / d' stderr.log
test -s Documentation/git.html test -s Documentation/git.html
grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
rm -f stdout.log stderr.log
check_unignored_build_artifacts
save_good_tree save_good_tree
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment