Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor macOS build pipeline #325

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
66 changes: 15 additions & 51 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,60 +119,24 @@ extends:
artifactName: 'drop-windows'
publishLocation: 'Container'
parallel: true
- job: OSX_latest_x64
displayName: 'Mac OS (x64)'
- job: OSX_latest
displayName: 'Mac OS'
pool:
name: Azure Pipelines
image: 'macOS-latest'
os: macOS
variables:
- name: _RID
value: osx-x64
- name: _BuildConfig
value: Release
- name: _SignType
value: none
- name: _DotNetPublishToBlobFeed
value: false
steps:
- checkout: self
clean: true
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
/p:RID=$(_RID)
displayName: Build
- task: ArchiveFiles@2
condition: and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
inputs:
rootFolderOrFile: 'artifacts/layout/dotnet-core-uninstall/'
includeRootFolder: false
archiveType: 'tar'
tarCompression: 'gz'
archiveFile: '$(Build.ArtifactStagingDirectory)/dotnet-core-uninstall.tar.gz'
replaceExistingArchive: true
- task: 1ES.PublishBuildArtifacts@1
condition: and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop-osx'
publishLocation: 'Container'
parallel: true
- job: OSX_latest_arm64
displayName: 'Mac OS (arm64)'
pool:
name: Azure Pipelines
image: 'macOS-latest'
os: macOS
variables:
- name: _RID
value: osx-arm64
- name: _BuildConfig
value: Release
- name: _SignType
value: none
- name: _DotNetPublishToBlobFeed
value: false
strategy:
matrix:
- ARM64:
_RID: osx-arm64
_BuildConfig: Release
_SignType: none
_DotNetPublishToBlobFeed: false
X64:
_RID: osx-x64
_BuildConfig: Release
_SignType: none
_DotNetPublishToBlobFeed: false
steps:
- checkout: self
clean: true
Expand All @@ -194,7 +158,7 @@ extends:
condition: and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop-osx'
artifactName: 'drop-$(_RID)'
publishLocation: 'Container'
parallel: true

61 changes: 14 additions & 47 deletions .vsts-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,66 +98,33 @@ stages:
artifactName: 'drop-windows'
publishLocation: 'Container'
parallel: true
- job: OSX_latest_x64
displayName: 'Mac OS (x64)'
- job: OSX_latest
displayName: 'Mac OS'
pool:
vmImage: 'macOS-latest'
strategy:
matrix:
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
Debug:
Debug_arm64:
_BuildConfig: Debug
_SignType: none
_DotNetPublishToBlobFeed : false
Release:
_BuildConfig: Release
_SignType: none
_DotNetPublishToBlobFeed : false
variables:
- name: _RID
value: osx-x64
steps:
- checkout: self
clean: true
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
/p:RID=$(_RID)
displayName: Build
- task: ArchiveFiles@2
condition: and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
inputs:
rootFolderOrFile: 'artifacts/layout/dotnet-core-uninstall/'
includeRootFolder: false
archiveType: 'tar'
tarCompression: 'gz'
archiveFile: '$(Build.ArtifactStagingDirectory)/dotnet-core-uninstall.tar.gz'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
condition: and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop-osx'
publishLocation: 'Container'
parallel: true
- job: OSX_latest_arm64
displayName: 'Mac OS (arm64)'
pool:
vmImage: 'macOS-latest'
strategy:
matrix:
${{ if in(variables['Build.Reason'], 'PullRequest') }}:
Debug:
_RID: osx-arm64
Debug_x64:
_BuildConfig: Debug
_SignType: none
_DotNetPublishToBlobFeed : false
Release:
_RID: osx-x64
Release_arm64:
_BuildConfig: Release
_SignType: none
_DotNetPublishToBlobFeed : false
variables:
- name: _RID
value: osx-arm64
_RID: osx-arm64
Release_x64:
_BuildConfig: Release
_SignType: none
_DotNetPublishToBlobFeed : false
_RID: osx-x64
steps:
- checkout: self
clean: true
Expand All @@ -179,7 +146,7 @@ stages:
condition: and(eq(variables['system.pullrequest.isfork'], false), eq(variables['_BuildConfig'], 'Release'))
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop-osx'
artifactName: 'drop-$(_RID)'
publishLocation: 'Container'
parallel: true

Expand Down