This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
azure-pipelines.yml
123 lines (116 loc) · 3.76 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# https://aka.ms/yaml
trigger:
- main
resources:
repositories:
- repository: templates
type: github
name: xamarin/yaml-templates
ref: refs/heads/main
endpoint: xamarin
variables:
- group: Xamarin-Secrets
- group: Xamarin Release
- name: Configuration
value: Release
- name: DotNetVersion
value: 7.0.100
- name: BootsVersion
value: 1.1.0.36
- name: DotNet.Cli.Telemetry.OptOut
value: true
- name: DotNet.Workloads
value: android ios macos
jobs:
- job: windows
pool:
vmImage: windows-2022
demands: msbuild
steps:
- task: JavaToolInstaller@0
displayName: install JDK 11
inputs:
versionSpec: '11'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- powershell: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1
& .\dotnet-install.ps1 -Version $(DotNetVersion) -InstallDir "$env:ProgramFiles\dotnet\" -Verbose
& dotnet --list-sdks
displayName: install .NET $(DotNetVersion)
- powershell: |
& dotnet workload install $(DotNet.Workloads) --verbosity diag
displayName: install .NET workloads
- powershell: |
& dotnet tool update --global boots --version $(BootsVersion)
& boots --preview Xamarin.Android
displayName: install Xamarin.Android
- script: dotnet build Xamarin.Legacy.Sdk.sln -bl:$(System.DefaultWorkingDirectory)/bin/Xamarin.Legacy.Sdk.binlog
displayName: build SDK
- script: mkdir bin\Debug
displayName: fix missing NuGet source
- script: dotnet build samples/samples.sln -bl:$(System.DefaultWorkingDirectory)/bin/samples.binlog
displayName: build samples
- task: PublishPipelineArtifact@1
displayName: artifacts
inputs:
artifact: windows
targetPath: bin
condition: succeededOrFailed()
# NOTE: that PublishBuildArtifacts is required for signing
- task: PublishBuildArtifacts@1
displayName: nuget-unsigned
inputs:
artifactName: nuget-unsigned
pathToPublish: bin/Release
condition: succeededOrFailed()
# Builds with MSBuild from VS
- job: vs
pool:
vmImage: windows-2022
demands: msbuild
steps:
- task: JavaToolInstaller@0
displayName: install JDK 11
inputs:
versionSpec: '11'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- powershell: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1
& .\dotnet-install.ps1 -Version $(DotNetVersion) -InstallDir "$env:ProgramFiles\dotnet\" -Verbose
& dotnet --list-sdks
displayName: install .NET $(DotNetVersion)
- powershell: |
& dotnet workload install $(DotNet.Workloads) --verbosity diag
displayName: install .NET workloads
- powershell: |
& dotnet tool update --global boots --version $(BootsVersion)
& boots --preview Xamarin.Android
displayName: install Xamarin.Android
- task: MSBuild@1
inputs:
solution: Xamarin.Legacy.Sdk.sln
msbuildArguments: -restore -bl:$(System.DefaultWorkingDirectory)/bin/Xamarin.Legacy.Sdk.binlog
displayName: build SDK
- script: mkdir bin\Debug
displayName: fix missing NuGet source
- task: MSBuild@1
inputs:
solution: samples/samples.sln
msbuildArguments: -restore -bl:$(System.DefaultWorkingDirectory)/bin/samples.binlog
displayName: build samples
- task: PublishPipelineArtifact@1
displayName: artifacts
inputs:
artifact: vs
targetPath: bin
condition: succeededOrFailed()
- template: sign-artifacts/jobs/v2.yml@templates
parameters:
displayName: sign
artifactName: nuget-unsigned
dependsOn: windows
condition: ne(variables['Build.Reason'], 'PullRequest')