From 51c4421409b38fe9fe345545ab324c1ccd3a01eb Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:18:05 +0800 Subject: [PATCH] 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. --- Library/Homebrew/github_runner_matrix.rb | 4 ++-- .../Homebrew/test/dev-cmd/determine-test-runners_spec.rb | 8 +++++--- Library/Homebrew/test/github_runner_matrix_spec.rb | 5 ++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Library/Homebrew/github_runner_matrix.rb b/Library/Homebrew/github_runner_matrix.rb index d7b22b33da..d003a3267a 100644 --- a/Library/Homebrew/github_runner_matrix.rb +++ b/Library/Homebrew/github_runner_matrix.rb @@ -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) } diff --git a/Library/Homebrew/test/dev-cmd/determine-test-runners_spec.rb b/Library/Homebrew/test/dev-cmd/determine-test-runners_spec.rb index b137ce6d32..0d46e31002 100644 --- a/Library/Homebrew/test/dev-cmd/determine-test-runners_spec.rb +++ b/Library/Homebrew/test/dev-cmd/determine-test-runners_spec.rb @@ -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 diff --git a/Library/Homebrew/test/github_runner_matrix_spec.rb b/Library/Homebrew/test/github_runner_matrix_spec.rb index ab4850ff71..24f6e6221b 100644 --- a/Library/Homebrew/test/github_runner_matrix_spec.rb +++ b/Library/Homebrew/test/github_runner_matrix_spec.rb @@ -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