This means we won't be upgrading existing packages on the system that we don't need for the build.
Marks install-native-dependencies.sh as executable (+x) so we don't need to start it with `sh` in the build .yml
Fixes https://github.com/dotnet/runtime/issues/36727
Toolchain Setup
---------------
-Building dotnet/runtime depends on several tools to be installed. You can download them individually or use [Homebrew](http://brew.sh) for easier toolchain setup.
+Building dotnet/runtime depends on several tools to be installed. You can download them individually or use [Homebrew](https://brew.sh) for easier toolchain setup.
Install the following packages:
- pkg-config
- python3
-The lines to install all the packages above using Homebrew.
+You can install all the packages above using Homebrew by running this command in the repository root:
```
-brew install cmake autoconf automake icu4c libtool openssl@1.1 pkg-config python3
+brew bundle --no-lock --file eng/Brewfile
```
--- /dev/null
+brew "autoconf"
+brew "automake"
+brew "cmake"
+brew "icu4c"
+brew "libtool"
+brew "openssl@1.1"
+brew "pkg-config"
+brew "python3"
-#!/usr/bin/env sh
+#!/usr/bin/env bash
if [ "$1" = "Linux" ]; then
sudo apt update
if [ "$?" != "0" ]; then
exit 1;
fi
-elif [ "$1" = "OSX" ]; then
- brew update
- brew upgrade
- if [ "$?" != "0" ]; then
- exit 1;
- fi
- brew install autoconf automake icu4c libtool openssl@1.1 pkg-config python3
- if [ "$?" != "0" ]; then
- exit 1;
- fi
- if [ "$?" != "0" ]; then
- exit 1;
- fi
-elif [ "$1" = "tvOS" ]; then
- brew update
- brew upgrade
- if [ "$?" != "0" ]; then
- exit 1;
- fi
- brew install autoconf automake libtool openssl@1.1 pkg-config python3
- if [ "$?" != "0" ]; then
- exit 1;
- fi
-elif [ "$1" = "iOS" ]; then
- brew update
- brew upgrade
- if [ "$?" != "0" ]; then
- exit 1;
- fi
- brew install autoconf automake libtool openssl@1.1 pkg-config python3
+elif [ "$1" = "OSX" ] || [ "$1" = "tvOS" ] || [ "$1" = "iOS" ]; then
+ engdir=$(dirname "${BASH_SOURCE[0]}")
+ brew bundle --no-lock --file "${engdir}/Brewfile"
if [ "$?" != "0" ]; then
exit 1;
fi
- template: /eng/pipelines/common/clone-checkout-bundle-step.yml
- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
- - script: sh $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
+ - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
displayName: Install Build Dependencies
- script: |
# Install test build dependencies
- ${{ if eq(parameters.osGroup, 'OSX') }}:
- - script: sh $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
+ - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
displayName: Install native dependencies
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
# Necessary to install correct cmake version
# and FreeBSD builds use a build agent with dependencies
# preinstalled, so we only need this step for OSX and Windows.
- ${{ if eq(parameters.osGroup, 'OSX') }}:
- - script: sh $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
+ - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
displayName: Install native dependencies
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
# Necessary to install python
cleanUnpackFolder: false
- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
- - script: sh $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
+ - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
displayName: Install Build Dependencies
- script: |
- template: /eng/pipelines/common/restore-internal-tools.yml
- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
- - script: sh $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
+ - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
displayName: Install Build Dependencies
- script: |
# and FreeBSD builds use a build agent with dependencies
# preinstalled, so we only need this step for OSX and Windows.
- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
- - script: sh $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
+ - script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
displayName: Install native dependencies
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
# Necessary to install python