-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12807 from unknownbrackets/travis-mac
Travis: Cache macOS python (and sdl2, etc.) build as a bottle
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
export USE_CCACHE=1 | ||
export NDK_CCACHE=ccache | ||
export HOMEBREW_NO_INSTALL_CLEANUP=1 | ||
export HOMEBREW_NO_AUTO_UPDATE=1 | ||
NDK_VER=android-ndk-r18b | ||
|
||
download_extract() { | ||
|
@@ -20,6 +22,27 @@ download_extract_zip() { | |
|
||
travis_before_install() { | ||
git submodule update --init --recursive | ||
|
||
if [ "$TRAVIS_OS_NAME" = osx ]; then | ||
# Depends on Python, wastes time updating... | ||
brew uninstall -f mercurial | ||
|
||
for PKG in [email protected] readline pkg-config gdbm sqlite xz python sdl2; do | ||
if [ -f $HOME/Library/Caches/Homebrew/$PKG-*.bottle.*.tar.gz ]; then | ||
brew upgrade $HOME/Library/Caches/Homebrew/$PKG-*.bottle.*.tar.gz || brew install -f $HOME/Library/Caches/Homebrew/$PKG-*.bottle.*.tar.gz || true | ||
fi | ||
done | ||
|
||
for PKG in [email protected] readline pkg-config gdbm sqlite xz python sdl2; do | ||
if [ ! -f $HOME/Library/Caches/Homebrew/$PKG-*.bottle.*.tar.gz ]; then | ||
echo "Rebuilding $PKG as bottle..." | ||
brew uninstall -f --ignore-dependencies $PKG && brew install --build-bottle $PKG || true | ||
brew bottle $PKG && brew postinstall $PKG || true | ||
rm $HOME/Library/Caches/Homebrew/$PKG-*.bottle.*.tar.gz || true | ||
mv ./$PKG-*.bottle.*.tar.gz $HOME/Library/Caches/Homebrew/ || true | ||
fi | ||
done | ||
fi | ||
} | ||
|
||
travis_install() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,6 @@ addons: | |
update: true | ||
packages: | ||
- ccache | ||
- python | ||
- sdl2 | ||
|
||
cache: | ||
apt: true | ||
|