Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/deploy: only build mingw-w64-clang for ARM64 #36

Merged
merged 1 commit into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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