Merge pull request #9010 from MikeMcQuaid/github_actions_big_sur
workflows/tests: use Big Sur.
This commit is contained in:
commit
3543d69373
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
@ -6,18 +6,21 @@ on:
|
|||||||
env:
|
env:
|
||||||
HOMEBREW_DEVELOPER: 1
|
HOMEBREW_DEVELOPER: 1
|
||||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
|
HOMEBREW_GITHUB_ACTIONS_BIG_SUR_TESTING: 1 # TODO: remove when Big Sur is released.
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
if: github.repository == 'Homebrew/brew'
|
if: github.repository == 'Homebrew/brew'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macOS-latest]
|
os: [ubuntu-latest, macOS-latest, macOS-11.0]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
core-tap: 'linuxbrew-core'
|
core-tap: 'linuxbrew-core'
|
||||||
- os: macOS-latest
|
- os: macOS-latest
|
||||||
core-tap: 'homebrew-core'
|
core-tap: 'homebrew-core'
|
||||||
|
- os: macOS-11.0
|
||||||
|
core-tap: 'homebrew-core'
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Homebrew
|
- name: Set up Homebrew
|
||||||
id: set-up-homebrew
|
id: set-up-homebrew
|
||||||
@ -30,6 +33,10 @@ jobs:
|
|||||||
|
|
||||||
- run: brew test-bot --only-cleanup-before
|
- 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
|
- run: brew config
|
||||||
|
|
||||||
# Can't cache this because we need to check that it doesn't fail the
|
# 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
|
run: brew man --fail-if-changed
|
||||||
|
|
||||||
- name: Install brew tests dependencies
|
- name: Install brew tests dependencies
|
||||||
if: matrix.os == 'macOS-latest'
|
if: matrix.os != 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
brew install subversion
|
brew install subversion
|
||||||
Library/Homebrew/shims/scm/svn --homebrew=print-path
|
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
|
run: brew style --display-cop-names homebrew/bundle homebrew/services homebrew/test-bot
|
||||||
|
|
||||||
- name: Run brew cask style on all taps
|
- name: Run brew cask style on all taps
|
||||||
if: matrix.os == 'macOS-latest'
|
if: matrix.os != 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
brew tap homebrew/cask
|
brew tap homebrew/cask
|
||||||
brew tap homebrew/cask-drivers
|
brew tap homebrew/cask-drivers
|
||||||
|
@ -93,6 +93,9 @@ module Homebrew
|
|||||||
def check_for_unsupported_macos
|
def check_for_unsupported_macos
|
||||||
return if Homebrew::EnvConfig.developer?
|
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"
|
who = +"We"
|
||||||
if OS::Mac.prerelease?
|
if OS::Mac.prerelease?
|
||||||
what = "pre-release version"
|
what = "pre-release version"
|
||||||
|
@ -6,6 +6,7 @@ require "diagnostic"
|
|||||||
describe Homebrew::Diagnostic::Checks do
|
describe Homebrew::Diagnostic::Checks do
|
||||||
specify "#check_for_unsupported_macos" do
|
specify "#check_for_unsupported_macos" do
|
||||||
ENV.delete("HOMEBREW_DEVELOPER")
|
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)
|
allow(OS::Mac).to receive(:prerelease?).and_return(true)
|
||||||
|
|
||||||
expect(subject.check_for_unsupported_macos)
|
expect(subject.check_for_unsupported_macos)
|
||||||
|
@ -109,7 +109,7 @@ RSpec.configure do |config|
|
|||||||
|
|
||||||
config.before(:each, :needs_java) do
|
config.before(:each, :needs_java) do
|
||||||
java_installed = if OS.mac?
|
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?
|
$CHILD_STATUS.success?
|
||||||
else
|
else
|
||||||
which("java")
|
which("java")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user