From 3ef3f895656a8c45b827f9c311f43a8568ded0e0 Mon Sep 17 00:00:00 2001 From: Jose Ulises Nino Rivera Date: Mon, 17 Jun 2019 14:02:59 -0700 Subject: [PATCH] bazel: pin to 0.26.1 (#105) Signed-off-by: Jose Nino jnino@lyft.com Description: pin our bazel install to 0.26.1. There are a few items that do not work yet on 0.27.0, and we want to have a controlled upgrade. Risk Level: low -- pins the bazel version for ease of compatibility Testing: CI Signed-off-by: JP Simard --- mobile/azure-pipelines.yml | 6 +++--- mobile/ci/mac_ci_setup.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100755 mobile/ci/mac_ci_setup.sh diff --git a/mobile/azure-pipelines.yml b/mobile/azure-pipelines.yml index 9c71afcc18e6..e2f6aca80eb5 100644 --- a/mobile/azure-pipelines.yml +++ b/mobile/azure-pipelines.yml @@ -36,7 +36,7 @@ jobs: steps: - checkout: self submodules: true - - script: ./envoy/ci/mac_ci_setup.sh + - script: ./ci/mac_ci_setup.sh displayName: 'Install dependencies' - script: bazel build --config=ios //:ios_dist displayName: 'Build Envoy.framework distributable' @@ -53,7 +53,7 @@ jobs: steps: - checkout: self submodules: true - - script: ./envoy/ci/mac_ci_setup.sh + - script: ./ci/mac_ci_setup.sh displayName: 'Install dependencies' - script: mkdir -p dist/Envoy.framework displayName: 'Create directory for distributable' @@ -72,7 +72,7 @@ jobs: steps: - checkout: self submodules: true - - script: ./envoy/ci/mac_ci_setup.sh + - script: ./ci/mac_ci_setup.sh displayName: 'Install dependencies' - script: mkdir -p dist/Envoy.framework displayName: 'Create directory for distributable' diff --git a/mobile/ci/mac_ci_setup.sh b/mobile/ci/mac_ci_setup.sh new file mode 100755 index 000000000000..cdbda22974ba --- /dev/null +++ b/mobile/ci/mac_ci_setup.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# Installs the dependencies required for a macOS build. + +function is_installed { + brew ls --versions "$1" >/dev/null +} + +function install { + echo "Installing $1" + if ! brew install "$1" + then + echo "Failed to install $1" + exit 1 + fi +} + +if ! brew update; then + echo "Failed to update homebrew" + exit 1 +fi + +DEPS="automake cmake coreutils go libtool wget ninja" +for DEP in ${DEPS} +do + is_installed "${DEP}" || install "${DEP}" +done + +# Install bazel manually until https://github.com/bazelbuild/continuous-integration/issues/128 is fixed. +# Otherwise we always pull the latest release automatically. +wget -c https://github.com/bazelbuild/bazel/releases/download/0.26.1/bazel-0.26.1-installer-darwin-x86_64.sh +chmod +x bazel-0.26.1-installer-darwin-x86_64.sh +sudo ./bazel-0.26.1-installer-darwin-x86_64.sh +bazel version