aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-07-09 08:23:42 +0200
committerJunio C Hamano <gitster@pobox.com>2025-07-11 09:56:34 -0700
commitd3d6493dcf35cc0ffb4ed88da85c3b206f02936a (patch)
tree30f89d6ade859d8759d72c24211c980c184a8bb2
parent164cbd679c1bc9daf3176655b007971257bd681d (diff)
downloadgit-d3d6493dcf35cc0ffb4ed88da85c3b206f02936a.tar.gz
ci: use Meson's new `--slice` option
As executing our test suite is notoriously slow on Windows we use matrix jobs in our CI systems to slice up tests and run them via multiple jobs. On Meson this is done with a comparatively complex PowerShell invocation as Meson didn't yet have a native way to slice tests like this. I have upstreamed a new `--slice` option [1] that addresses this use case though, which has been merged and released with Meson 1.8. Both GitLab and GitHub CI have Meson 1.8.2 available by now, so let's update the jobs to use that new option. [1]: https://github.com/mesonbuild/meson/pull/14092 Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--.github/workflows/main.yml2
-rw-r--r--.gitlab-ci.yml2
2 files changed, 2 insertions, 2 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 7dbf9f7f12..d122e79415 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -298,7 +298,7 @@ jobs:
path: build
- name: Test
shell: pwsh
- run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }
+ run: meson test -C build --no-rebuild --print-errorlogs --slice "$(1+${{ matrix.nr }})/10"
regular:
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bb6d5b976c..af10ebb59a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -178,7 +178,7 @@ test:msvc-meson:
- job: "build:msvc-meson"
artifacts: true
script:
- - meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } }
+ - meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
parallel: 10
test:fuzz-smoke-tests: