Skip to content

Commit 8053838

Browse files
committed
git-artifacts: also build the UCRT64 flavor
Git for Windows is gaining a UCRT64 flavor, and I want the `/git-artifacts` command (as well as the snapshot builds that cascade from a `tag-git` run) to build those bits alongside the existing x86_64, i686 and aarch64 ones. The actual build logic lives in two other repositories: build-extra learns to assemble installers, portable Gits and the like from a UCRT64 SDK (git-for-windows/build-extra#719), and the git-artifacts pipeline gains `ucrt64` as a valid `architecture` choice (git-for-windows/git-for-windows-automation#179). This helper is what dispatches those pipeline runs, so once those two pull requests are merged it needs to start asking for the fourth architecture, too. `triggerGitArtifactsRuns()` is the single place both entry points funnel through: the `/git-artifacts` slash command when a `tag-git` run already succeeded, and the automatic cascade when a `tag-git` check-run completes. Adding `ucrt64` to its architecture list therefore covers both without touching anything else. I deliberately leave the `upload-snapshot` cascade and the `/release` command at the three established architectures for now, so the UCRT64 bits are built but not yet published anywhere. A completing `git-artifacts-ucrt64` check-run does still trigger the cascade handler, because that handler matches on the `git-artifacts-` name prefix, but it only ever looks up and forwards the three standard architectures' run IDs. The extra completion is therefore harmless and, conveniently, a failing UCRT64 build will not hold back the snapshot of the other three. Assisted-by: Opus 4.8 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 39de100 commit 8053838

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

GitForWindowsHelper/cascading-runs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const triggerGitArtifactsRuns = async (context, checkRunOwner, checkRunRepo, tag
5252

5353
const architecturesToTrigger = []
5454
const { listCheckRunsForCommit, queueCheckRun } = require('./check-runs')
55-
for (const architecture of ['x86_64', 'i686', 'aarch64']) {
55+
for (const architecture of ['x86_64', 'i686', 'aarch64', 'ucrt64']) {
5656
const workflowName = `git-artifacts-${architecture}`
5757
const runs = await listCheckRunsForCommit(
5858
context,

__tests__/index.test.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ The \`tag-git\` workflow run [was started](https://url-to-tag-git/)
172172
git-artifacts-x86_64 run already exists at <url-to-existing-x86_64-run>.
173173
The \`git-artifacts-i686\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
174174
The \`git-artifacts-aarch64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
175+
The \`git-artifacts-ucrt64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
175176
`)
176177
return { html_url: 'https://github.com/git-for-windows/git/pull/4322#issuecomment-1450703020' }
177178
}
@@ -829,6 +830,7 @@ test('a completed `tag-git` run triggers `git-artifacts` runs', async () => {
829830
body: `git-artifacts-x86_64 run already exists at <url-to-existing-x86_64-run>.
830831
The \`git-artifacts-i686\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
831832
The \`git-artifacts-aarch64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
833+
The \`git-artifacts-ucrt64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
832834
`,
833835
headers: undefined,
834836
status: undefined
@@ -899,25 +901,31 @@ The \`tag-git\` workflow run [was started](dispatched-workflow-tag-git.yml)`,
899901
The \`git-artifacts-x86_64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
900902
The \`git-artifacts-i686\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
901903
The \`git-artifacts-aarch64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
904+
The \`git-artifacts-ucrt64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
902905
`,
903906
headers: undefined,
904907
status: undefined
905908
})
906909
expect(mockGetInstallationAccessToken).toHaveBeenCalled()
907910
expect(mockGitHubApiRequestAsApp).not.toHaveBeenCalled()
908-
expect(dispatchedWorkflows).toHaveLength(3)
911+
expect(dispatchedWorkflows).toHaveLength(4)
909912
expect(dispatchedWorkflows[0].html_url).toEqual('dispatched-workflow-git-artifacts.yml')
910913
expect(dispatchedWorkflows[0].payload.inputs).toEqual({
911-
architecture: 'aarch64',
914+
architecture: 'ucrt64',
912915
tag_git_workflow_run_id: "341"
913916
})
914917
expect(dispatchedWorkflows[1].html_url).toEqual('dispatched-workflow-git-artifacts.yml')
915918
expect(dispatchedWorkflows[1].payload.inputs).toEqual({
916-
architecture: 'i686',
919+
architecture: 'aarch64',
917920
tag_git_workflow_run_id: "341"
918921
})
919922
expect(dispatchedWorkflows[2].html_url).toEqual('dispatched-workflow-git-artifacts.yml')
920923
expect(dispatchedWorkflows[2].payload.inputs).toEqual({
924+
architecture: 'i686',
925+
tag_git_workflow_run_id: "341"
926+
})
927+
expect(dispatchedWorkflows[3].html_url).toEqual('dispatched-workflow-git-artifacts.yml')
928+
expect(dispatchedWorkflows[3].payload.inputs).toEqual({
921929
architecture: 'x86_64',
922930
tag_git_workflow_run_id: "341"
923931
})

0 commit comments

Comments
 (0)