Skip to content

Commit 007d6c2

Browse files
Simplify Travis CI macOS homebrew package install
Use Travis CI Homebrew addon to install packages, instead of manually install them via shell commands. According to the latest Travis CI "The macOS Build Environment" and "Installing Dependencies" documentation: > The Travis Homebrew addon is the simplest, fastest and most reliable > way to install dependencies. > By default, the Homebrew addon will not run `brew update` before > installing packages. `brew update` can take a long time and slow down > your builds. If you need more up-to-date versions of packages than the > snapshot on the build VM has, you can add `update: true` to the addon > configuration: As Travis CI looks very confident about it, the original `brew update` corresponding `update: true` in the addon is not enabled, unless some issues were found without the update, hopefully can speed up the tests. Reference: - https://docs.travis-ci.com/user/reference/osx/#homebrew - https://docs.travis-ci.com/user/installing-dependencies/#installing-packages-on-macos
1 parent 3f490ea commit 007d6c2

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

β€Ž.travis.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ jobs:
101101
osx_image: xcode13.1
102102
env:
103103
- task=test-dist-zsh
104+
addons:
105+
homebrew:
106+
packages:
107+
- zsh
104108
before_script:
105-
- brew update && brew install zsh
106109
- type zsh && zsh --version
107110
script:
108111
- ./test-scripts/zsh
@@ -111,8 +114,11 @@ jobs:
111114
osx_image: xcode13.1
112115
env:
113116
- task=test-dist-ksh
117+
addons:
118+
homebrew:
119+
packages:
120+
- ksh
114121
before_script:
115-
- brew update && brew install ksh
116122
- type ksh && ksh --version || printf ""
117123
script:
118124
- ./test-scripts/ksh
@@ -130,8 +136,11 @@ jobs:
130136
osx_image: xcode13.1
131137
env:
132138
- task=test-dist-bash-brew-install
139+
addons:
140+
homebrew:
141+
packages:
142+
- bash
133143
before_script:
134-
- brew update && brew install bash
135144
- export PATH="/usr/local/bin:$PATH"
136145
- type bash && bash --version
137146
script:
@@ -141,8 +150,11 @@ jobs:
141150
osx_image: xcode13.1
142151
env:
143152
- task=test-dist-fish
153+
addons:
154+
homebrew:
155+
packages:
156+
- fish
144157
before_script:
145-
- brew update && brew install fish
146158
- type fish && fish --version
147159
script:
148160
- ./test-scripts/fish

0 commit comments

Comments
Β (0)