Skip to content

Commit

Permalink
Merge pull request #18314 from Homebrew/sequoia-runner-for-bottled-fo…
Browse files Browse the repository at this point in the history
…rmulae

Deploy Sequoia runner, 🔪 Monterey
  • Loading branch information
MikeMcQuaid authored Sep 13, 2024
2 parents fd7f2bb + 51c4421 commit 51b9200
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/github_runner_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def create_runner(platform, arch, spec, macos_version = nil)
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) }
Expand Down
8 changes: 5 additions & 3 deletions Library/Homebrew/test/dev-cmd/determine-test-runners_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ def get_runners(file)
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}-x86_64"
out << "#{v}-arm64"
next if macos_version > GitHubRunnerMatrix::NEWEST_HOMEBREW_CORE_INTEL_MACOS_RUNNER

out << "#{v}-x86_64"
end

out << linux_runner
Expand Down
5 changes: 2 additions & 3 deletions Library/Homebrew/test/github_runner_matrix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
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) }
Expand Down Expand Up @@ -136,7 +135,7 @@

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
Expand Down

0 comments on commit 51b9200

Please sign in to comment.