summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2020-07-22 00:24:52 +0200
committerder richter <der.richter@gmx.de>2020-07-31 13:22:37 +0200
commit3586ef77f31c9e0d396b0356a4054d57cbd146cb (patch)
treeeff0dacd8f1287fb8a737e63180fd59061161507
parent16a08e87c87965cf6e26686226c6c2d340404e30 (diff)
downloadmpv-3586ef77f31c9e0d396b0356a4054d57cbd146cb.tar.bz2
mpv-3586ef77f31c9e0d396b0356a4054d57cbd146cb.tar.xz
travis: make macOS builds faster
the problem here is that with time, and because the macOS VMs don't get updated, the homebrew update is getting longer since more and more changes have to be pulled. to prevent that, we cache the homebrew installation folder after the update. that way we don't have to update several months worth of updates every build. for the legacy build we have to check put master again to actually cache the newest homebrew version. additionally to that, we also do the same as on the legacy build, with the addition of not removing all installed formulas but only the ones we don't need. so we don't need to reinstall those.
-rw-r--r--.travis.yml46
1 files changed, 18 insertions, 28 deletions
diff --git a/.travis.yml b/.travis.yml
index c1df433881..6f5b0e70de 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: c
_macbase:
- - &macOld
+ - &mac
os: osx
compiler: clang
env:
@@ -12,14 +12,7 @@ _macbase:
cache:
directories:
- $HOME/Library/Caches/Homebrew
- - &macNew
- <<: *macOld
- addons:
- homebrew:
- packages: ['autoconf', 'automake', 'ffmpeg', 'freetype', 'fribidi',
- 'libass', 'libtool', 'little-cms2', 'luajit', 'nasm',
- 'pkg-config', 'python']
- update: true
+ - /usr/local/Homebrew
_mingwbase:
- &mingw
@@ -38,11 +31,11 @@ _mingwbase:
matrix:
include:
- - <<: *macNew
+ - <<: *mac
osx_image: xcode11.3
- - <<: *macNew
+ - <<: *mac
osx_image: xcode10.1
- - <<: *macOld
+ - <<: *mac
osx_image: xcode9.2
- os: freebsd
compiler: clang
@@ -119,25 +112,22 @@ before_install:
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
+ remove=$(brew list)
+ keep="gettext pcre2 git"
+ install="autoconf automake pkg-config libtool python freetype fribidi little-cms2 luajit libass ffmpeg"
+ for formula in ${keep[@]}; do remove=("${remove[@]/$formula}"); done
+ for formula in ${install[@]}; do remove=("${remove[@]/$formula}"); done
+ brew remove --force $remove --ignore-dependencies
+ brew update
if [[ "$TRAVIS_OSX_IMAGE" == "xcode9.2" ]]; then
- brew remove --force $(brew list) --ignore-dependencies
- brew update
pushd "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
- git checkout 55e02323812604add9a69bab8730319b9255a697
+ git checkout --force 55e02323812604add9a69bab8730319b9255a697
+ fi
+ brew install $install
+ brew link --overwrite python
+ if [[ "$TRAVIS_OSX_IMAGE" == "xcode9.2" ]]; then
+ git checkout master
popd
- brew install autoconf
- brew install automake
- brew install pkg-config
- brew install libtool
- brew install python
- brew install freetype
- brew install fribidi
- brew install little-cms2
- brew install luajit
- brew install libass
- brew install ffmpeg
- else
- brew link --overwrite python
fi
fi