Skip to content

Commit 8a1303f

Browse files
committed
/deploy: only build mingw-w64-clang for ARM64
we're not using clang to build for other architectures, so we don't need to build it for other architectures Signed-off-by: Matthias Aßhauer <mha1993@live.de>
1 parent ffe1dbd commit 8a1303f

2 files changed

Lines changed: 31 additions & 3 deletions

File tree

GitForWindowsHelper/slash-commands.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ module.exports = async (context, req) => {
171171
)
172172
}
173173
} else {
174-
toTrigger.push(
175-
{ displayArchitecture: 'i686/x86_64' }
176-
)
174+
if (package_name !== 'mingw-w64-clang') {
175+
toTrigger.push(
176+
{ displayArchitecture: 'i686/x86_64' }
177+
)
178+
}
177179
if (needsSeparateARM64Build(package_name)) {
178180
toTrigger.push(
179181
{ architecture: 'aarch64', displayArchitecture: 'arm64' }

__tests__/index.test.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ let mockGitHubApiRequest = jest.fn((_context, _token, method, requestPath, paylo
109109
if (method === 'GET' && requestPath.endsWith('/pulls/74')) return {
110110
head: { sha: 'a7e4b90' }
111111
}
112+
if (method === 'GET' && requestPath.endsWith('/pulls/75')) return {
113+
head: { sha: '45b8fd0' }
114+
}
112115
if (method === 'GET' && requestPath.endsWith('/pulls/90')) return {
113116
head: { sha: '265d07e' }
114117
}
@@ -439,6 +442,29 @@ The workflow run [was started](dispatched-workflow-build-and-deploy.yml).`)
439442
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual(['i686'])
440443
})
441444

445+
446+
testIssueComment('/deploy mingw-w64-clang', {
447+
issue: {
448+
number: 75,
449+
title: 'shrink LLVM',
450+
body: '',
451+
pull_request: {
452+
html_url: 'https://github.com/git-for-windows/MINGW-packages/pull/75'
453+
}
454+
},
455+
repository: {
456+
name: 'MINGW-packages'
457+
}
458+
}, async (context) => {
459+
expect(await index(context, context.req)).toBeUndefined()
460+
expect(context.res.body).toEqual(`I edited the comment: appended-comment-body-existing comment body
461+
462+
The workflow run [was started](dispatched-workflow-build-and-deploy.yml).`)
463+
expect(mockQueueCheckRun).toHaveBeenCalledTimes(1)
464+
expect(mockUpdateCheckRun).toHaveBeenCalledTimes(1)
465+
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual(['aarch64'])
466+
})
467+
442468
testIssueComment('/add release note', {
443469
issue: {
444470
number: 4281,

0 commit comments

Comments
 (0)