Merge pull request #5457 from MikeMcQuaid/remove-travis-ci

Remove Travis CI specific code
This commit is contained in:
Mike McQuaid 2018-12-30 21:31:14 +00:00 committed by GitHub
commit 7246ed3683
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 32 deletions

View File

@ -51,30 +51,23 @@ module Homebrew
MARKDOWN MARKDOWN
write_path(tap, "README.md", readme) write_path(tap, "README.md", readme)
travis = <<~YAML azure = <<~YAML
language: c jobs:
os: osx - job: macOS
compiler: clang pool:
osx_image: xcode9.2 vmImage: xcode9-macos10.13
cache: steps:
directories: - bash: |
- #{Homebrew::DEFAULT_PREFIX}/Homebrew/Library/Homebrew/vendor/bundle sudo xcode-select --switch /Applications/Xcode_10.app/Contents/Developer
branches: brew update
only: HOMEBREW_TAP_DIR="/usr/local/Homebrew/Library/Taps/#{tap}"
- master mkdir -p "$HOMEBREW_TAP_DIR"
rm -rf "$HOMEBREW_TAP_DIR"
before_install: ln -s "$PWD" "$HOMEBREW_TAP_DIR"
- sudo chown -R "$USER" "$(brew --repo)" brew test-bot
- travis_retry brew update displayName: Run brew test-bot
- HOMEBREW_TAP_DIR="$(brew --repo "$TRAVIS_REPO_SLUG")"
- mkdir -p "$HOMEBREW_TAP_DIR"
- rm -rf "$HOMEBREW_TAP_DIR"
- ln -s "$PWD" "$HOMEBREW_TAP_DIR"
script:
- brew test-bot
YAML YAML
write_path(tap, ".travis.yml", travis) write_path(tap, "azure-pipelines.yml", azure)
end end
def write_path(tap, filename, content) def write_path(tap, filename, content)

View File

@ -74,7 +74,7 @@ module Homebrew
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew # `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
# repository. This only needs to support whatever CI providers # repository. This only needs to support whatever CI providers
# Homebrew/brew is currently using. # Homebrew/brew is currently using.
return if ENV["HOMEBREW_TRAVIS_CI"] || ENV["HOMEBREW_AZURE_PIPELINES"] return if ENV["HOMEBREW_AZURE_PIPELINES"]
message = <<~EOS message = <<~EOS
Your Xcode (#{MacOS::Xcode.version}) is outdated. Your Xcode (#{MacOS::Xcode.version}) is outdated.
@ -101,7 +101,7 @@ module Homebrew
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew # `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
# repository. This only needs to support whatever CI providers # repository. This only needs to support whatever CI providers
# Homebrew/brew is currently using. # Homebrew/brew is currently using.
return if ENV["HOMEBREW_TRAVIS_CI"] || ENV["HOMEBREW_AZURE_PIPELINES"] return if ENV["HOMEBREW_AZURE_PIPELINES"]
<<~EOS <<~EOS
A newer Command Line Tools release is available. A newer Command Line Tools release is available.

View File

@ -741,10 +741,6 @@ class FormulaInstaller
].concat(build_argv) ].concat(build_argv)
Utils.safe_fork do Utils.safe_fork do
# Invalidate the current sudo timestamp in case a build script calls sudo.
# Travis CI's Linux sudoless workers have a weird sudo that fails here.
system "/usr/bin/sudo", "-k" if ENV["HOMEBREW_TRAVIS_SUDO"] != "false"
if Sandbox.formula?(formula) if Sandbox.formula?(formula)
sandbox = Sandbox.new sandbox = Sandbox.new
formula.logs.mkpath formula.logs.mkpath

View File

@ -2,7 +2,7 @@ if ENV["HOMEBREW_TESTS_COVERAGE"]
require "simplecov" require "simplecov"
formatters = [SimpleCov::Formatter::HTMLFormatter] formatters = [SimpleCov::Formatter::HTMLFormatter]
if ENV["HOMEBREW_COVERALLS_REPO_TOKEN"] || ENV["HOMEBREW_TRAVIS_CI"] if ENV["HOMEBREW_COVERALLS_REPO_TOKEN"]
require "coveralls" require "coveralls"
if !ENV["HOMEBREW_COLOR"] && (ENV["HOMEBREW_NO_COLOR"] || !$stdout.tty?) if !ENV["HOMEBREW_COLOR"] && (ENV["HOMEBREW_NO_COLOR"] || !$stdout.tty?)

View File

@ -32,7 +32,7 @@ def curl_args(*extra_args, show_output: false, user_agent: :default)
args << "--fail" args << "--fail"
args << "--progress-bar" unless ARGV.verbose? args << "--progress-bar" unless ARGV.verbose?
args << "--verbose" if ENV["HOMEBREW_CURL_VERBOSE"] args << "--verbose" if ENV["HOMEBREW_CURL_VERBOSE"]
args << "--silent" if !$stdout.tty? || ENV["HOMEBREW_TRAVIS_CI"] args << "--silent" unless $stdout.tty?
end end
args + extra_args args + extra_args

View File

@ -72,7 +72,7 @@ then
FILTERED_ENV=() FILTERED_ENV=()
# Filter all but the specific variables. # Filter all but the specific variables.
for VAR in HOME SHELL PATH TERM TERMINFO COLUMNS LOGNAME USER CI TRAVIS SSH_AUTH_SOCK SUDO_ASKPASS \ for VAR in HOME SHELL PATH TERM TERMINFO COLUMNS LOGNAME USER CI SSH_AUTH_SOCK SUDO_ASKPASS \
http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \ http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \
"${!HOMEBREW_@}" "${!TRAVIS_@}" "${!HOMEBREW_@}" "${!TRAVIS_@}"
do do