You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: force install/link bazelisk package in macos dependency setup (envoyproxy#10357)
Latest mac os images have bazel pre-installed so force install bazelisk and link with overwrite to allow install to succeed
Risk Level: Low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A
Co-authored-by: Sunjay Bhatia <[email protected]>
Co-authored-by: William A Rowe Jr <[email protected]>
Signed-off-by: Sunjay Bhatia <[email protected]>
Signed-off-by: William A Rowe Jr <[email protected]>
Copy file name to clipboardExpand all lines: ci/mac_ci_setup.sh
+14-6Lines changed: 14 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,17 @@
2
2
3
3
# Installs the dependencies required for a macOS build via homebrew.
4
4
# Tools are not upgraded to new versions.
5
-
6
-
#Setup bazelbuild tap
7
-
brew tap bazelbuild/tap
5
+
# See:
6
+
#https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md for
7
+
# a list of pre-installed tools in the macOS image.
8
8
9
9
functionis_installed {
10
10
brew ls --versions "$1">/dev/null
11
11
}
12
12
13
13
functioninstall {
14
14
echo"Installing $1"
15
-
if! brew install "$1"
16
-
then
15
+
if! brew install "$1";then
17
16
echo"Failed to install $1"
18
17
exit 1
19
18
fi
@@ -24,7 +23,7 @@ if ! brew update; then
24
23
exit 1
25
24
fi
26
25
27
-
DEPS="automake bazelbuild/tap/bazelisk cmake coreutils go libtool wget ninja"
26
+
DEPS="automake cmake coreutils go libtool wget ninja"
28
27
forDEPin${DEPS}
29
28
do
30
29
is_installed "${DEP}"|| install "${DEP}"
@@ -35,3 +34,12 @@ if [ -n "$CIRCLECI" ]; then
35
34
# convert https://github.com to ssh://[email protected], which jgit does not support.
36
35
mv ~/.gitconfig ~/.gitconfig_save
37
36
fi
37
+
38
+
# Required as bazel and a foreign bazelisk are installed in the latest macos vm image, we have
39
+
# to unlink/overwrite them to install bazelisk
40
+
echo"Installing bazelbuild/tap/bazelisk"
41
+
brew install --force bazelbuild/tap/bazelisk
42
+
if! brew link --overwrite bazelbuild/tap/bazelisk;then
43
+
echo"Failed to install and link bazelbuild/tap/bazelisk"
0 commit comments