forked from xamarin/XamarinComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
106 lines (100 loc) · 4.61 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
trigger:
- main
- refs/tags/*
pr:
- main
resources:
repositories:
- repository: internal-templates
type: github
name: xamarin/yaml-templates
endpoint: xamarin
ref: refs/heads/main
- repository: components
type: github
name: xamarin/XamarinComponents
endpoint: xamarin
ref: refs/heads/main
variables:
DotNet6Version: 6.0.300
DotNet6Source: https://aka.ms/dotnet6/nuget/index.json
NuGetOrgSource: https://api.nuget.org/v3/index.json
XamarinDotNetWorkloadSource: workloads.json # or url (check for recent versions - redth)
# https://aka.ms/dotnet/maui/6.0.400.json
# matching builds
# NOTE: there wasn't a public release of 16.11 for macOS
LegacyXamarinAndroidPkg: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/6454390/6.0.4xx/0b8d593a61bb49120fdf817e8dfdbc4b33937772/xamarin.android-12.3.99.117.pkg
LegacyXamarinAndroidVsix: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/6454390/6.0.4xx/0b8d593a61bb49120fdf817e8dfdbc4b33937772/Xamarin.Android.Sdk-12.3.99.117.vsix
jobs:
- template: .ci/build.v1.yml@components
parameters:
timeoutInMinutes: 360
areaPath: 'DevDiv\VS Client - Runtime SDKs\Android'
macosImage: 'macOS-12' # the name of the macOS VM image
# Monterey 20220728
windowsAgentPoolName: AzurePipelines-EO
windowsImage: ''
windowsImageOverride: AzurePipelinesWindows2019compliant
xcode: 13.3.1
buildType: 'manifest'
linuxAgentPoolName: AzurePipelines-EO
linuxsImage: ''
linuxImageOverride: AzurePipelinesUbuntu20.04compliant
validPackagePrefixes:
# Preferred prefixes
- Xamarin
- Mono
# Other product prefixes
- SkiaSharp
- HarfBuzzSharp
- mdoc
# Historical prefixes
- Masonry
- GoogleGson
- AndroidEasingFunctions
- Square
- JakeWharton.Picasso2OkHttp3Downloader
- RecyclerViewAnimators
- GoogleGson
dotnet: $(DotNet6Version)
preBuildSteps:
- task: JavaToolInstaller@0
displayName: install JDK 11
inputs:
versionSpec: '11'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- pwsh: |
dotnet tool install --global boots
displayName: install .NET global tools
- pwsh: |
boots $(XamarinAndroidPkg)
condition: eq(variables['System.JobName'], 'macos')
displayName: install Xamarin.Android
- pwsh: |
boots $(XamarinAndroidVsix)
condition: eq(variables['System.JobName'], 'windows')
displayName: install Xamarin.Android
- pwsh: |
dotnet workload update --verbosity diag --from-rollback-file $(XamarinDotNetWorkloadSource) --source $(Dotnet6Source) --source $(NuGetOrgSource)
dotnet workload install android --verbosity diag --skip-manifest-update --source $(Dotnet6Source) --source $(NuGetOrgSource)
dotnet workload install maui --verbosity diag --skip-manifest-update --source $(Dotnet6Source) --source $(NuGetOrgSource)
displayName: install .NET 6 Android Workload
condition: ne(variables['System.JobName'], 'linux')
tools:
- 'xamarin.androidbinderator.tool': '0.5.4'
- 'xamarin.androidx.migration.tool': '1.0.10'
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- template: sign-artifacts/jobs/v2.yml@internal-templates
parameters:
dependsOn: [ 'build_linux', 'build_macos', 'windows' ]
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
# Executive Order (EO): Software Bill of Materials (SBOM): https://eng.ms/docs/cloud-ai-platform/devdiv/one-engineering-system-1es/1es-docs/secure-supply-chain/ado-sbom-generator
- template: compliance/sbom/job.v1.yml@internal-templates
parameters:
dependsOn: [ 'signing' ]
artifactNames: [ 'nuget-signed' ]
packageName: Xamarin.Components # SBOM package name. TODO: Customize for specific component: Replace with the name of the nuget package such as Square.Moshi.Adapters
packageVersionRegex: '' # SBOM package version. TODO: Customize for specific component: Regular expression used to glean the version number from the package name such as '(?i)^Square.Moshi.Adapters\.(?<version>\d+\.\d+\.\d+).nupkg$'
packageFilter: '*.nupkg'
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')