Thread (1 message) 1 message, 1 author, 2025-07-08

Re: [PATCH 8/8] ci: use Meson's new `--slice` option

From: Junio C Hamano <hidden>
Date: 2025-07-08 04:39:33

Jeff King [off-list ref] writes:
quoted hunk
That does renumber the job titles. Probably not important, but they
wouldn't match the non-meson ones anymore (though I am not sure if we
even slice in the same way, so maybe it does not matter at all).

Anyway, the more minimal fix is:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 673b1c44b9..7739bd2d76 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -306,7 +306,7 @@ jobs:
         path: build
     - name: Test
       shell: pwsh
-      run: meson test -C build --no-rebuild --print-errorlogs --slice ${{ matrix.nr }}/10
+      run: meson test -C build --no-rebuild --print-errorlogs --slice "$(1+${{ matrix.nr }})/10"
It is confusing that $(...) is not a command substitution in shell
but somehow performs arithmetic X-<.
   regular:
     name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})

with the additional bonus that I can put "PowerShell Hacker" on my
resume now.

Curiously the quotes around the whole thing are required. If you do
just:

  $(1+1)/10

you will get two arguments: "2" and "/10". Definitely surprising to me
coming from a bourne shell background.
True.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help