Add initial support for Apple Silicon (#27264)

* Add initial support for Apple Silicon

- Add osx-arm64 runtime dependency
- Add osx-arm64 to supported rid identifiers
- Update vmImage to macOS-10.15
- Use XCode 12.2 for all macOS builds
- Add build and sign macos arm64 to CI scripts

This should build aspnetcore for osx-arm64, however
the native dependencies libuv and libe_sqlite3 will
need to be updated to have full functionality.  These
are provided by separate repos.

Enabling at this point unblocks effort to create the initial
osx-arm64 SDK.

* PR Feedback
This commit is contained in:
Steve MacLean 2020-10-27 18:17:32 -04:00 коммит произвёл GitHub
Родитель f67413e072
Коммит bb5efb768c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 41 добавлений и 3 удалений

Просмотреть файл

@ -326,11 +326,43 @@ stages:
publishFeedCredentials: 'DevDiv - VS package feed'
# Build MacOS
# Build MacOS arm64
- template: jobs/default-build.yml
parameters:
jobName: MacOs_arm64_build
jobDisplayName: "Build: macOS arm64"
agentOs: macOs
buildArgs:
--arch arm64
--pack
--all
--no-build-nodejs
--no-build-java
-p:OnlyPackPlatformSpecificPackages=true
-p:AssetManifestFileName=aspnetcore-MacOS_arm64.xml
$(_BuildArgs)
$(_PublishArgs)
$(_InternalRuntimeDownloadArgs)
installNodeJs: false
installJdk: false
artifacts:
- name: MacOS_arm64_Logs
path: artifacts/log/
publishOnError: true
includeForks: true
- name: MacOS_arm64_Packages
path: artifacts/packages/
- ${{ if ne(variables['PostBuildSign'], 'true') }}:
- template: jobs/codesign-xplat.yml
parameters:
inputName: MacOS_arm64
# Build MacOS x64
- template: jobs/default-build.yml
parameters:
jobName: MacOs_x64_build
jobDisplayName: "Build: macOS"
jobDisplayName: "Build: macOS x64"
agentOs: macOs
buildArgs:
--pack
@ -787,6 +819,7 @@ stages:
- Windows_arm_build
- Windows_arm64_build
- ${{ if ne(variables['PostBuildSign'], 'true') }}:
- CodeSign_Xplat_MacOS_arm64
- CodeSign_Xplat_MacOS_x64
- CodeSign_Xplat_Linux_x64
- CodeSign_Xplat_Linux_arm

Просмотреть файл

@ -92,7 +92,7 @@ jobs:
# See https://github.com/dotnet/arcade/blob/master/Documentation/ChoosingAMachinePool.md
pool:
${{ if eq(parameters.agentOs, 'macOS') }}:
vmImage: macOS-10.14
vmImage: macOS-10.15
${{ if eq(parameters.agentOs, 'Linux') }}:
${{ if eq(parameters.useHostedUbuntu, true) }}:
vmImage: ubuntu-16.04
@ -143,6 +143,9 @@ jobs:
- ${{ if ne(parameters.agentOs, 'Windows') }}:
- script: df -h
displayName: Disk size
- ${{ if eq(parameters.agentOs, 'macOS') }}:
- script: sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer
displayName: Use XCode 12.2
- checkout: self
clean: true
- ${{ if and(eq(parameters.agentOs, 'Windows'), eq(parameters.isTestingJob, true)) }}:

Просмотреть файл

@ -146,6 +146,7 @@
win-arm;
win-arm64;
osx-x64;
osx-arm64;
linux-musl-x64;
linux-musl-arm;
linux-musl-arm64;

Просмотреть файл

@ -90,6 +90,7 @@ and are generated based on the last package release.
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.win-arm" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.win-arm64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.osx-x64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.osx-arm64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-x64" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-arm" />
<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-arm64" />