Skip to content

drop support for selfhosted runners #136

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
13 changes: 0 additions & 13 deletions GitForWindowsHelper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,6 @@ module.exports = async function (context, req) {
return withStatus(500, undefined, e.message || JSON.stringify(e, null, 2))
}

try {
const selfHostedARM64Runners = require('./self-hosted-arm64-runners')
if (req.headers['x-github-event'] === 'workflow_job'
&& ['git-for-windows/git-for-windows-automation', 'git-for-windows/git-sdk-arm64'].includes(req.body.repository.full_name)
&& ['queued', 'completed'].includes(req.body.action)
&& req.body.workflow_job.labels.length === 2
&& req.body.workflow_job.labels[0] === 'Windows'
&& req.body.workflow_job.labels[1] === 'ARM64') return ok(await selfHostedARM64Runners(context, req))
} catch (e) {
context.log(e)
return withStatus(500, undefined, e.message || JSON.stringify(e, null, 2))
}

try {
const finalizeGitForWindowsRelease = require('./finalize-g4w-release')
if (req.headers['x-github-event'] === 'workflow_run'
Expand Down
79 changes: 0 additions & 79 deletions GitForWindowsHelper/self-hosted-arm64-runners.js

This file was deleted.

8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ For convenience, the command can be abbreviated as `/add relnote <type> <message

**What does it do?** Call this command after a `/git-artifacts` command successfully produced the artifacts _and_ after the installer artifact has been validated manually, using [the "pre-flight checklist"](https://github.com/git-for-windows/build-extra/blob/HEAD/installer/checklist.txt). This will start [the `release-git` workflow](https://github.com/git-for-windows/git-for-windows-automation/actions/workflows/release-git.yml) to publish the artifacts in a new GitHub Release.

## Spinning up Windows/ARM64 runners

As GitHub Actions do not offer hosted Windows/ARM64 runners, Git for Windows needs to use self-hosted Windows/ARM64 runners to build the `clang-aarch64` versions of its MINGW packages.

To this end, the GitForWindowsHelper App notices when a job was queued [in the `git-for-windows-automation` repository](https://github.com/git-for-windows/git-for-windows-automation/actions/) that requires a Windows/ARM64 runner, and starts [the GitHub workflow to spin up an Azure VM with such a runner](https://github.com/git-for-windows/git-for-windows-automation/actions/workflows/create-azure-self-hosted-runners.yml). This VM is created from scratch and its runner is marked as ephemeral (meaning: it will run exactly one job for security reasons). Once the job is finished, the GitForWindowsHelper App starts [the GitHub workflow](https://github.com/git-for-windows/git-for-windows-automation/actions/workflows/delete-self-hosted-runner.yml) to decommission the VM.

The GitForWindowsHelper App will also notice when jobs are queued for PRs originating in forks, and immediately cancel them. This helps with keeping the cost of self-hosting these Windows/ARM64 at reasonable levels.

## Tips & Tricks for developing this GitHub App

### Debug/test-run as much Javascript via the command-line as possible
Expand Down