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

github_runner_matrix: fix dependent runner assignment #15205

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions Library/Homebrew/github_runner_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ def generate_runners!

github_run_id = ENV.fetch("GITHUB_RUN_ID")
github_run_attempt = ENV.fetch("GITHUB_RUN_ATTEMPT")
ephemeral_suffix = "-#{github_run_id}-#{github_run_attempt}"
ephemeral_suffix = +"-#{github_run_id}-#{github_run_attempt}"
ephemeral_suffix << "-deps" if @dependent_matrix
ephemeral_suffix.freeze

MacOSVersions::SYMBOLS.each_value do |version|
macos_version = OS::Mac::Version.new(version)
Expand All @@ -126,7 +128,9 @@ def generate_runners!
next unless macos_version >= :big_sur

# Use bare metal runner when testing dependents on ARM64 Monterey.
runner, cleanup = if (macos_version >= :ventura && @dependent_matrix) || macos_version >= :monterey
use_ephemeral = (macos_version >= :ventura && @dependent_matrix) ||
(macos_version >= :monterey && !@dependent_matrix)
runner, cleanup = if use_ephemeral
["#{version}-arm64#{ephemeral_suffix}", false]
else
["#{version}-arm64", true]
Expand Down