github_runner_matrix: cleanup GitHub macOS runner

These come with some pre-installed software that we probably want to
clean up first.
This commit is contained in:
Carlo Cabrera 2023-04-27 09:59:22 +08:00
parent 6b33197d54
commit b339d9f8be
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -129,19 +129,19 @@ class GitHubRunnerMatrix
runner_timeout += 30 if macos_version <= :big_sur runner_timeout += 30 if macos_version <= :big_sur
# Use GitHub Actions macOS Runner for testing dependents if compatible with timeout. # Use GitHub Actions macOS Runner for testing dependents if compatible with timeout.
runner = if (@dependent_matrix || use_github_runner) && runner, cleanup = if (@dependent_matrix || use_github_runner) &&
macos_version <= NEWEST_GITHUB_ACTIONS_MACOS_RUNNER && macos_version <= NEWEST_GITHUB_ACTIONS_MACOS_RUNNER &&
runner_timeout <= GITHUB_ACTIONS_RUNNER_TIMEOUT runner_timeout <= GITHUB_ACTIONS_RUNNER_TIMEOUT
"macos-#{version}" ["macos-#{version}", true]
else else
"#{version}#{ephemeral_suffix}" ["#{version}#{ephemeral_suffix}", false]
end end
spec = MacOSRunnerSpec.new( spec = MacOSRunnerSpec.new(
name: "macOS #{version}-x86_64", name: "macOS #{version}-x86_64",
runner: runner, runner: runner,
timeout: runner_timeout, timeout: runner_timeout,
cleanup: false, cleanup: cleanup,
) )
@runners << create_runner(:macos, :x86_64, spec, macos_version) @runners << create_runner(:macos, :x86_64, spec, macos_version)