<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ci, branch v2.16.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.16.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.16.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-01-03T21:29:19Z</updated>
<entry>
<title>travis-ci: check that all build artifacts are .gitignore-d</title>
<updated>2018-01-03T21:29:19Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-31T16:02:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b92cb86ea1494c4dfbce28b29f05632ab9f3b179'/>
<id>urn:sha1:b92cb86ea1494c4dfbce28b29f05632ab9f3b179</id>
<content type='text'>
Every once in a while our explicit .gitignore files get out of sync
when our build process learns to create new artifacts, like test
helper executables, but the .gitignore files are not updated
accordingly.

Use Travis CI to help catch such issues earlier: check that there are
no untracked files at the end of any build jobs building Git (i.e. the
64 bit Clang and GCC Linux and OSX build jobs, plus the GETTEXT_POISON
and 32 bit Linux build jobs) or its documentation, and fail the build
job if there are any present.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: don't store P4 and Git LFS in the working tree</title>
<updated>2018-01-03T21:29:18Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-31T16:02:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88e00b70330449128d3fe1a074d71ccbe236cf4a'/>
<id>urn:sha1:88e00b70330449128d3fe1a074d71ccbe236cf4a</id>
<content type='text'>
The Clang and GCC 64 bit Linux build jobs download and store the P4
and Git LFS executables under the current directory, which is the
working tree that we are about to build and test.  This means that Git
commands like 'status' or 'ls-files' would list these files as
untracked.  The next commit is about to make sure that there are no
untracked files present after the build, and the downloaded
executables in the working tree are interfering with those upcoming
checks.

Therefore, let's download P4 and Git LFS in the home directory,
outside of the working tree.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: record and skip successfully built trees</title>
<updated>2018-01-02T19:25:58Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-31T10:12:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9cc2c76f5eaab557c42f67b9d574db89fd0865c2'/>
<id>urn:sha1:9cc2c76f5eaab557c42f67b9d574db89fd0865c2</id>
<content type='text'>
Travis CI dutifully builds and tests each new branch tip, even if its
tree has previously been successfully built and tested.  This happens
often enough in contributors' workflows, when a work-in-progress
branch is rebased changing e.g. only commit messages or the order or
number of commits while leaving the resulting code intact, and is then
pushed to a Travis CI-enabled GitHub fork.

This is wasting Travis CI's resources and is sometimes scary-annoying
when the new tip commit with a tree identical to the previous,
successfully tested one is suddenly reported in red, because one of
the OSX build jobs happened to exceed the time limit yet again.

So extend our Travis CI build scripts to skip building commits whose
trees have previously been successfully built and tested.  Use the
Travis CI cache feature to keep a record of the object names of trees
that tested successfully, in a plain and simple flat text file, one
line per tree object name.  Append the current tree's object name at
the end of every successful build job to this file, along with a bit
of additional info about the build job (commit object name, Travis CI
job number and id).  Limit the size of this file to 1000 records, to
prevent it from growing too large for git/git's forever living
integration branches.  Check, using a simple grep invocation, in each
build job whether the current commit's tree is already in there, and
skip the build if it is.  Include a message in the skipped build job's
trace log, containing the URL to the build job successfully testing
that tree for the first time and instructions on how to force a
re-build.  Catch the case when a build job, which successfully built
and tested a particular tree for the first time, is restarted and omit
the URL of the previous build job's trace log, as in this case it's
the same build job and the trace log has just been overwritten.

Note: this won't kick in if two identical trees are on two different
branches, because Travis CI caches are not shared between build jobs
of different branches.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Reviewed-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: create the cache directory early in the build process</title>
<updated>2018-01-02T19:25:57Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-31T10:12:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4a2fdc9bdc87fc8bd62e8bf7890482c590e558c'/>
<id>urn:sha1:b4a2fdc9bdc87fc8bd62e8bf7890482c590e558c</id>
<content type='text'>
It seems that Travis CI creates the cache directory for us anyway,
even when a previous cache doesn't exist for the current build job.
Alas, this behavior is not explicitly documented, therefore we don't
rely on it and create the cache directory ourselves in those build
jobs that read/write cached data (currently only the prove state).

In the following commit we'll start to cache additional data in every
build job, and will access the cache much earlier in the build
process.

Therefore move creating the cache directory to 'ci/lib-travisci.sh' to
make sure that it exists at the very beginning of every build job.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Reviewed-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: print the "tip of branch is exactly at tag" message in color</title>
<updated>2018-01-02T19:25:55Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-31T10:12:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=495ea6cd41216f16dfd5051e456fd86082d0593d'/>
<id>urn:sha1:495ea6cd41216f16dfd5051e456fd86082d0593d</id>
<content type='text'>
To make this info message stand out from the regular build job trace
output.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Reviewed-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: only print test failures if there are test results available</title>
<updated>2017-12-27T20:15:22Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-27T16:36:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=677c70799c70a4e176ff3743c7daafe5193b7b2c'/>
<id>urn:sha1:677c70799c70a4e176ff3743c7daafe5193b7b2c</id>
<content type='text'>
When a build job running the test suite fails, our
'ci/print-test-failures.sh' script scans all 't/test-results/*.exit'
files to find failed tests and prints their verbose output.  However,
if a build job were to fail before it ever gets to run the test suite,
then there will be no files to match the above pattern and the shell
will take the pattern literally, resulting in errors like this in the
trace log:

  cat: t/test-results/*.exit: No such file or directory
  ------------------------------------------------------------------------
  t/test-results/*.out...
  ------------------------------------------------------------------------
  cat: t/test-results/*.out: No such file or directory

Check upfront and proceed only if there are any such files present.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Reviewed-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: save prove state for the 32 bit Linux build</title>
<updated>2017-12-27T20:15:05Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-27T16:36:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7e72cfceed2e1e74e6bbe8ab41cacda4a66b0e4a'/>
<id>urn:sha1:7e72cfceed2e1e74e6bbe8ab41cacda4a66b0e4a</id>
<content type='text'>
This change follows suit of 6272ed319 (travis-ci: run previously
failed tests first, then slowest to fastest, 2016-01-26), which did
this for the Linux and OSX build jobs.  Travis CI build jobs run the
tests parallel, which is sligtly faster when tests are run in slowest
to fastest order, shortening the overall runtime of this build job by
about a minute / 10%.

Note, that the 32 bit Linux build job runs the tests suite in a Docker
container and we have to share the Travis CI cache directory with the
container as a second volume.  Otherwise we couldn't use a symlink
pointing to the prove state file in the cache directory, because
that's outside of the directory hierarchy accessible from within the
container.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Reviewed-by: Lars Schneider &lt;larsxschneider@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: fine tune the use of 'set -x' in 'ci/*' scripts</title>
<updated>2017-12-27T20:13:46Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-27T16:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a8b8b6b87dd027d6a6158c3589abca2c43a203a7'/>
<id>urn:sha1:a8b8b6b87dd027d6a6158c3589abca2c43a203a7</id>
<content type='text'>
The change in commit 4f2636667 (travis-ci: use 'set -x' in 'ci/*'
scripts for extra tracing output, 2017-12-12) left a couple of rough
edges:

  - 'ci/run-linux32-build.sh' is executed in a Docker container and
    therefore doesn't source 'ci/lib-travisci.sh', which would enable
    tracing executed commands.  Enable 'set -x' in this script, too.

  - 'ci/print-test-failures.sh' iterates over all the files containing
    the exit codes of all the executed test scripts.  Since there are
    over 800 such files, the loop produces way too much noise with
    tracing executed commands enabled, so disable 'set -x' for this
    script.

  - 'ci/run-windows-build.sh' busily waits in a loop for the result of
    the Windows build, producing too much noise with tracing executed
    commands enabled as well.  Disable 'set -x' for the duration of
    that loop.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: use 'set -x' in 'ci/*' scripts for extra tracing output</title>
<updated>2017-12-12T20:58:30Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-11T23:34:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4f263666791e76adae0128641fa362179b6caa6d'/>
<id>urn:sha1:4f263666791e76adae0128641fa362179b6caa6d</id>
<content type='text'>
While the build logic was embedded in our '.travis.yml', Travis CI
used to produce a nice trace log including all commands executed in
those embedded scriptlets.  Since 657343a60 (travis-ci: move Travis CI
code into dedicated scripts, 2017-09-10), however, we only see the
name of the dedicated scripts, but not what those scripts are actually
doing, resulting in a less useful trace log.  A patch later in this
series will move setting environment variables from '.travis.yml' to
the 'ci/*' scripts, so not even those will be included in the trace
log.

Use 'set -x' in 'ci/lib-travisci.sh', which is sourced in most other
'ci/*' scripts, so we get trace log about the commands executed in all
of those scripts.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>travis-ci: set GIT_TEST_HTTPD in 'ci/lib-travisci.sh'</title>
<updated>2017-12-12T20:58:28Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2017-12-11T23:34:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a1157b76ebb480a4a41a22f44cfa2d411693f326'/>
<id>urn:sha1:a1157b76ebb480a4a41a22f44cfa2d411693f326</id>
<content type='text'>
Commit 657343a60 (travis-ci: move Travis CI code into dedicated
scripts, 2017-09-10) converted '.travis.yml's default 'before_install'
scriptlet to the 'ci/install-dependencies.sh' script, and while doing
so moved setting GIT_TEST_HTTPD=YesPlease for the 64-bit GCC and Clang
Linux build jobs to that script.  This is wrong for two reasons:

 - The purpose of that script is, as its name suggests, to install
   dependencies, not to set any environment variables influencing
   which tests should be run (though, arguably, this was already an
   issue with the original 'before_install' scriptlet).

 - Setting the variable has no effect anymore, because that script is
   run in a separate shell process, and the variable won't be visible
   in any of the other scripts, notably in 'ci/run-tests.sh'
   responsible for, well, running the tests.

Luckily, this didn't have a negative effect on our Travis CI build
jobs, because GIT_TEST_HTTPD is a tri-state variable defaulting to
"auto" and a functioning web server was installed in those Linux build
jobs, so the httpd tests were run anyway.

Apparently the httpd tests run just fine without GIT_TEST_HTTPD being
set, therefore we could simply remove this environment variable.
However, if a bug were to creep in to change the Travis CI build
environment to run the tests as root or to not install Apache, then
the httpd tests would be skipped and the build job would still
succeed.  We would only notice if someone actually were to look
through the build job's trace log; but who would look at the trace log
of a successful build job?!

Since httpd tests are important, we do want to run them and we want to
be loudly reminded if they can't be run.  Therefore, move setting
GIT_TEST_HTTPD=YesPlease for the 64-bit GCC and Clang Linux build jobs
to 'ci/lib-travisci.sh' to ensure that the build job fails when the
httpd tests can't be run.  (We could set it in 'ci/run-tests.sh' just
as well, but it's better to keep all environment variables in one
place in 'ci/lib-travisci.sh'.)

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
