Merge pull request #9010 from MikeMcQuaid/github_actions_big_sur

workflows/tests: use Big Sur.
This commit is contained in:
Mike McQuaid 2020-11-06 15:56:12 +00:00 committed by GitHub
commit 3543d69373
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 4 deletions

View File

@ -6,18 +6,21 @@ on:
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_GITHUB_ACTIONS_BIG_SUR_TESTING: 1 # TODO: remove when Big Sur is released.
jobs:
tests:
if: github.repository == 'Homebrew/brew'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
os: [ubuntu-latest, macOS-latest, macOS-11.0]
include:
- os: ubuntu-latest
core-tap: 'linuxbrew-core'
- os: macOS-latest
core-tap: 'homebrew-core'
- os: macOS-11.0
core-tap: 'homebrew-core'
steps:
- name: Set up Homebrew
id: set-up-homebrew
@ -30,6 +33,10 @@ jobs:
- run: brew test-bot --only-cleanup-before
- name: Set up Xcode
if: matrix.os == 'macOS-11.0'
run: sudo xcode-select --switch /Applications/Xcode_12.2.app/Contents/Developer
- run: brew config
# Can't cache this because we need to check that it doesn't fail the
@ -60,7 +67,7 @@ jobs:
run: brew man --fail-if-changed
- name: Install brew tests dependencies
if: matrix.os == 'macOS-latest'
if: matrix.os != 'ubuntu-latest'
run: |
brew install subversion
Library/Homebrew/shims/scm/svn --homebrew=print-path
@ -108,7 +115,7 @@ jobs:
run: brew style --display-cop-names homebrew/bundle homebrew/services homebrew/test-bot
- name: Run brew cask style on all taps
if: matrix.os == 'macOS-latest'
if: matrix.os != 'ubuntu-latest'
run: |
brew tap homebrew/cask
brew tap homebrew/cask-drivers

View File

@ -93,6 +93,9 @@ module Homebrew
def check_for_unsupported_macos
return if Homebrew::EnvConfig.developer?
# TODO: remove when Big Sur is released.
return if MacOS.version == :big_sur && ENV["HOMEBREW_GITHUB_ACTIONS_BIG_SUR_TESTING"]
who = +"We"
if OS::Mac.prerelease?
what = "pre-release version"

View File

@ -6,6 +6,7 @@ require "diagnostic"
describe Homebrew::Diagnostic::Checks do
specify "#check_for_unsupported_macos" do
ENV.delete("HOMEBREW_DEVELOPER")
allow(OS::Mac).to receive(:version).and_return(OS::Mac::Version.new("10.14"))
allow(OS::Mac).to receive(:prerelease?).and_return(true)
expect(subject.check_for_unsupported_macos)

View File

@ -109,7 +109,7 @@ RSpec.configure do |config|
config.before(:each, :needs_java) do
java_installed = if OS.mac?
Utils.popen_read("/usr/libexec/java_home", "--failfast")
Utils.popen_read("/usr/libexec/java_home", "--failfast", "--version", "1.0+")
$CHILD_STATUS.success?
else
which("java")