<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/ci, branch v2.44.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.44.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.44.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-01-30T00:03:00Z</updated>
<entry>
<title>Merge branch 'js/oss-fuzz-build-in-ci'</title>
<updated>2024-01-30T00:03:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-30T00:03:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9869e02a645babb91be500ea11eabddc551850e2'/>
<id>urn:sha1:9869e02a645babb91be500ea11eabddc551850e2</id>
<content type='text'>
oss-fuzz tests are built and run in CI.

* js/oss-fuzz-build-in-ci:
  ci: build and run minimal fuzzers in GitHub CI
  fuzz: fix fuzz test build rules
</content>
</entry>
<entry>
<title>ci: build and run minimal fuzzers in GitHub CI</title>
<updated>2024-01-19T22:29:25Z</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2024-01-19T21:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c4a9cf1df38439ff40b8d64d8982a9cdcd345396'/>
<id>urn:sha1:c4a9cf1df38439ff40b8d64d8982a9cdcd345396</id>
<content type='text'>
To prevent bitrot, we would like to regularly exercise the fuzz tests in
order to make sure they still link &amp; run properly. We already compile
the fuzz test objects as part of the default `make` target, but we do
not link the executables due to the fuzz tests needing specific
compilers and compiler features. This has lead to frequent build
breakages for the fuzz tests.

To remedy this, we can add a CI step to actually link the fuzz
executables, and run them (with finite input rather than the default
infinite random input mode) to verify that they execute properly.

Since the main use of the fuzz tests is via OSS-Fuzz [1], and OSS-Fuzz
only runs tests on Linux [2], we only set up a CI test for the fuzzers
on Linux.

[1] https://github.com/google/oss-fuzz
[2] https://google.github.io/oss-fuzz/further-reading/fuzzer-environment/

Signed-off-by: Josh Steadmon &lt;steadmon@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ci: add macOS jobs to GitLab CI</title>
<updated>2024-01-18T19:53:17Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-01-18T10:23:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=56090a35ab20c21ef577bd1ed2d9d5b63eb5f649'/>
<id>urn:sha1:56090a35ab20c21ef577bd1ed2d9d5b63eb5f649</id>
<content type='text'>
Add a job to GitLab CI which runs tests on macOS, which matches the
equivalent "osx-clang" job that we have for GitHub Workflows. One
significant difference though is that this new job runs on Apple M1
machines and thus uses the "arm64" architecture. As GCC does not yet
support this comparatively new architecture we cannot easily include an
equivalent for the "osx-gcc" job that exists in GitHub Workflows.

Note that one test marked as `test_must_fail` is surprisingly passing:

  t7815-grep-binary.sh                             (Wstat: 0 Tests: 22 Failed: 0)
    TODO passed:   12

This seems to boil down to an unexpected difference in how regcomp(3P)
works when matching NUL bytes. Cross-checking with the respective GitHub
job shows that this is not an issue unique to the GitLab CI job as it
passes in the same way there.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ci: make p4 setup on macOS more robust</title>
<updated>2024-01-18T19:53:17Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-01-18T10:22:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c4b84b137ae7f18ac0fe30e2566725567b90ecca'/>
<id>urn:sha1:c4b84b137ae7f18ac0fe30e2566725567b90ecca</id>
<content type='text'>
When setting up Perforce on macOS we put both `p4` and `p4d` into
"$HOME/bin". On GitHub CI this directory is indeed contained in the PATH
environment variable and thus there is no need for additional setup than
to put the binaries there. But GitLab CI does not do this, and thus our
Perforce-based tests would be skipped there even though we download the
binaries.

Refactor the setup code to become more robust by downloading binaries
into a separate directory which we then manually append to our PATH.
This matches what we do on Linux-based jobs.

Note that it may seem like we already did append "$HOME/bin" to PATH
because we're actually removing the lines that adapt PATH. But we only
ever adapted the PATH variable in "ci/install-dependencies.sh", and
didn't adapt it when running "ci/run-build-and-test.sh". Consequently,
the required binaries wouldn't be found during the test run unless the
CI platform already had the "$HOME/bin" in PATH right from the start.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ci: handle TEST_OUTPUT_DIRECTORY when printing test failures</title>
<updated>2024-01-18T19:53:17Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-01-18T10:22:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=99c60edc5b83cb624b30b8f459da78c250c63f87'/>
<id>urn:sha1:99c60edc5b83cb624b30b8f459da78c250c63f87</id>
<content type='text'>
The TEST_OUTPUT_DIRECTORY environment variable can be used to instruct
the test suite to write test data and test results into a different
location than into "t/". The "ci/print-test-failures.sh" script does not
know to handle this environment variable though, which means that it
will search for test results in the wrong location if it was set.

Update the script to handle TEST_OUTPUT_DIRECTORY so that we can start
to set it in our CI.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>ci: add job performing static analysis on GitLab CI</title>
<updated>2024-01-08T19:23:03Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2023-12-28T11:02:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cd69c635a1a62b0c8bfdbf221778be8a512ad048'/>
<id>urn:sha1:cd69c635a1a62b0c8bfdbf221778be8a512ad048</id>
<content type='text'>
Our GitHub Workflows definitions have a static analysis job that
runs the following tasks:

  - Coccinelle to check for suggested refactorings.

  - `make hdr-check` to check for missing includes or forward
    declarations in our header files.

  - `make check-pot` to check our translations for issues.

  - `./ci/check-directional-formatting.bash` to check whether our
    sources contain any Unicode directional formatting code points.

Add an equivalent job to our GitLab CI definitions.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/ci-discard-prove-state'</title>
<updated>2023-12-10T00:37:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-12-10T00:37:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4e6618fdf3bbcdcae9340b694f80770ba5a3261'/>
<id>urn:sha1:b4e6618fdf3bbcdcae9340b694f80770ba5a3261</id>
<content type='text'>
The way CI testing used "prove" could lead to running the test
suite twice needlessly, which has been corrected.

* js/ci-discard-prove-state:
  ci: avoid running the test suite _twice_
</content>
</entry>
<entry>
<title>Merge branch 'ps/ci-gitlab'</title>
<updated>2023-12-10T00:37:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-12-10T00:37:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=14a4445d18eccc146b3340c2bdeeb15c81538938'/>
<id>urn:sha1:14a4445d18eccc146b3340c2bdeeb15c81538938</id>
<content type='text'>
Add support for GitLab CI.

* ps/ci-gitlab:
  ci: add support for GitLab CI
  ci: install test dependencies for linux-musl
  ci: squelch warnings when testing with unusable Git repo
  ci: unify setup of some environment variables
  ci: split out logic to set up failed test artifacts
  ci: group installation of Docker dependencies
  ci: make grouping setup more generic
  ci: reorder definitions for grouping functions
</content>
</entry>
<entry>
<title>Merge branch 'js/doc-unit-tests'</title>
<updated>2023-12-10T00:37:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-12-10T00:37:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8bf6fbd00dc74c5c83ff5a20ef9293a9d77845a8'/>
<id>urn:sha1:8bf6fbd00dc74c5c83ff5a20ef9293a9d77845a8</id>
<content type='text'>
Process to add some form of low-level unit tests has started.

* js/doc-unit-tests:
  ci: run unit tests in CI
  unit tests: add TAP unit test framework
  unit tests: add a project plan document
</content>
</entry>
<entry>
<title>ci: avoid running the test suite _twice_</title>
<updated>2023-11-14T00:24:23Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2023-11-13T20:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e7e03ef9950df84d60b093ab925ccf34a8453369'/>
<id>urn:sha1:e7e03ef9950df84d60b093ab925ccf34a8453369</id>
<content type='text'>
This is a late amendment of 4a6e4b960263 (CI: remove Travis CI support,
2021-11-23), whereby the `.prove` file (being written by the `prove`
command that is used to run the test suite) is no longer retained
between CI builds: This feature was only ever used in the Travis CI
builds, we tried for a while to do the same in Azure Pipelines CI runs
(but I gave up on it after a while), and we never used that feature in
GitHub Actions (nor does the new GitLab CI code use it).

Retaining the Prove cache has been fragile from the start, even though
the idea seemed good at the time, the idea being that the `.prove` file
caches information about previous `prove` runs (`save`) and uses them
(`slow`) to run the tests in the order from longer-running to shorter
ones, making optimal use of the parallelism implied by `--jobs=&lt;N&gt;`.

However, using a Prove cache can cause some surprising behavior: When
the `prove` caches information about a test script it has run,
subsequent `prove` runs (with `--state=slow`) will run the same test
script again even if said script is not specified on the `prove`
command-line!

So far, this bug did not matter. Right until d8f416bbb87c (ci: run unit
tests in CI, 2023-11-09) did it not matter.

But starting with that commit, we invoke `prove` _twice_ in CI, once to
run the regular test suite of regression test scripts, and once to run
the unit tests. Due to the bug, the second invocation re-runs all of the
tests that were already run as part of the first invocation. This not
only wastes build minutes, it also frequently causes the `osx-*` jobs to
fail because they already take a long time and now are likely to run
into a timeout.

The worst part about it is that there is actually no benefit to keep
running with `--state=slow,save`, ever since we decided no longer to
try to reuse the Prove cache between CI runs.

So let's just drop that Prove option and live happily ever after.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
