test-bot: make master builds faster.
Just do a few things rather than doing e.g. a full compile. Closes Homebrew/homebrew#44936. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
3d585d6e3f
commit
667fa65be8
@ -10,7 +10,6 @@
|
||||
# --skip-homebrew: Don't check Homebrew's files and tests are all valid.
|
||||
# --junit: Generate a JUnit XML test results file.
|
||||
# --email: Generate an email subject file.
|
||||
# --no-bottle: Run brew install without --build-bottle
|
||||
# --keep-old: Run brew bottle --keep-old to build new bottles for a single platform.
|
||||
# --HEAD: Run brew install with --HEAD
|
||||
# --local: Ask Homebrew to write verbose logs under ./logs/ and set HOME to ./home/
|
||||
@ -18,6 +17,7 @@
|
||||
# --dry-run: Just print commands, don't run them.
|
||||
# --fail-fast: Immediately exit on a failing step.
|
||||
# --verbose: Print out all logs in realtime
|
||||
# --fast: Don't install any packages but run e.g. audit anyway.
|
||||
#
|
||||
# --ci-master: Shortcut for Homebrew master branch CI options.
|
||||
# --ci-pr: Shortcut for Homebrew pull request CI options.
|
||||
@ -547,35 +547,41 @@ module Homebrew
|
||||
test "brew", "postinstall", *changed_dependences
|
||||
end
|
||||
formula_fetch_options = []
|
||||
formula_fetch_options << "--build-bottle" unless ARGV.include? "--no-bottle"
|
||||
formula_fetch_options << "--force" if ARGV.include? "--cleanup"
|
||||
formula_fetch_options << canonical_formula_name
|
||||
test "brew", "fetch", "--retry", *formula_fetch_options
|
||||
test "brew", "uninstall", "--force", canonical_formula_name if formula.installed?
|
||||
install_args = ["--verbose"]
|
||||
install_args << "--build-bottle" unless ARGV.include? "--no-bottle"
|
||||
install_args << "--HEAD" if ARGV.include? "--HEAD"
|
||||
|
||||
# Pass --devel or --HEAD to install in the event formulae lack stable. Supports devel-only/head-only.
|
||||
# head-only should not have devel, but devel-only can have head. Stable can have all three.
|
||||
if devel_only_tap? formula
|
||||
install_args << "--devel"
|
||||
formula_bottled = false
|
||||
elsif head_only_tap? formula
|
||||
install_args << "--HEAD"
|
||||
formula_bottled = false
|
||||
else
|
||||
formula_bottled = formula.bottled?
|
||||
end
|
||||
|
||||
install_args << canonical_formula_name
|
||||
# Don't care about e.g. bottle failures for dependencies.
|
||||
run_as_not_developer do
|
||||
test "brew", "install", "--only-dependencies", *install_args unless dependencies.empty?
|
||||
test "brew", "install", *install_args
|
||||
if !ARGV.include?("--fast") || formula_bottled
|
||||
test "brew", "install", "--only-dependencies", *install_args unless dependencies.empty?
|
||||
test "brew", "install", *install_args
|
||||
install_passed = steps.last.passed?
|
||||
else
|
||||
install_passed = false
|
||||
end
|
||||
end
|
||||
install_passed = steps.last.passed?
|
||||
audit_args = [canonical_formula_name]
|
||||
audit_args << "--strict" << "--online" if @added_formulae.include? formula_name
|
||||
test "brew", "audit", *audit_args
|
||||
if install_passed
|
||||
if formula.stable? && !ARGV.include?("--no-bottle")
|
||||
if formula.stable? && !ARGV.include?("--fast")
|
||||
bottle_args = ["--verbose", "--rb", canonical_formula_name]
|
||||
bottle_args << "--keep-old" if ARGV.include? "--keep-old"
|
||||
test "brew", "bottle", *bottle_args
|
||||
@ -610,7 +616,8 @@ module Homebrew
|
||||
test "brew", "uninstall", "--force", canonical_formula_name
|
||||
end
|
||||
|
||||
if formula.devel && formula.stable? && !ARGV.include?("--HEAD") \
|
||||
if formula.devel && formula.stable? \
|
||||
&& !ARGV.include?("--HEAD") && !ARGV.include?("--fast") \
|
||||
&& satisfied_requirements?(formula, :devel)
|
||||
test "brew", "fetch", "--retry", "--devel", *formula_fetch_options
|
||||
run_as_not_developer { test "brew", "install", "--devel", "--verbose", canonical_formula_name }
|
||||
@ -883,7 +890,7 @@ module Homebrew
|
||||
ARGV << "--junit" << "--local"
|
||||
end
|
||||
if ARGV.include? "--ci-master"
|
||||
ARGV << "--no-bottle" << "--email"
|
||||
ARGV << "--email" << "--fast"
|
||||
end
|
||||
|
||||
if ARGV.include? "--local"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user