Skip to content

Commit

Permalink
bazel: pin to 0.26.1 (#105)
Browse files Browse the repository at this point in the history
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 <jp@jpsim.com>
  • Loading branch information
junr03 authored and jpsim committed Nov 28, 2022
1 parent 1b1bc31 commit 3ef3f89
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mobile/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand Down
34 changes: 34 additions & 0 deletions mobile/ci/mac_ci_setup.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3ef3f89

Please sign in to comment.