forked from Kong/homebrew-kong
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
45 lines (40 loc) · 1.7 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
language: objective-c
os: osx
osx_image: xcode11
before_install:
- brew update >/dev/null
# From https://gist.github.com/maelvalais/068af21911c7debc4655cdaa41bbf092
# (1) remember to use 'brew cleanup -s' at the end of the travis script;
# otherwise, the $HOME/Library/Caches/Homebrew folder will be enormous
# (~2GB for the 4 jobs). This is because this folder is already present on
# osx images and it is big.
# (2) For a time, I had removed $HOME/.cache/Homebrew (cache of Linuxbrew)
# because it was also storing some logs in $HOME/.cache/Homebrew/Logs, making
# the cache rebuilt every time.
cache:
directories:
- "$HOME/.cache/pip"
- "$HOME/.gem/ruby"
- "$HOME/Library/Caches/Homebrew" # (1)
- "$HOME/.cache/Homebrew" # (2)
# This is done to ensure that the formulas that kong.rb depends on
# are picked up by the currently-tested branch.
install:
- mkdir -p $(brew --repo)/Library/Taps/kong
- ln -s $PWD $(brew --repo)/Library/Taps/kong/homebrew-kong
- brew tap --repair
script:
- brew install -v ./Formula/kong.rb
- kong config init
- KONG_DATABASE=off KONG_DECLARATIVE_CONFIG=kong.yml KONG_PREFIX=prefix kong start
- curl http://localhost:8001 | grep Welcome
# From https://gist.github.com/maelvalais/068af21911c7debc4655cdaa41bbf092
before_cache:
# Scrub cache so that travis only caches stuff for installed formulae.
- brew cleanup -s
- brew cask cleanup
# Remove temporary stuff (idk why they put that in ~/.cache... that should be in /tmp)
- rm -f ~/Library/Caches/Homebrew/linkage.db ~/.cache/Homebrew/linkage.db
# List the formulae so that I understand why the cache is huge sometimes
- brew list
- du -h ~/Library/Caches/Homebrew || du -h ~/.cache/Homebrew/linkage.db