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
write_path(tap, "README.md", readme)
travis = <<~YAML
language: c
os: osx
compiler: clang
osx_image: xcode9.2
cache:
directories:
- #{Homebrew::DEFAULT_PREFIX}/Homebrew/Library/Homebrew/vendor/bundle
branches:
only:
- master
before_install:
- sudo chown -R "$USER" "$(brew --repo)"
- travis_retry brew update
- 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
azure = <<~YAML
jobs:
- job: macOS
pool:
vmImage: xcode9-macos10.13
steps:
- bash: |
sudo xcode-select --switch /Applications/Xcode_10.app/Contents/Developer
brew update
HOMEBREW_TAP_DIR="/usr/local/Homebrew/Library/Taps/#{tap}"
mkdir -p "$HOMEBREW_TAP_DIR"
rm -rf "$HOMEBREW_TAP_DIR"
ln -s "$PWD" "$HOMEBREW_TAP_DIR"
brew test-bot
displayName: Run brew test-bot
YAML
write_path(tap, ".travis.yml", travis)
write_path(tap, "azure-pipelines.yml", azure)
end
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
# repository. This only needs to support whatever CI providers
# Homebrew/brew is currently using.
return if ENV["HOMEBREW_TRAVIS_CI"] || ENV["HOMEBREW_AZURE_PIPELINES"]
return if ENV["HOMEBREW_AZURE_PIPELINES"]
message = <<~EOS
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
# repository. This only needs to support whatever CI providers
# Homebrew/brew is currently using.
return if ENV["HOMEBREW_TRAVIS_CI"] || ENV["HOMEBREW_AZURE_PIPELINES"]
return if ENV["HOMEBREW_AZURE_PIPELINES"]
<<~EOS
A newer Command Line Tools release is available.

View File

@ -741,10 +741,6 @@ class FormulaInstaller
].concat(build_argv)
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)
sandbox = Sandbox.new
formula.logs.mkpath

View File

@ -2,7 +2,7 @@ if ENV["HOMEBREW_TESTS_COVERAGE"]
require "simplecov"
formatters = [SimpleCov::Formatter::HTMLFormatter]
if ENV["HOMEBREW_COVERALLS_REPO_TOKEN"] || ENV["HOMEBREW_TRAVIS_CI"]
if ENV["HOMEBREW_COVERALLS_REPO_TOKEN"]
require "coveralls"
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 << "--progress-bar" unless ARGV.verbose?
args << "--verbose" if ENV["HOMEBREW_CURL_VERBOSE"]
args << "--silent" if !$stdout.tty? || ENV["HOMEBREW_TRAVIS_CI"]
args << "--silent" unless $stdout.tty?
end
args + extra_args

View File

@ -72,7 +72,7 @@ then
FILTERED_ENV=()
# 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 \
"${!HOMEBREW_@}" "${!TRAVIS_@}"
do