Skip to content

Commit 795d7fc

Browse files
committed
upload-snapshot: feed the UCRT64 artifacts into the snapshots
The previous commit taught `/git-artifacts` to build the UCRT64 flavor, but the `upload-snapshot` cascade still only ever waited for, and forwarded, the three classic architectures. The freshly built UCRT64 bits were therefore dropped on the floor: nothing waited for that run and nothing handed its ID to the snapshot upload. Now that the snapshot pipeline can pick those bits up (git-for-windows/git-for-windows-automation#181 adds an optional `git_artifacts_ucrt64_workflow_run_id` input to `upload-snapshot.yml`, downloading the UCRT64 artifacts when the input is supplied), this teaches the helper to supply it. Both places that dispatch `upload-snapshot.yml` learn about the fourth architecture: the `git-artifacts` completion cascade in `cascadingRuns()`, and the push-to-`main` path in `handlePush()`. Adding `ucrt64` to the loop that gathers the per-architecture run IDs means the upload is held back until the UCRT64 build has finished, exactly like the other three, and the gathered ID is then passed along as the new input. This deliberately stops at snapshots. The full-release path (`/release`, which drives `release-git.yml`, and the automation side's own `architectures` list in `github-release.js`) is left UCRT64-free for the time being. Because `upload-snapshot.yml` does not declare the new input until #181 lands, dispatching it with that input beforehand would be rejected, so this change must not be merged before #181. Assisted-by: Opus 4.8 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 8053838 commit 795d7fc

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

GitForWindowsHelper/cascading-runs.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ const cascadingRuns = async (context, req) => {
194194

195195
const workFlowRunIDs = {}
196196
const { listCheckRunsForCommit, queueCheckRun } = require('./check-runs')
197-
for (const architecture of ['x86_64', 'i686', 'aarch64']) {
197+
for (const architecture of ['x86_64', 'i686', 'aarch64', 'ucrt64']) {
198198
const workflowName = `git-artifacts-${architecture}`
199199
const runs = name === workflowName ? [req.body.check_run] : await listCheckRunsForCommit(
200200
context,
@@ -258,6 +258,7 @@ const cascadingRuns = async (context, req) => {
258258
git_artifacts_x86_64_workflow_run_id: workFlowRunIDs['x86_64'],
259259
git_artifacts_i686_workflow_run_id: workFlowRunIDs['i686'],
260260
git_artifacts_aarch64_workflow_run_id: workFlowRunIDs['aarch64'],
261+
git_artifacts_ucrt64_workflow_run_id: workFlowRunIDs['ucrt64'],
261262
}
262263
)
263264

@@ -392,7 +393,7 @@ const handlePush = async (context, req) => {
392393

393394
try {
394395
const workFlowRunIDs = {}
395-
for (const architecture of ['x86_64', 'i686', 'aarch64']) {
396+
for (const architecture of ['x86_64', 'i686', 'aarch64', 'ucrt64']) {
396397
const workflowName = `git-artifacts-${architecture}`
397398
const runs = await listCheckRunsForCommit(
398399
context,
@@ -438,6 +439,7 @@ const handlePush = async (context, req) => {
438439
git_artifacts_x86_64_workflow_run_id: workFlowRunIDs['x86_64'],
439440
git_artifacts_i686_workflow_run_id: workFlowRunIDs['i686'],
440441
git_artifacts_aarch64_workflow_run_id: workFlowRunIDs['aarch64'],
442+
git_artifacts_ucrt64_workflow_run_id: workFlowRunIDs['ucrt64'],
441443
}
442444
)
443445

__tests__/index.test.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,8 @@ let mockListCheckRunsForCommit = jest.fn((_context, _token, _owner, _repo, rev,
459459
const id = {
460460
'git-artifacts-x86_64': 13010015190,
461461
'git-artifacts-i686': 13010015938,
462-
'git-artifacts-aarch64': 13010016895
462+
'git-artifacts-aarch64': 13010016895,
463+
'git-artifacts-ucrt64': 13010017042
463464
}[checkRunName]
464465
const output = {
465466
title: 'Build Git v2.48.0-rc2.windows.1-472-g0c796d3013-20250128120446 artifacts',
@@ -497,6 +498,7 @@ let mockListCheckRunsForCommit = jest.fn((_context, _token, _owner, _repo, rev,
497498
'git-artifacts-x86_64': 8664,
498499
'git-artifacts-i686': 686,
499500
'git-artifacts-aarch64':64,
501+
'git-artifacts-ucrt64': 64064
500502
}[checkRunName]
501503
const output = {
502504
title: 'Build already-tagged artifacts',
@@ -1001,7 +1003,7 @@ test('a completed `release-git` run updates the `main` branch in git-for-windows
10011003
}
10021004
})
10031005

1004-
test('the third completed `git-artifacts-<arch>` check-run triggers an `upload-snapshot`', async () => {
1006+
test('the fourth completed `git-artifacts-<arch>` check-run triggers an `upload-snapshot`', async () => {
10051007
const context = makeContext({
10061008
action: 'completed',
10071009
check_run: {
@@ -1057,7 +1059,8 @@ test('the third completed `git-artifacts-<arch>` check-run triggers an `upload-s
10571059
inputs: {
10581060
git_artifacts_aarch64_workflow_run_id: "13010016895",
10591061
git_artifacts_i686_workflow_run_id: "13010015938",
1060-
git_artifacts_x86_64_workflow_run_id: "13010015190"
1062+
git_artifacts_x86_64_workflow_run_id: "13010015190",
1063+
git_artifacts_ucrt64_workflow_run_id: "13010017042"
10611064
},
10621065
return_run_details: true
10631066
}

0 commit comments

Comments
 (0)