From d406f90f328a3e7540b92d963f43de8cb5bc0926 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 22 Nov 2018 17:41:52 +0100 Subject: [PATCH] Use `homebrew bundle` to avoid errors on upgrade available. `homebrew install` could exit with errors like: ``` Error: cmake 3.12.4 is already installed To upgrade to 3.13.0, run `brew upgrade cmake` ``` This solution is the one recommended in https://github.com/Homebrew/brew/issues/2491 --- etc/taskcluster/decision_task.py | 7 ++----- etc/taskcluster/macos/Brewfile | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 etc/taskcluster/macos/Brewfile diff --git a/etc/taskcluster/decision_task.py b/etc/taskcluster/decision_task.py index fd2c5ea6e1f..745fed517a9 100644 --- a/etc/taskcluster/decision_task.py +++ b/etc/taskcluster/decision_task.py @@ -373,13 +373,10 @@ def macos_build_task(name): .with_script(""" mkdir -p "$HOME/homebrew" export PATH="$HOME/homebrew/bin:$PATH" - which homebrew || curl -L https://github.com/Homebrew/brew/tarball/master \ + which brew || curl -L https://github.com/Homebrew/brew/tarball/master \ | tar xz --strip 1 -C "$HOME/homebrew" - time brew install automake autoconf@2.13 pkg-config cmake yasm llvm - time brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad \ - gst-libav gst-rtsp-server \ - --with-orc --with-libogg --with-opus --with-pango --with-theora --with-libvorbis + time brew bundle install --no-upgrade --file=etc/taskcluster/macos/Brewfile export OPENSSL_INCLUDE_DIR="$(brew --prefix openssl)/include" export OPENSSL_LIB_DIR="$(brew --prefix openssl)/lib" """) diff --git a/etc/taskcluster/macos/Brewfile b/etc/taskcluster/macos/Brewfile new file mode 100644 index 00000000000..d8609f8e7f6 --- /dev/null +++ b/etc/taskcluster/macos/Brewfile @@ -0,0 +1,15 @@ +brew "autoconf@2.13" +brew "automake" +brew "cmake" +brew "openssl" +brew "pkg-config" +brew "gstreamer" +brew "gst-plugins-base", args: ["with-orc", "with-libogg", "with-opus", "with-theora", "with-libvorbis", "with-pango"] +brew "gst-libav" +brew "gst-plugins-bad" +brew "gst-plugins-good" +brew "gst-rtsp-server" +brew "htop" +brew "llvm" +brew "openssl@1.1" +brew "yasm"