aboutsummaryrefslogtreecommitdiffstats
path: root/ci (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-10-28Merge branch 'ps/ci-rust'Junio C Hamano2-4/+35
CI improvements to handle the recent Rust integration better. * ps/ci-rust: rust: support for Windows ci: verify minimum supported Rust version ci: check for common Rust mistakes via Clippy rust/varint: add safety comments ci: check formatting of our Rust code ci: deduplicate calls to `apt-get update`
2025-10-15ci: verify minimum supported Rust versionPatrick Steinhardt2-0/+13
In the current state of our Rust code base we don't really have any requirements for the minimum supported Rust version yet, as we don't use any features introduced by a recent version of Rust. Consequently, we have decided that we want to aim for a rather old version and edition of Rust, where the hope is that using an old version will make alternatives like gccrs viable earlier for compiling Git. But while we specify the Rust edition, we don't yet specify a Rust version. And even if we did, the Rust version would only be enforced for our own code, but not for any of our dependencies. We don't yet have any dependencies at the current point in time. But let's add some safeguards by specifying the minimum supported Rust version and using cargo-msrv(1) to verify that this version can be satisfied for all of our dependencies. Note that we fix the version of cargo-msrv(1) at v0.18.1. This is the latest release supported by Ubuntu's Rust version. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15ci: check for common Rust mistakes via ClippyPatrick Steinhardt2-1/+6
Introduce a CI check that uses Clippy to perform checks for common mistakes and suggested code improvements. Clippy is the official static analyser of the Rust project and thus the de-facto standard. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15ci: check formatting of our Rust codePatrick Steinhardt2-0/+17
Introduce a CI check that verifies that our Rust code is well-formatted. This check uses `cargo fmt`, which is a wrapper around rustfmt(1) that executes formatting for all Rust source files. rustfmt(1) itself is the de-facto standard for formatting code in the Rust ecosystem. The rustfmt(1) tool allows to tweak the final format in theory. In practice though, the Rust ecosystem has aligned on style "editions". These editions only exist to ensure that any potential changes to the style don't cause reformats to existing code bases. Other than that, most Rust projects out there accept this default style of a specific edition. Let's do the same and use that default style. It may not be anyone's favorite, but it is consistent and by making it part of our CI we also enforce it right from the start. Note that we don't have to pick a specific style edition here, as the edition is automatically derived from the edition we have specified in our "Cargo.toml" file. The implemented script looks somewhat weird as we perfom manual error handling instead of using something like `set -e`. The intent here is that subsequent commits will add more checks, and we want to execute all of these checks regardless of whether or not a previous check failed. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15ci: deduplicate calls to `apt-get update`Patrick Steinhardt1-4/+0
When installing dependencies we first check for the distribution that is in use and then we check for the specific job. In the first step we already install all dependencies required to build and test Git, whereas the second step installs a couple of additional dependencies that are only required to perform job-specific tasks. In both steps we use `apt-get update` to update our repository sources. This is unnecessary though: all platforms that use Aptitude would have already executed this command in the distro-specific step anyway. Drop the redundant calls. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-13Merge branch 'ps/ci-avoid-broken-sudo-on-ubuntu'Junio C Hamano1-0/+9
Our CI script requires "sudo" that can be told to preserve environment, but Ubuntu replaced with "sudo" with an implementation that lacks the feature. Work this around by reinstalling the original version. * ps/ci-avoid-broken-sudo-on-ubuntu: ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)
2025-10-11ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)Patrick Steinhardt1-0/+9
Ubuntu 25.10 has been released. One prominent change in this version of Ubuntu is the switch to some Rust-based utilities. Part of this switch is also that Ubuntu now defaults to sudo-rs(1). Unfortunately, this breaks our CI because sudo-rs(1) does not support the `--preserve-env` flag. Let's revert back to the C-based sudo(1) implementation to fix this. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-08Merge branch 'ps/rust-balloon'Junio C Hamano2-23/+16
Dip our toes a bit to (optionally) use Rust implemented helper called from our C code. * ps/rust-balloon: ci: enable Rust for breaking-changes jobs ci: convert "pedantic" job into full build with breaking changes BreakingChanges: announce Rust becoming mandatory varint: reimplement as test balloon for Rust varint: use explicit width for integers help: report on whether or not Rust is enabled Makefile: introduce infrastructure to build internal Rust library Makefile: reorder sources after includes meson: add infrastructure to build internal Rust library
2025-10-07Merge branch 'ps/rust-balloon' into ps/ci-rustJunio C Hamano2-23/+16
* ps/rust-balloon: ci: enable Rust for breaking-changes jobs ci: convert "pedantic" job into full build with breaking changes BreakingChanges: announce Rust becoming mandatory varint: reimplement as test balloon for Rust varint: use explicit width for integers help: report on whether or not Rust is enabled Makefile: introduce infrastructure to build internal Rust library Makefile: reorder sources after includes meson: add infrastructure to build internal Rust library
2025-10-02Merge branch 'ps/meson-build-docs'Junio C Hamano1-2/+2
The build procedure based on meson learned a target to only build documentation, similar to "make doc". * ps/meson-build-docs: ci: don't compile whole project when testing docs with Meson meson: print docs backend as part of the summary meson: introduce a "docs" alias to compile documentation only
2025-10-02ci: enable Rust for breaking-changes jobsPatrick Steinhardt2-2/+4
Enable Rust for our breaking-changes jobs so that we can verify that the build infrastructure and the converted Rust subsystems work as expected. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-02ci: convert "pedantic" job into full build with breaking changesPatrick Steinhardt2-22/+13
The "pedantic" CI job is building on Fedora with `DEVOPTS=pedantic`. This build flag doesn't do anything anymore starting with 6a8cbc41ba (developer: enable pedantic by default, 2021-09-03), where we have flipped the default so that developers have to opt-out of pedantic builds via the "no-pedantic" option. As such, all this job really does is to do a normal build on Fedora, which isn't all that interesting. Convert that job into a full build-and-test job that uses Meson with breaking changes enabled. This plugs two gaps: - We now test on another distro that we didn't run tests on beforehand. - We verify that breaking changes work as expected with Meson. Furthermore, in a subsequent commit we'll modify both jobs that use breaking changes to also enable Rust. By converting the Fedora job to use Meson, we ensure that we test our Rust build infrastructure for both build systems. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-11ci: don't compile whole project when testing docs with MesonPatrick Steinhardt1-2/+2
Our "documentation" CI jobs, unsurprisingly, performs a couple of tests on our documentation. The job knows to not only test the documentation generated by our Makefile, but also by Meson. In the latter case with Meson we end up building the whole project, including all of the binaries. This is of course quite excessive and a waste of compute cycles, as we don't care about these binaries at all. Fix this by using the new "docs" target that we introduced in the preceding commit. Reported-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-09-10breaking-changes: switch default branch to mainPhillip Wood1-1/+0
Since 1296cbe4b46 (init: document `init.defaultBranch` better, 2020-12-11) "git-init.adoc" has advertised that the default name of the initial branch may change in the future. The name "main" is chosen to match the default used by the big Git forge web sites. The advice printed when init.defaultBranch is not set is updated to say that the default will change to "main" in Git 3.0. Building with WITH_BREAKING_CHANGES enabled removes the advice and changes the default branch name to "main". The code in guess_remote_head() that looks for "refs/heads/master" is left unchanged as that is only called when the remote server does not support the symref capability in the v0 protocol or the symref extension to the ls-refs list in the v2 protocol. Such an old server is more likely to be using "master" as the default branch name. With the exception of the "git-init.adoc" the documentation is left unchanged. I had hoped to parameterize the name of the default branch by using an asciidoc attribute. Unfortunately attribute expansion is inhibited by backticks and we use backticks to mark up ref names so that idea does not work. As the changes to git-init.adoc show inserting ifdef's around each instance of the branch name "master" is cumbersome and makes the documentation sources harder to read. Apart from "git-init.adoc" there are some other files where "master" is used as the name of the initial branch rather than as an example of a branch name such as "user-manual.adoc" and "gitcore-tutorial.adoc". The name appears a lot in those so updating it with ifdef's is not really practical. We can update that document in the 3.0 release cycle. The other documentation where master is used as an example branch name can be gradually converted over time. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-08-01Merge branch 'jc/ci-print-test-failures-fix'Junio C Hamano1-1/+1
CI fix. * jc/ci-print-test-failures-fix: ci: allow github-actions print test failures again
2025-07-16ci: allow github-actions print test failures againJunio C Hamano1-1/+1
eab5dbab (ci: wire up Meson builds, 2024-12-13) added two instances of a very similar construct FAILED_TEST_ARTIFACTS=${TEST_OUTPUT_DIRECTORY:-t}/failed-test-artifacts one to ci/lib.sh and the other to ci/print-test-failures.sh Unfortunately, the latter had a typo causing shell to emit "Bad substitution". Fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-07-02clang-format: add 'RemoveBracesLLVM' to the main configKarthik Nayak1-17/+1
In 1b8f306612 (ci/style-check: add `RemoveBracesLLVM` in CI job, 2024-07-23) we added 'RemoveBracesLLVM' to the CI job of running the clang formatter. This rule checks and warns against using braces on simple single-statement bodies of statements. Since we haven't had any issues regarding this rule, we can now move it into the main clang-format config and remove it from being CI exclusive. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-05-13Merge branch 'js/ci-buildsystems-cleanup'Junio C Hamano2-10/+0
Code clean-up around stale CI elements and building with Visual Studio. * js/ci-buildsystems-cleanup: config.mak.uname: drop the `vcxproj` target contrib/buildsystems: drop support for building . vcproj/.vcxproj files ci: stop linking the `prove` cache
2025-05-13Merge branch 'ps/ci-test-aggreg-fix-for-meson'Junio C Hamano1-0/+1
Test result aggregation did not work in Meson based CI jobs. * ps/ci-test-aggreg-fix-for-meson: ci: fix aggregation of test results with Meson
2025-05-12Merge branch 'jc/ci-skip-unavailable-external-software'Junio C Hamano1-13/+8
Further refinement on CI messages when an optional external software is unavailable (e.g. due to third-party service outage). * jc/ci-skip-unavailable-external-software: ci: download JGit from maven, not eclipse.org ci: update the message for unavailble third-party software
2025-05-05Merge branch 'kn/meson-hdr-check'Junio C Hamano1-1/+1
Add an equivalent to "make hdr-check" target to meson based builds. * kn/meson-hdr-check: makefile/meson: add 'check-headers' as alias for 'hdr-check' meson: add support for 'hdr-check' meson: rename 'third_party_sources' to 'third_party_excludes' meson: move headers definition from 'contrib/coccinelle' coccinelle: meson: rename variables to be more specific ci/github: install git before checking out the repository
2025-05-05ci: fix aggregation of test results with MesonPatrick Steinhardt1-0/+1
Our CI needs to be aware of the location of the test output directory so that it knows where to find test results. Some of our CI jobs achieve this by setting the `TEST_OUTPUT_DIRECTORY` environment variable, which ensures that the output will be written to that directory. Other jobs, especially on GitHub Workflows, don't set that environment variable and instead expect test results to be located in the source directory in "t/". The latter logic does not work with Meson though, as the test results are not written into the source directory by default, but instead into the build directory. As such, any job that uses Meson without setting the environment variable will be unable to locate and aggregate results. Fix this by explicitly setting the test output directory when we set up the Meson build directory. Like this, we can easily default to "t/" in the source directory when the value hasn't been set explicitly. Reported-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-05-05ci: stop linking the `prove` cacheJohannes Schindelin2-10/+0
It is not useful because we do not have any persisted directory anymore, not since dropping our Travis CI support. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-04-25ci: download JGit from maven, not eclipse.orgJunio C Hamano1-1/+1
As Matthias Sohn, JGit maintainer, recommends, update the JGit download link from repo.eclipse.org to a one in maven.org Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-04-25ci: update the message for unavailble third-party softwareJunio C Hamano1-12/+7
An earlier fix added an extra message immediately after failing to download a third-party package. But near the end of the script, their availability is checked again and given a message. Remove the new ones added with a recent fix, as they are redundant. If we were to add more places to download these software (e.g. for other platforms we currently do not download them on), the existing warnning near the end of the script will also trigger. While at it, as Dscho suggests, rewrite the WARNING: label on the warning message to ::warning::, which presumably should be shown a bit more prominently in the CI summary. Suggested-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-04-24Merge branch 'jc/ci-skip-unavailable-external-software'Junio C Hamano1-9/+22
Make sure outage of third-party sites that supply P4, Git-LFS, and JGit we use for testing would not prevent our CI jobs from running at all. * jc/ci-skip-unavailable-external-software: ci: skip unavailable external software
2025-04-24Merge branch 'jc/ci-skip-unavailable-external-software' into maint-2.49Junio C Hamano1-9/+22
Make sure outage of third-party sites that supply P4, Git-LFS, and JGit we use for testing would not prevent our CI jobs from running at all. * jc/ci-skip-unavailable-external-software: ci: skip unavailable external software
2025-04-24Merge branch 'js/ci-fedora-gawk' into maint-2.49Junio C Hamano1-1/+1
Work around CI breakage due to fedora base image getting updated. * js/ci-fedora-gawk: ci(pedantic): ensure that awk is installed
2025-04-24ci: skip unavailable external softwareJunio C Hamano1-9/+22
The ci/install-dependencies.sh script used in a very early phase of our CI jobs downloads Perforce, Git-LFS, and JGit, used for running the test scripts. The test framework is prepared to properly skip the tests that depend on these external software, but the CI script is unnecessarily strict (due to its use of "set -e" in ci/lib.sh) and fails the entire CI run before even starting to test the rest of the system. Notice a failure to download to any of these external software, but keep going. We need to be careful about cleaning after a failed wget, as a later part of the script that does: if type jgit >/dev/null 2>&1 then echo "$(tput setaf 6)JGit Version$(tput sgr0)" jgit version else echo >&2 "WARNING: JGit wasn't installed, see above for clues why" fi will (surprise!) succeed running "type jgit", and then fail with "jgit version", taking the whole thing down due to "set -e". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-04-23makefile/meson: add 'check-headers' as alias for 'hdr-check'Karthik Nayak1-1/+1
The 'hdr-check' target in Meson and makefile is used to check if headers can be compiled individually. The naming however isn't readable as 'hdr' is not a common shortforme for 'header', neither is it an abbreviation. Let's introduce 'check-headers' as an alternative target for 'hdr-check' and add a `TODO` to deprecate the latter after 2 releases. Since this is an internal tool, we can use a shorter deprecation cycle. Change existing usage of 'hdr-check' in 'ci/run-static-analysis.sh' to also use 'check-headers'. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-04-17Merge branch 'en/merge-recursive-debug'Junio C Hamano1-1/+0
Remove remnants of the recursive merge strategy backend, which was superseded by the ort merge strategy. * en/merge-recursive-debug: builtin/{merge,rebase,revert}: remove GIT_TEST_MERGE_ALGORITHM tests: remove GIT_TEST_MERGE_ALGORITHM and test_expect_merge_algorithm merge-recursive.[ch]: thoroughly debug these merge, sequencer: switch recursive merges over to ort sequencer: switch non-recursive merges over to ort merge-ort: enable diff-algorithms other than histogram builtin/merge-recursive: switch to using merge_ort_generic() checkout: replace merge_trees() with merge_ort_nonrecursive()
2025-04-16Merge branch 'js/ci-fedora-gawk'Junio C Hamano1-1/+1
Work around CI breakage due to fedora base image getting updated. * js/ci-fedora-gawk: ci(pedantic): ensure that awk is installed
2025-04-16Merge branch 'js/ci-github-update-ubuntu'Junio C Hamano1-1/+1
Adjust to the deprecation of use of Ubuntu 20.04 GitHub Actions CI. * js/ci-github-update-ubuntu: ci: upgrade `sparse` to supported build agents
2025-04-16ci(pedantic): ensure that awk is installedJohannes Schindelin1-1/+1
The image pointed to by the fedora:latest tag has moved from fedora 41 to 42. The fedora 41 container images have awk installed while the fedora 42 images do not. That change is most likely just part of reducing the size of the base container images. In both AlmaLinux and Fedora (as well as other RHEL derivatives/relatives), awk is provided by the gawk package. On Fedora, `dnf install awk` would work, by using the package filelist data to determine that /usr/bin/awk is provided by gawk and installs gawk as a result. On AlmaLinux (8 & 9, by quick testing by Todd), that is not the case and you'd need to use `dnf install gawk` or `dnf install '*bin/awk'` to get it installed. Having said that, awk _is_ included in the current AlmaLinux 8 and 9 images, so it isn't strictly needed. But it's probably better to be explicit that we need it installed, as a defense against some future change to the AlmaLinux container removing awk. Because we know that on both of these distros, our scripts that call for 'awk' had been using 'gawk' that was installed as part of the base image, let's make sure that we explicitly install 'gawk'. If the image already has it, it would be a no-op that does not cause breakage. Suggested-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-04-09ci: upgrade `sparse` to supported build agentsJohannes Schindelin1-1/+1
The `sparse` job still uses the `ubuntu-20.04` runner pool, but that pool is about to go away, so let's stop using it. There is no `sparse-22.04` artifact provided by the "Build sparse for Ubuntu" Azure Pipeline, but that is not necessary anyway because Ubuntu 22.04 has the `sparse` package: https://packages.ubuntu.com/jammy/sparse Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-04-08tests: remove GIT_TEST_MERGE_ALGORITHM and test_expect_merge_algorithmElijah Newren1-1/+0
Both of these existed to allow us to reuse all the merge-related tests in the testsuite while easily flipping between the 'recursive' and the 'ort' backends. Now that we have removed merge-recursive and remapped 'recursive' to mean 'ort', we don't need this scaffolding anymore. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-04-08Merge branch 'ps/ci-meson-check-build-docs'Junio C Hamano1-6/+21
CI update. * ps/ci-meson-check-build-docs: ci: perform build and smoke tests for Meson docs
2025-03-21ci: add build checking for side-effects in assert() callsElijah Newren2-0/+20
It is a big no-no to have side-effects in an assertion, because if the assert() is compiled out, you don't get that side-effect, leading to the code behaving differently. That can be a large headache to debug. We have roughly 566 assert() calls in our codebase (my grep might have picked up things that aren't actually assert() calls, but most appeared to be). All but 9 of them can be determined by gcc to be free of side effects with a clever redefine of assert() provided by Bruno De Fraine (from https://stackoverflow.com/questions/10593492/catching-assert-with-side-effects), who upon request has graciously placed his two-liner into the public domain without warranty of any kind. The current 9 assert() calls flagged by this clever redefinition of assert() appear to me to be free of side effects as well, but are too complicated for a compiler/linker to figure that since each assertion involves some kind of function call. Add a CI job which will find and report these possibly problematic assertions, and have the job suggest to the user that they replace these with ASSERT() calls. Example output from running: ``` ERROR: The compiler could not verify the following assert() calls are free of side-effects. Please replace with ASSERT() calls. /home/newren/floss/git/diffcore-rename.c:1409 assert(!dir_rename_count || strmap_empty(dir_rename_count)); /home/newren/floss/git/merge-ort.c:1645 assert(renames->deferred[side].trivial_merges_okay && !strset_contains(&renames->deferred[side].target_dirs, path)); /home/newren/floss/git/merge-ort.c:794 assert(omittable_hint == (!starts_with(type_short_descriptions[type], "CONFLICT") && !starts_with(type_short_descriptions[type], "ERROR")) || type == CONFLICT_DIR_RENAME_SUGGESTED); /home/newren/floss/git/merge-recursive.c:1200 assert(!merge_remote_util(commit)); /home/newren/floss/git/object-file.c:2709 assert(would_convert_to_git_filter_fd(istate, path)); /home/newren/floss/git/parallel-checkout.c:280 assert(is_eligible_for_parallel_checkout(pc_item->ce, &pc_item->ca)); /home/newren/floss/git/scalar.c:244 assert(have_fsmonitor_support()); /home/newren/floss/git/scalar.c:254 assert(have_fsmonitor_support()); /home/newren/floss/git/sequencer.c:4968 assert(!(opts->signoff || opts->no_commit || opts->record_origin || should_edit(opts) || opts->committer_date_is_author_date || opts->ignore_date)); ``` Note that if there are possibly problematic assertions, not necessarily all of them will be shown in a single run, because the compiler errors may include something like "ld: ... more undefined references to `not_supposed_to_survive' follow" instead of listing each individually. But in such cases, once you clean up a few that are shown in your first run, subsequent runs will show (some of) the ones that remain, allowing you to iteratively remove them all. Helped-by: Bruno De Fraine <defraine@gmail.com> Signed-off-by: Elijah Newren <newren@gmail.com> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-03-12ci: perform build and smoke tests for Meson docsPatrick Steinhardt1-6/+21
Our "documentation" CI job performs a couple of tests against our documentation. Part of these tests is to check whether documentation builds at all and whether it spits out the expected set of files. We don't yet have such a test for Meson, which means that we wouldn't notice at all if building the documentation were to break. As a result, breakages as fixed by 87eccc3a81d (meson: fix building technical and howto docs, 2025-03-02) are easy to go unnoticed. Address this test gap by starting to build both manpages and HTML sites as part of the CI job. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-20ci: exercise credential helpersPatrick Steinhardt2-1/+7
Wire up credential helpers in our CI runs so that we can rest assured that they compile and (if tests are available) function correctly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-20ci: fix propagating UTF-8 test locale in musl-based Meson jobPatrick Steinhardt1-2/+2
The musl-based Meson job is supposed to explicitly specify the UTF-8 locale used for testing, which has been introduced with 84bb5eeace7 (ci: switch linux-musl to use Meson, 2025-01-28). That commit had two issues though: - We continue to refer to "linux-musl", even though the job has been renamed in the same commit to "linux-musl-meson". - We use the wrong option name to specify the locale. This was not noticed though due to the first issue. Fix both of these issues by fixing both the job and option naems. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-02-06Merge branch 'ps/zlib-ng'Junio C Hamano3-7/+5
The code paths to interact with zlib has been cleaned up in preparation for building with zlib-ng. * ps/zlib-ng: ci: make "linux-musl" job use zlib-ng ci: switch linux-musl to use Meson compat/zlib: allow use of zlib-ng as backend git-zlib: cast away potential constness of `next_in` pointer compat/zlib: provide stubs for `deflateSetHeader()` compat/zlib: provide `deflateBound()` shim centrally git-compat-util: move include of "compat/zlib.h" into "git-zlib.h" compat: introduce new "zlib.h" header git-compat-util: drop `z_const` define compat: drop `uncompress2()` compatibility shim
2025-02-06Merge branch 'ps/ci-misc-updates'Junio C Hamano3-37/+8
CI updates (containerization, dropping stale ones, etc.). * ps/ci-misc-updates: ci: remove stale code for Azure Pipelines ci: use latest Ubuntu release ci: stop special-casing for Ubuntu 16.04 gitlab-ci: add linux32 job testing against i386 gitlab-ci: remove the "linux-old" job github: simplify computation of the job's distro github: convert all Linux jobs to be containerized github: adapt containerized jobs to be rootless t7422: fix flaky test caused by buffered stdout t0060: fix EBUSY in MinGW when setting up runtime prefix
2025-02-03Merge branch 'ps/build-meson-fixes'Junio C Hamano1-1/+3
More build fixes and enhancements on meson based build procedure. * ps/build-meson-fixes: ci: wire up Visual Studio build with Meson ci: raise error when Meson generates warnings meson: fix compilation with Visual Studio meson: make the CSPRNG backend configurable meson: wire up fuzzers meson: wire up generation of distribution archive meson: wire up development environments meson: fix dependencies for generated headers meson: populate project version via GIT-VERSION-GEN GIT-VERSION-GEN: allow running without input and output files GIT-VERSION-GEN: simplify computing the dirty marker
2025-02-03Merge branch 'ps/3.0-remote-deprecation'Junio C Hamano2-6/+2
Following the procedure we established to introduce breaking changes for Git 3.0, allow an early opt-in for removing support of $GIT_DIR/branches/ and $GIT_DIR/remotes/ directories to configure remotes. * ps/3.0-remote-deprecation: remote: announce removal of "branches/" and "remotes/" builtin/pack-redundant: remove subcommand with breaking changes ci: repurpose "linux-gcc" job for deprecations ci: merge linux-gcc-default into linux-gcc Makefile: wire up build option for deprecated features
2025-01-28ci: make "linux-musl" job use zlib-ngPatrick Steinhardt1-1/+1
We don't yet have any test coverage for the new zlib-ng backend as part of our CI. Add it by installing zlib-ng in Alpine Linux, which causes Meson to pick it up automatically. Note that we are somewhat limited with regards to where we run that job: Debian-based distributions don't have zlib-ng in their repositories, Fedora has it but doesn't run tests, and Alma Linux doesn't have the package either. Alpine Linux does have it available and is running our test suite, which is why it was picked. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-01-28ci: switch linux-musl to use MesonPatrick Steinhardt3-6/+4
Switch over the "linux-musl" job to use Meson instead of Makefiles. This is done due to multiple reasons: - It simplifies our CI infrastructure a bit as we don't have to manually specify a couple of build options anymore. - It verifies that Meson detects and sets those build options automatically. - It makes it easier for us to wire up a new CI job using zlib-ng as backend. One platform compatibility that Meson cannot easily detect automatically is the `GIT_TEST_UTF8_LOCALE` variable used in tests. Wire up a build option for it, which we set via a new "MESONFLAGS" environment variable. Note that we also drop the CC variable, which is set to "gcc". We already default to GCC when CC is unset in "ci/lib.sh", so this is not needed. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-01-22ci: raise error when Meson generates warningsPatrick Steinhardt1-0/+1
Meson prints warnings in several cases, like for example when using a feature supported by the current version of Meson, but not yet supported by the minimum required version as declared by the project. These warnings will not cause the setup to fail by default, which makes it quite easy to miss them. Improve this by passing `--fatal-meson-warnings` to `meson setup` so that our CI jobs will fail on warnings. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-01-22meson: wire up fuzzersPatrick Steinhardt1-1/+2
Meson does not yet know to build our fuzzers. Introduce a new build option "fuzzers" and wire up the fuzzers in case it is enabled. Adapt our CI jobs so that they build the fuzzers by default. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-01-22ci: repurpose "linux-gcc" job for deprecationsPatrick Steinhardt1-1/+2
The "linux-gcc" job isn't all that interesting by itself and can be considered more or less the "standard" job: it is running with a reasonably up-to-date image and uses GCC as a compiler, both of which we already cover in other jobs. There is one exception though: we change the default branch to be "main" instead of "master", so it is forging ahead a bit into the future to make sure that this change does not cause havoc. So let's expand on this a bit and also add the new "WITH_BREAKING_CHANGES" flag to the mix. Rename the job to "linux-breaking-changes" accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>