Skip to content

Commit d3d6493

Browse files
pks-tgitster
authored andcommitted
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]: mesonbuild/meson#14092 Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 164cbd6 commit d3d6493

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ jobs:
298298
path: build
299299
- name: Test
300300
shell: pwsh
301-
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 }
301+
run: meson test -C build --no-rebuild --print-errorlogs --slice "$(1+${{ matrix.nr }})/10"
302302

303303
regular:
304304
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ test:msvc-meson:
178178
- job: "build:msvc-meson"
179179
artifacts: true
180180
script:
181-
- 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 } }
181+
- meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
182182
parallel: 10
183183

184184
test:fuzz-smoke-tests:

0 commit comments

Comments
 (0)