forked from petems/homebrew-vault-prebuilt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (60 loc) · 2.96 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Inspired from the .travis.yml in
# https://github.com/davidchall/homebrew-hep/
language: ruby
env:
global:
- HOMEBREW_LOGS=/tmp # Prevent ~/.cache/Homebrew/Logs from being rebuilt
- HOMEBREW_NO_AUTO_UPDATE=yes # Prevents redundant auto-updates from brew
cache:
directories:
- "$HOME/.cache/pip"
- "$HOME/.gem/ruby"
- "$HOME/Library/Caches/Homebrew" # (1)
- "$HOME/.cache/Homebrew" # (2)
install:
- brew tap maelvalais/test-bot
- brew install git
- mkdir -p $(brew --repo $TRAVIS_REPO_SLUG) # 1)
- rm -rf $(brew --repo $TRAVIS_REPO_SLUG) # 2)
- ln -s $PWD $(brew --repo $TRAVIS_REPO_SLUG) # 3)
- git fetch --unshallow || true # 4)
- perl -pi -e 's/(.*)problem(.*version.*should not contain.*)$/$1opoo$2/' $(brew --repo)/Library/Homebrew/dev-cmd/audit.rb
- git -C $(brew --repo) commit -a -m "disable error on beta or alpha version"
script:
- |
brew install ./Formula/Vault.rb && brew test ./Formula/Vault.rb && brew linkage --test ./Formula/Vault.rb
- echo $TRAVIS_EVENT_TYPE
jobs:
include:
- &run-osx
os: osx
osx_image: xcode10.1
env: OS=high_sierra-10.13
before_install: # IMPORTANT: HOMEBREW_DEVELOPER must not be set here.
# First we uninstall any outdated versions of xquartz; otherwise,
# Homebrew will complain of of older version (2.9.7) being outdated
# even though we install a new version. Remember that
# /usr/local/Caskroom will also be deleted below.
- brew cask outdated xquartz || brew cask uninstall xquartz
# Three reasons not to use the /usr/local and Homebrew installations
# that come in the Travis CI images:
# 1) because Travis CI has installed many non-homebrew things into
# /usr/local that randomly cause 'brew doctor' to fail;
# 2) after time, the osx image contains an outdated Homebrew that
# has weird 'unlinked kegs' and such;
# 3) also because it takes a long time to 'brew update' from an old
# Homebrew anyway, so why not start fresh.
- mkdir ~/usr_local && sudo mv /usr/local/* ~/usr_local
- git config --global --unset protocol.version # System git is too old
- /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Either xquartz was already installed at its latest version or it has
# been uninstalled. First, we put the cask back in place if it has not
# been uninstalled.
- |
if [ -d ~/usr_local/Caskroom/xquartz ];
then sudo mv ~/usr_local/Caskroom /usr/local/Caskroom;
else travis_retry brew cask install xquartz --no-quarantine; fi
# We still need the 'rvm default' ruby (which links to Homebrew stuff) on
# macOS 10.12 and 10.11 because the system ruby has an old openssl
# ("tlsv1 alert protocol"). Reinstall needed stuff removed by test-bot.
- travis_retry brew install libyaml gmp [email protected]