Skip to content

Commit

Permalink
Merge pull request #36 from rimrul/mingw-w64-clang-only-arm64
Browse files Browse the repository at this point in the history
/deploy: only build mingw-w64-clang for ARM64
  • Loading branch information
dscho authored Jul 2, 2023
2 parents ffe1dbd + 8a1303f commit 87d45b6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
8 changes: 5 additions & 3 deletions GitForWindowsHelper/slash-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ module.exports = async (context, req) => {
)
}
} else {
toTrigger.push(
{ displayArchitecture: 'i686/x86_64' }
)
if (package_name !== 'mingw-w64-clang') {
toTrigger.push(
{ displayArchitecture: 'i686/x86_64' }
)
}
if (needsSeparateARM64Build(package_name)) {
toTrigger.push(
{ architecture: 'aarch64', displayArchitecture: 'arm64' }
Expand Down
26 changes: 26 additions & 0 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ let mockGitHubApiRequest = jest.fn((_context, _token, method, requestPath, paylo
if (method === 'GET' && requestPath.endsWith('/pulls/74')) return {
head: { sha: 'a7e4b90' }
}
if (method === 'GET' && requestPath.endsWith('/pulls/75')) return {
head: { sha: '45b8fd0' }
}
if (method === 'GET' && requestPath.endsWith('/pulls/90')) return {
head: { sha: '265d07e' }
}
Expand Down Expand Up @@ -439,6 +442,29 @@ The workflow run [was started](dispatched-workflow-build-and-deploy.yml).`)
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual(['i686'])
})


testIssueComment('/deploy mingw-w64-clang', {
issue: {
number: 75,
title: 'shrink LLVM',
body: '',
pull_request: {
html_url: 'https://github.com/git-for-windows/MINGW-packages/pull/75'
}
},
repository: {
name: 'MINGW-packages'
}
}, async (context) => {
expect(await index(context, context.req)).toBeUndefined()
expect(context.res.body).toEqual(`I edited the comment: appended-comment-body-existing comment body
The workflow run [was started](dispatched-workflow-build-and-deploy.yml).`)
expect(mockQueueCheckRun).toHaveBeenCalledTimes(1)
expect(mockUpdateCheckRun).toHaveBeenCalledTimes(1)
expect(dispatchedWorkflows.map(e => e.payload.inputs.architecture)).toEqual(['aarch64'])
})

testIssueComment('/add release note', {
issue: {
number: 4281,
Expand Down

0 comments on commit 87d45b6

Please sign in to comment.