Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/workflow/requirements/macos-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Install Apple Xcode developer tools from the Mac App Store ([link](https://apps.
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:

Expand All @@ -29,8 +29,8 @@ 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
```
8 changes: 8 additions & 0 deletions eng/Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
brew "autoconf"
brew "automake"
brew "cmake"
brew "icu4c"
brew "libtool"
brew "openssl@1.1"
brew "pkg-config"
brew "python3"
35 changes: 4 additions & 31 deletions eng/install-native-dependencies.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

if [ "$1" = "Linux" ]; then
sudo apt update
Expand All @@ -9,36 +9,9 @@ if [ "$1" = "Linux" ]; then
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
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- 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 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning these up 😄

- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
displayName: Install Build Dependencies

- script: |
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/templates/runtimes/build-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:

# 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
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/coreclr/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
# 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
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/installer/jobs/base-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ jobs:
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: |
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/libraries/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- 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: |
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/mono/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
# 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
Expand Down