Skip to content

Commit c5efa9c

Browse files
authored
Trigger UCRT64 runs upon /git-artifacts (#223)
With the migration from MINGW64 to UCRT64 kicked off over at git-for-windows/git-sdk-64#117, we need to build these artifacts for testing. Let's do that automatically with every cascading run that already triggers the `git-artifacts` workflow runs for the other architectures. This PR needs git-for-windows/git-for-windows-automation#181 to be merged first.
2 parents eca6327 + 795d7fc commit c5efa9c

2 files changed

Lines changed: 22 additions & 9 deletions

File tree

GitForWindowsHelper/cascading-runs.js

Lines changed: 5 additions & 3 deletions
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,
@@ -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: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ The \`tag-git\` workflow run [was started](https://url-to-tag-git/)
175175
git-artifacts-x86_64 run already exists at <url-to-existing-x86_64-run>.
176176
The \`git-artifacts-i686\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
177177
The \`git-artifacts-aarch64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
178+
The \`git-artifacts-ucrt64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
178179
`)
179180
return { html_url: 'https://github.com/git-for-windows/git/pull/4322#issuecomment-1450703020' }
180181
}
@@ -461,7 +462,8 @@ let mockListCheckRunsForCommit = jest.fn((_context, _token, _owner, _repo, rev,
461462
const id = {
462463
'git-artifacts-x86_64': 13010015190,
463464
'git-artifacts-i686': 13010015938,
464-
'git-artifacts-aarch64': 13010016895
465+
'git-artifacts-aarch64': 13010016895,
466+
'git-artifacts-ucrt64': 13010017042
465467
}[checkRunName]
466468
const output = {
467469
title: 'Build Git v2.48.0-rc2.windows.1-472-g0c796d3013-20250128120446 artifacts',
@@ -499,6 +501,7 @@ let mockListCheckRunsForCommit = jest.fn((_context, _token, _owner, _repo, rev,
499501
'git-artifacts-x86_64': 8664,
500502
'git-artifacts-i686': 686,
501503
'git-artifacts-aarch64':64,
504+
'git-artifacts-ucrt64': 64064
502505
}[checkRunName]
503506
const output = {
504507
title: 'Build already-tagged artifacts',
@@ -855,6 +858,7 @@ test('a completed `tag-git` run triggers `git-artifacts` runs', async () => {
855858
body: `git-artifacts-x86_64 run already exists at <url-to-existing-x86_64-run>.
856859
The \`git-artifacts-i686\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
857860
The \`git-artifacts-aarch64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
861+
The \`git-artifacts-ucrt64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
858862
`,
859863
headers: undefined,
860864
status: undefined
@@ -925,25 +929,31 @@ The \`tag-git\` workflow run [was started](dispatched-workflow-tag-git.yml)`,
925929
The \`git-artifacts-x86_64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
926930
The \`git-artifacts-i686\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
927931
The \`git-artifacts-aarch64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
932+
The \`git-artifacts-ucrt64\` workflow run [was started](dispatched-workflow-git-artifacts.yml).
928933
`,
929934
headers: undefined,
930935
status: undefined
931936
})
932937
expect(mockGetInstallationAccessToken).toHaveBeenCalled()
933938
expect(mockGitHubApiRequestAsApp).not.toHaveBeenCalled()
934-
expect(dispatchedWorkflows).toHaveLength(3)
939+
expect(dispatchedWorkflows).toHaveLength(4)
935940
expect(dispatchedWorkflows[0].html_url).toEqual('dispatched-workflow-git-artifacts.yml')
936941
expect(dispatchedWorkflows[0].payload.inputs).toEqual({
937-
architecture: 'aarch64',
942+
architecture: 'ucrt64',
938943
tag_git_workflow_run_id: "341"
939944
})
940945
expect(dispatchedWorkflows[1].html_url).toEqual('dispatched-workflow-git-artifacts.yml')
941946
expect(dispatchedWorkflows[1].payload.inputs).toEqual({
942-
architecture: 'i686',
947+
architecture: 'aarch64',
943948
tag_git_workflow_run_id: "341"
944949
})
945950
expect(dispatchedWorkflows[2].html_url).toEqual('dispatched-workflow-git-artifacts.yml')
946951
expect(dispatchedWorkflows[2].payload.inputs).toEqual({
952+
architecture: 'i686',
953+
tag_git_workflow_run_id: "341"
954+
})
955+
expect(dispatchedWorkflows[3].html_url).toEqual('dispatched-workflow-git-artifacts.yml')
956+
expect(dispatchedWorkflows[3].payload.inputs).toEqual({
947957
architecture: 'x86_64',
948958
tag_git_workflow_run_id: "341"
949959
})
@@ -1019,7 +1029,7 @@ test('a completed `release-git` run updates the `main` branch in git-for-windows
10191029
}
10201030
})
10211031

1022-
test('the third completed `git-artifacts-<arch>` check-run triggers an `upload-snapshot`', async () => {
1032+
test('the fourth completed `git-artifacts-<arch>` check-run triggers an `upload-snapshot`', async () => {
10231033
const context = makeContext({
10241034
action: 'completed',
10251035
check_run: {
@@ -1075,7 +1085,8 @@ test('the third completed `git-artifacts-<arch>` check-run triggers an `upload-s
10751085
inputs: {
10761086
git_artifacts_aarch64_workflow_run_id: "13010016895",
10771087
git_artifacts_i686_workflow_run_id: "13010015938",
1078-
git_artifacts_x86_64_workflow_run_id: "13010015190"
1088+
git_artifacts_x86_64_workflow_run_id: "13010015190",
1089+
git_artifacts_ucrt64_workflow_run_id: "13010017042"
10791090
},
10801091
return_run_details: true
10811092
}

0 commit comments

Comments
 (0)