Skip to content

Commit d6afe95

Browse files
authored
Use Hosted macOS pool, set up our own prereqs (#860)
1 parent f9d6a65 commit d6afe95

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.vsts.pipelines/jobs/ci-osx.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ parameters:
33
matrix:
44
Production: {}
55
pool:
6-
name: DotNetCore-Mac
7-
demands: Agent.OS -equals Darwin
6+
name: Hosted macOS
87

98
jobs:
109
- job: ${{ parameters.job }}
@@ -36,6 +35,27 @@ jobs:
3635
( set -o posix; set )
3736
displayName: Print all variables in environment
3837
38+
# Install native dependencies not present in hosted pool.
39+
- script: |
40+
setvariable() {
41+
(
42+
set +x
43+
echo "Setting '$1' to '$2'"
44+
echo "##vso[task.setvariable variable=$1;]$2"
45+
)
46+
}
47+
set -x
48+
# Based on https://github.com/sbomer/coreclr/blob/dc2fa1b96415f87d694e5b6e751e38ca6fbd09a1/unix-pipeline.yml#L36-L39
49+
brew install icu4c openssl
50+
brew link --force icu4c
51+
# Follow https://github.com/dotnet/corefx/blob/master/Documentation/building/unix-instructions.md#user-content-macos
52+
brew install cmake pkgconfig openssl
53+
brew_openssl_paths=$(brew info openssl | cut -d ' ' -f 1 | grep '^/.*/openssl/')
54+
# Use 'for' to get last/latest openssl install dir.
55+
for openssl_path in $brew_openssl_paths; do :; done
56+
setvariable OPENSSL_ROOT_DIR "$openssl_path"
57+
displayName: Install native dependencies
58+
3959
- template: ../steps/init-submodules-sh.yml
4060

4161
# Build source-build.

0 commit comments

Comments
 (0)