Change default Homebrew/core CI runners

We will now build on Ventura (macOS 13) to Sequoia (macOS 15).

Runners for macOS 15-x86_64 will not be allocated by default due to a
lack of appropriate hardware.
This commit is contained in:
Carlo Cabrera 2024-09-12 16:18:05 +08:00
parent b78f4b9d3f
commit 51c4421409
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0
3 changed files with 9 additions and 8 deletions

View File

@ -120,8 +120,8 @@ class GitHubRunnerMatrix
runner.freeze
end
NEWEST_HOMEBREW_CORE_MACOS_RUNNER = :sonoma
OLDEST_HOMEBREW_CORE_MACOS_RUNNER = :monterey
NEWEST_HOMEBREW_CORE_MACOS_RUNNER = :sequoia
OLDEST_HOMEBREW_CORE_MACOS_RUNNER = :ventura
NEWEST_HOMEBREW_CORE_INTEL_MACOS_RUNNER = :sonoma
sig { params(macos_version: MacOSVersion).returns(T::Boolean) }

View File

@ -31,11 +31,13 @@ RSpec.describe Homebrew::DevCmd::DetermineTestRunners do
out = []
MacOSVersion::SYMBOLS.each_value do |v|
macos_version = MacOSVersion.new(v)
next if macos_version < :monterey
next if macos_version > :sonoma
next if macos_version < GitHubRunnerMatrix::OLDEST_HOMEBREW_CORE_MACOS_RUNNER
next if macos_version > GitHubRunnerMatrix::NEWEST_HOMEBREW_CORE_MACOS_RUNNER
out << "#{v}-arm64"
next if macos_version > GitHubRunnerMatrix::NEWEST_HOMEBREW_CORE_INTEL_MACOS_RUNNER
out << "#{v}-x86_64"
out << "#{v}-arm64"
end
out << linux_runner

View File

@ -11,9 +11,8 @@ RSpec.describe GitHubRunnerMatrix do
allow(ENV).to receive(:fetch).with("GITHUB_RUN_ID").and_return("12345")
end
# FIXME: Avoid changing this every time we change Homebrew/core CI runner macOS versions.
let(:newest_supported_macos) do
MacOSVersion::SYMBOLS.find { |k, _| k == :sonoma }
MacOSVersion::SYMBOLS.find { |k, _| k == described_class::NEWEST_HOMEBREW_CORE_MACOS_RUNNER }
end
let(:testball) { TestRunnerFormula.new(Testball.new) }
@ -136,7 +135,7 @@ RSpec.describe GitHubRunnerMatrix do
expect(runner_matrix.runners.all?(&:active)).to be(false)
expect(runner_matrix.runners.any?(&:active)).to be(true)
expect(get_runner_names(runner_matrix).sort).to eq(["Linux", "macOS #{v}-arm64", "macOS #{v}-x86_64"])
expect(get_runner_names(runner_matrix).sort).to eq(["Linux", "macOS #{v}-arm64"])
end
end
end