Resolve violations
This commit is contained in:
parent
437120d875
commit
39843b5d40
@ -10,7 +10,8 @@ module Homebrew
|
|||||||
# Helper class for cleaning up the Homebrew cache.
|
# Helper class for cleaning up the Homebrew cache.
|
||||||
class Cleanup
|
class Cleanup
|
||||||
CLEANUP_DEFAULT_DAYS = Homebrew::EnvConfig.cleanup_periodic_full_days.to_i.freeze
|
CLEANUP_DEFAULT_DAYS = Homebrew::EnvConfig.cleanup_periodic_full_days.to_i.freeze
|
||||||
private_constant :CLEANUP_DEFAULT_DAYS
|
GH_ACTIONS_ARTIFACT_CLEANUP_DAYS = 3
|
||||||
|
private_constant :CLEANUP_DEFAULT_DAYS, :GH_ACTIONS_ARTIFACT_CLEANUP_DAYS
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
sig { params(pathname: Pathname).returns(T::Boolean) }
|
sig { params(pathname: Pathname).returns(T::Boolean) }
|
||||||
@ -68,8 +69,6 @@ module Homebrew
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
GH_ACTIONS_ARTIFACT_CLEANUP_DAYS = 3
|
|
||||||
|
|
||||||
sig { params(pathname: Pathname, scrub: T::Boolean).returns(T::Boolean) }
|
sig { params(pathname: Pathname, scrub: T::Boolean).returns(T::Boolean) }
|
||||||
def stale_gh_actions_artifact?(pathname, scrub)
|
def stale_gh_actions_artifact?(pathname, scrub)
|
||||||
scrub || prune?(pathname, GH_ACTIONS_ARTIFACT_CLEANUP_DAYS)
|
scrub || prune?(pathname, GH_ACTIONS_ARTIFACT_CLEANUP_DAYS)
|
||||||
|
|||||||
@ -156,10 +156,10 @@ module Superenv
|
|||||||
|
|
||||||
# Pass `-ld_classic` whenever the linker is invoked with `-dead_strip_dylibs`
|
# Pass `-ld_classic` whenever the linker is invoked with `-dead_strip_dylibs`
|
||||||
# on `ld` versions that don't properly handle that option.
|
# on `ld` versions that don't properly handle that option.
|
||||||
if OS::Mac::DevelopmentTools.ld64_version >= "1015.7" && OS::Mac::DevelopmentTools.ld64_version <= "1022.1"
|
return unless OS::Mac::DevelopmentTools.ld64_version.between?("1015.7", "1022.1")
|
||||||
|
|
||||||
append_to_cccfg "c"
|
append_to_cccfg "c"
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def no_weak_imports
|
def no_weak_imports
|
||||||
append_to_cccfg "w" if no_weak_imports_support?
|
append_to_cccfg "w" if no_weak_imports_support?
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class GitHubRunnerMatrix
|
|||||||
|
|
||||||
sig { params(macos_version: MacOSVersion).returns(T::Boolean) }
|
sig { params(macos_version: MacOSVersion).returns(T::Boolean) }
|
||||||
def runner_enabled?(macos_version)
|
def runner_enabled?(macos_version)
|
||||||
macos_version <= NEWEST_HOMEBREW_CORE_MACOS_RUNNER && macos_version >= OLDEST_HOMEBREW_CORE_MACOS_RUNNER
|
macos_version.between?(OLDEST_HOMEBREW_CORE_MACOS_RUNNER, NEWEST_HOMEBREW_CORE_MACOS_RUNNER)
|
||||||
end
|
end
|
||||||
|
|
||||||
NEWEST_GITHUB_ACTIONS_INTEL_MACOS_RUNNER = :ventura
|
NEWEST_GITHUB_ACTIONS_INTEL_MACOS_RUNNER = :ventura
|
||||||
@ -163,8 +163,8 @@ class GitHubRunnerMatrix
|
|||||||
macos_version = MacOSVersion.new(version)
|
macos_version = MacOSVersion.new(version)
|
||||||
next unless runner_enabled?(macos_version)
|
next unless runner_enabled?(macos_version)
|
||||||
|
|
||||||
github_runner_available = macos_version <= NEWEST_GITHUB_ACTIONS_ARM_MACOS_RUNNER &&
|
github_runner_available = macos_version.between?(OLDEST_GITHUB_ACTIONS_ARM_MACOS_RUNNER,
|
||||||
macos_version >= OLDEST_GITHUB_ACTIONS_ARM_MACOS_RUNNER
|
NEWEST_GITHUB_ACTIONS_ARM_MACOS_RUNNER)
|
||||||
|
|
||||||
runner, timeout = if use_github_runner && github_runner_available
|
runner, timeout = if use_github_runner && github_runner_available
|
||||||
["macos-#{version}", GITHUB_ACTIONS_RUNNER_TIMEOUT]
|
["macos-#{version}", GITHUB_ACTIONS_RUNNER_TIMEOUT]
|
||||||
@ -186,8 +186,8 @@ class GitHubRunnerMatrix
|
|||||||
|
|
||||||
next if !@all_supported && macos_version > NEWEST_HOMEBREW_CORE_INTEL_MACOS_RUNNER
|
next if !@all_supported && macos_version > NEWEST_HOMEBREW_CORE_INTEL_MACOS_RUNNER
|
||||||
|
|
||||||
github_runner_available = macos_version <= NEWEST_GITHUB_ACTIONS_INTEL_MACOS_RUNNER &&
|
github_runner_available = macos_version.between?(OLDEST_GITHUB_ACTIONS_INTEL_MACOS_RUNNER,
|
||||||
macos_version >= OLDEST_GITHUB_ACTIONS_INTEL_MACOS_RUNNER
|
NEWEST_GITHUB_ACTIONS_INTEL_MACOS_RUNNER)
|
||||||
|
|
||||||
runner, timeout = if use_github_runner && github_runner_available
|
runner, timeout = if use_github_runner && github_runner_available
|
||||||
["macos-#{version}", GITHUB_ACTIONS_RUNNER_TIMEOUT]
|
["macos-#{version}", GITHUB_ACTIONS_RUNNER_TIMEOUT]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user