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
19 changes: 19 additions & 0 deletions eng/install-native-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
#!/usr/bin/env bash

# This is a simple script primarily used for CI to install necessary dependencies
#
# For CI typical usage is
#
# ./install-native-dependencies.sh <OS> <arch> azDO
#
# For developer use it is not recommended to include the azDO final argument as that
# makes installation and configuration setting only required for azDO
#
# So simple developer usage would currently be
#
# ./install-native-dependencies.sh <OS>

if [ "$1" = "OSX" ] && [ "$2" = "arm64" ] && [ "$3" = "azDO" ]; then
# On AzDO macOS-10.15 build agents the Xcode currently defaults to Xcode 11.7
# Cross compilation for osx-arm64 requires xcode 12.2 or greater
sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer
fi

if [ "$1" = "Linux" ]; then
sudo apt update
if [ "$?" != "0" ]; then
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

# Do not rename as it clashes with MSBuild property in libraries/build-native.proj
- name: _crossBuildPropertyArg
value: /p:CrossBuild=${{ ne(parameters.crossrootfsDir, '') }}
value: /p:CrossBuild=${{ or(ne(parameters.crossrootfsDir, ''), and(eq(parameters.osGroup, 'OSX'), eq(parameters.archType, 'arm64'))) }}

- name: _cxx11Parameter
${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.archType, 'arm64')) }}:
Expand All @@ -65,7 +65,7 @@ jobs:
- template: /eng/pipelines/common/restore-internal-tools.yml

- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }} ${{ parameters.archType }} azDO
displayName: Install Build Dependencies

- script: |
Expand Down
21 changes: 21 additions & 0 deletions eng/pipelines/common/platform-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,27 @@ jobs:
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# macOS arm64

- ${{ if or(containsValue(parameters.platforms, 'OSX_arm64'), eq(parameters.platformGroup, 'all')) }}:
- template: xplat-setup.yml
parameters:
jobTemplate: ${{ parameters.jobTemplate }}
helixQueuesTemplate: ${{ parameters.helixQueuesTemplate }}
variables: ${{ parameters.variables }}
osGroup: OSX
archType: arm64
targetRid: osx-arm64
platform: OSX_arm64
jobParameters:
runtimeFlavor: ${{ parameters.runtimeFlavor }}
stagedBuild: ${{ parameters.stagedBuild }}
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.passPlatforms, true) }}:
platforms: ${{ parameters.platforms }}
helixQueueGroup: ${{ parameters.helixQueueGroup }}
${{ insert }}: ${{ parameters.jobParameters }}

# macOS x64

- ${{ if or(containsValue(parameters.platforms, 'OSX_x64'), eq(parameters.platformGroup, 'all')) }}:
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 @@ -87,7 +87,7 @@ jobs:

# Install test build dependencies
- ${{ if eq(parameters.osGroup, 'OSX') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) ${{ parameters.archType }} azDO
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/common/xplat-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:

# OSX Build Pool (we don't have on-prem OSX BuildPool
${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
vmImage: 'macOS-10.14'
vmImage: 'macOS-10.15'
Comment thread
sdmaclea marked this conversation as resolved.

${{ if eq(parameters.osGroup, 'Browser') }}:
vmImage: 'ubuntu-latest'
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/coreclr/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
- Linux_musl_arm64
- Linux_musl_x64
- Linux_x64
- OSX_arm64
- OSX_x64
- Windows_NT_arm
- Windows_NT_arm64
Expand Down Expand Up @@ -72,6 +73,7 @@ jobs:
- Linux_arm
- Linux_musl_arm64
- Linux_x64
- OSX_arm64
- OSX_x64
- Windows_NT_x86
jobParameters:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/coreclr/templates/build-jit-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,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: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) ${{ parameters.archType }} azDO
displayName: Install native dependencies
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
# Necessary to install python
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 @@ -125,7 +125,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: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) ${{ parameters.archType }} azDO
displayName: Install native dependencies
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
# Necessary to install python
Expand Down
6 changes: 4 additions & 2 deletions eng/pipelines/coreclr/templates/xplat-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ jobs:
- name: _HelixSource
value: ci/dotnet/runtime/$(Build.SourceBranch)

- name: crossArg
value: ''
- ${{ if ne(parameters.crossrootfsDir, '') }}:
- name: crossArg
value: '-cross'
- ${{ if eq(parameters.crossrootfsDir, '') }}:
- ${{ if and(eq(parameters.osGroup, 'OSX'), eq(parameters.archType, 'arm64')) }}:
- name: crossArg
value: ''
value: '-cross'

- ${{ each variable in parameters.variables }}:
- ${{insert}}: ${{ variable }}
Expand Down
8 changes: 6 additions & 2 deletions eng/pipelines/installer/jobs/base-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ jobs:
not(in(parameters.archType, 'x64', 'x86')),
eq(parameters.runtimeFlavor, 'mono'),
eq(parameters.isOfficialBuild, true),
ne(parameters.crossrootfsDir, '')) }}
ne(parameters.crossrootfsDir, ''),
and(eq(parameters.osGroup, 'OSX'), eq(parameters.archType, 'arm64'))) }}

- name: BuildAction
value: -test
Expand Down Expand Up @@ -130,13 +131,16 @@ jobs:
/p:PortableBuild=true
/p:SkipTests=$(SkipTests)
/p:RuntimeFlavor=${{ parameters.runtimeFlavor }}
/p:TargetArchitecture=${{ parameters.archType }}
/p:CrossBuild=${{ eq(parameters.archType, 'arm64') }}
$(llvmParameter)

- name: BaseJobBuildCommand
value: >-
$(Build.SourcesDirectory)/build.sh -ci
$(BuildAction)
-configuration $(_BuildConfig)
-arch ${{ parameters.archType }}
$(LiveOverridePathArgs)
$(CommonMSBuildArgs)
$(OfficialBuildArg)
Expand Down Expand Up @@ -462,7 +466,7 @@ jobs:
cleanUnpackFolder: false

- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }} ${{ parameters.archType }} azDO
displayName: Install Build Dependencies

- script: |
Expand Down
6 changes: 5 additions & 1 deletion eng/pipelines/libraries/base-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ jobs:
- _testScopeArg: -testscope ${{ parameters.testScope }}

- ${{ if in(parameters.osGroup, 'Linux', 'FreeBSD') }}:
- _crossBuildPropertyArg: /p:CrossBuild=${{ ne(parameters.crossrootfsDir, '') }}
- _crossBuildPropertyArg: /p:CrossBuild=${{ or(ne(parameters.crossrootfsDir, ''), and(eq(parameters.osGroup, 'OSX'), eq(parameters.archType, 'arm64'))) }}

- ${{ if eq(parameters.osGroup, 'OSX') }}:
# OSX is currently building on x64, anything else is a cross build
- _crossBuildPropertyArg: /p:CrossBuild=${{ ne(parameters.archType, 'x64') }}

- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}:
- _runtimeOSArg: /p:RuntimeOS=linux-musl
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 @@ -77,7 +77,7 @@ jobs:
- template: /eng/pipelines/common/restore-internal-tools.yml

- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }}
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }} ${{ parameters.archType }} azDO
displayName: Install Build Dependencies

- script: |
Expand Down
5 changes: 4 additions & 1 deletion eng/pipelines/libraries/outerloop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- Linux_arm64
- Linux_musl_arm64
- ${{ if eq(variables['includeOsxOuterloop'], true) }}:
- OSX_arm64

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I should've caught this... I think we don't have a helix queue setup for OSX_arm64, so I guess this broke the libraries outerloop build. I can fix this in a separate PR and we can enable them once we have a queue for it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

since we still dont have stable hardware for this we dont expect to enable test runs for osx_arm64 just yet. Can we leave it disabled till we have that?

@safern safern Oct 9, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, I created a PR for that: #43242

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

cool.. thanks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I should've caught this...

@safern Thanks for being genereous, but this was clearly my fault. I forget there are three main pipelines all the time. I get the rolling outerloop and the official build pipeline confused and map them to a single pipeline...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, we have so many ymls that it is sometimes hard to get it right and the easier way to add a new flavor is to try and look where we're already building osx_x64 and just add entries for the new platform there, so confusing for all I think 😄

- OSX_x64
jobParameters:
testGroup: innerloop
Expand All @@ -56,6 +57,7 @@ jobs:
- Linux_musl_x64
- Linux_musl_arm64
- ${{ if and(eq(variables['includeOsxOuterloop'], true), eq(variables['isFullMatrix'], true)) }}:
- OSX_arm64
- OSX_x64
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
jobParameters:
Expand All @@ -77,6 +79,7 @@ jobs:
- Linux_x64
- Linux_musl_x64
- ${{ if eq(variables['includeOsxOuterloop'], true) }}:
- OSX_arm64
- OSX_x64
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
jobParameters:
Expand All @@ -101,4 +104,4 @@ jobs:
isFullMatrix: ${{ variables['isFullMatrix'] }}
framework: net48
runTests: true
testScope: outerloop
testScope: outerloop
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 @@ -87,7 +87,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: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup)
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) ${{ parameters.archType }} azDO
displayName: Install native dependencies
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
# Necessary to install python
Expand Down
3 changes: 3 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ stages:
jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml
buildConfig: release
platforms:
- OSX_arm64
- OSX_x64
- Linux_x64
- Linux_arm
Expand Down Expand Up @@ -172,6 +173,7 @@ stages:
jobTemplate: /eng/pipelines/libraries/build-job.yml
buildConfig: Release
platforms:
- OSX_arm64
- OSX_x64
- Linux_x64
- Linux_arm
Expand Down Expand Up @@ -214,6 +216,7 @@ stages:
useOfficialAllConfigurations: true
buildFullPlatformManifest: true
platforms:
- OSX_arm64
- OSX_x64
- Linux_x64
- Linux_arm
Expand Down
4 changes: 4 additions & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ jobs:
- Linux_musl_arm
- Linux_musl_arm64
- Linux_musl_x64
- OSX_arm64
- Windows_NT_x86
- Windows_NT_x64
- Windows_NT_arm
Expand Down Expand Up @@ -201,6 +202,7 @@ jobs:
jobTemplate: /eng/pipelines/coreclr/templates/build-job.yml
buildConfig: release
platforms:
- OSX_arm64
- OSX_x64
- Linux_x64
- Linux_arm
Expand Down Expand Up @@ -619,6 +621,7 @@ jobs:
- Linux_arm64
- Linux_musl_x64
- Linux_x64
- OSX_arm64
- OSX_x64
- Windows_NT_x64
- FreeBSD_x64
Expand Down Expand Up @@ -705,6 +708,7 @@ jobs:
parameters:
buildConfig: Release
platforms:
- OSX_arm64
- OSX_x64
- Linux_x64
- Linux_arm64
Expand Down