-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Move build stages into yaml templates (#7553)
Context: xamarin/sdk-insertions#42 Context: https://devdiv.visualstudio.com/DevDiv/_build?definitionId=17671&_a=summary As part of efforts to create an integration and release pipeline for all of MAUI we will want to "templatize" more of our YAML. Our three build stages have been moved into new templates that can be referenced by the MAUI "mega pipeline".
- Loading branch information
Showing
5 changed files
with
330 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
parameters: | ||
buildPool: android-devdiv-ubuntu-vmss | ||
buildResultArtifactName: Build Results - Linux | ||
checkoutCommit: '' | ||
checkoutPath: 's/xamarin-android' | ||
checkoutPersistCredentials: false | ||
dependsOn: '' | ||
dependsOnResult: '' | ||
jobName: linux_build_create_sdk_pack | ||
jobDisplayName: Linux > Build | ||
nugetArtifactName: $(LinuxNuGetArtifactName) | ||
repositoryAlias: self | ||
stageName: linux_build | ||
stageDisplayName: Linux | ||
|
||
stages: | ||
- stage: ${{ parameters.stageName }} | ||
displayName: ${{ parameters.stageDisplayName }} | ||
dependsOn: ${{ parameters.dependsOn }} | ||
${{ if and(ne(parameters.dependsOn, ''), ne(parameters.dependsOnResult, '')) }}: | ||
condition: eq(dependencies.${{ parameters.dependsOn }}.result, '${{ parameters.dependsOnResult }}') | ||
jobs: | ||
- job: ${{ parameters.jobName }} | ||
displayName: ${{ parameters.jobDisplayName }} | ||
pool: ${{ parameters.buildPool }} | ||
timeoutInMinutes: 180 | ||
workspace: | ||
clean: all | ||
variables: | ||
CXX: g++-10 | ||
CC: gcc-10 | ||
steps: | ||
- template: sdk-unified/steps/checkout/v1.yml@yaml-templates | ||
parameters: | ||
resource: ${{ parameters.repositoryAlias }} | ||
commit: ${{ parameters.checkoutCommit }} | ||
path: ${{ parameters.checkoutPath }} | ||
persistCredentials: ${{ parameters.checkoutPersistCredentials }} | ||
|
||
- checkout: monodroid | ||
clean: true | ||
submodules: recursive | ||
path: s/xamarin-android/external/monodroid | ||
persistCredentials: true | ||
|
||
- script: rm -rf external/monodroid/external/xamarin-android | ||
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android | ||
displayName: delete external xamarin-android submodule | ||
|
||
- template: setup-ubuntu.yaml | ||
|
||
- task: NuGetAuthenticate@0 | ||
displayName: authenticate with azure artifacts | ||
inputs: | ||
forceReinstallCredentialProvider: true | ||
|
||
- script: make prepare-external-git-dependencies PREPARE_CI=1 CONFIGURATION=$(XA.Build.Configuration) | ||
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android | ||
displayName: make prepare-external-git-dependencies | ||
|
||
- script: make jenkins PREPARE_CI=1 PREPARE_AUTOPROVISION=1 CONFIGURATION=$(XA.Build.Configuration) | ||
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android | ||
displayName: make jenkins | ||
|
||
- script: make create-nupkgs CONFIGURATION=$(XA.Build.Configuration) | ||
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android | ||
displayName: make create-nupkgs | ||
|
||
- script: > | ||
df -h && | ||
mkdir -p $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/nuget-linux && | ||
ln $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/$(NuGetArtifactName)/Microsoft.Android.Sdk.Linux*.nupkg | ||
$(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/nuget-linux && | ||
ln $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/$(NuGetArtifactName)/SignList.xml | ||
$(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/nuget-linux | ||
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-android | ||
displayName: copy linux sdk | ||
- task: PublishPipelineArtifact@1 | ||
displayName: upload linux sdk | ||
inputs: | ||
artifactName: ${{ parameters.nugetArtifactName }} | ||
targetPath: $(System.DefaultWorkingDirectory)/xamarin-android/bin/Build$(XA.Build.Configuration)/nuget-linux | ||
|
||
- template: upload-results.yaml | ||
parameters: | ||
xaSourcePath: $(System.DefaultWorkingDirectory)/xamarin-android | ||
artifactName: ${{ parameters.buildResultArtifactName }} | ||
includeBuildResults: true | ||
|
||
- template: fail-on-issue.yaml |
Oops, something went wrong.