Skip to content

Commit

Permalink
Merge pull request #5457 from MikeMcQuaid/remove-travis-ci
Browse files Browse the repository at this point in the history
Remove Travis CI specific code
  • Loading branch information
MikeMcQuaid committed Dec 30, 2018
2 parents 9c8c4b5 + 61fa59e commit 7246ed3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 32 deletions.
39 changes: 16 additions & 23 deletions Library/Homebrew/dev-cmd/tap-new.rb
Expand Up @@ -51,30 +51,23 @@ def tap_new
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)
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/extend/os/mac/diagnostic.rb
Expand Up @@ -74,7 +74,7 @@ def check_xcode_up_to_date
# `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.
Expand All @@ -101,7 +101,7 @@ def check_clt_up_to_date
# `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.
Expand Down
4 changes: 0 additions & 4 deletions Library/Homebrew/formula_installer.rb
Expand Up @@ -741,10 +741,6 @@ def build
].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
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/test/spec_helper.rb
Expand Up @@ -2,7 +2,7 @@
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?)
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/utils/curl.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/brew
Expand Up @@ -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
Expand Down

0 comments on commit 7246ed3

Please sign in to comment.