-
Notifications
You must be signed in to change notification settings - Fork 8
/
azure-pipelines.yml
208 lines (173 loc) · 8.72 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# https://aka.ms/yaml
trigger:
- main
variables:
Configuration: Release
AndroidSupportedAbis: arm64-v8a
AndroidPackageFormat: apk
RID: android-arm64
DotNet.Version: 9.0.x
DotNet.Root: /usr/local/share/dotnet/
Maui.Feeds: --source https://api.nuget.org/v3/index.json
MauiTargetFramework: net9.0
NugetSecurityAnalysisWarningLevel: warn
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
- job: Xamarin
condition: false
pool:
vmImage: macOS-latest
steps:
- task: UseDotNet@2
displayName: Use .NET $(DotNet.Version)
inputs:
version: $(DotNet.Version)
includePreviewVersions: true
- bash: >
dotnet tool install boots --tool-path boots &&
./boots/boots https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/5343278/d17-0/6b0e6b265390832dcfb499e9e1e893c462548a30/xamarin.android-12.1.0.5.pkg
displayName: install Xamarin.Android
- task: MSBuild@1
displayName: build Xamarin.Android app
inputs:
solution: XamarinAndroidApp/XamarinAndroidApp/XamarinAndroidApp.csproj
msbuildArguments: -restore -t:SignAndroidPackage -bl:$(Build.ArtifactStagingDirectory)/logs/XamarinAndroidApp.binlog
- task: MSBuild@1
displayName: build Xamarin.Forms Flyout app
inputs:
solution: XamarinFormsFlyout/XamarinFormsApp/XamarinFormsApp.Android/XamarinFormsApp.Android.csproj
msbuildArguments: -restore -t:SignAndroidPackage -bl:$(Build.ArtifactStagingDirectory)/logs/XamarinFormsFlyout.binlog
- task: MSBuild@1
displayName: build Xamarin.Forms Blank app
inputs:
solution: XamarinFormsBlank/XamarinFormsBlank/XamarinFormsBlank.Android/XamarinFormsBlank.Android.csproj
msbuildArguments: -restore -t:SignAndroidPackage -bl:$(Build.ArtifactStagingDirectory)/logs/XamarinFormsBlank.binlog
- task: CopyFiles@2
displayName: copy apks
inputs:
contents: |
XamarinAndroidApp/**/*-Signed.apk
XamarinFormsFlyout/**/*-Signed.apk
XamarinFormsBlank/**/*-Signed.apk
flattenFolders: true
targetFolder: $(Build.ArtifactStagingDirectory)/release
- task: MSBuild@1
displayName: build Xamarin.Android app AOT
inputs:
solution: XamarinAndroidApp/XamarinAndroidApp/XamarinAndroidApp.csproj
msbuildArguments: -t:Clean,SignAndroidPackage -p:AotAssemblies=true -p:AndroidEnableProfiledAot=true -bl:$(Build.ArtifactStagingDirectory)/logs/XamarinAndroidApp-Aot.binlog
- task: MSBuild@1
displayName: build Xamarin.Forms Flyout app AOT
inputs:
solution: XamarinFormsFlyout/XamarinFormsApp/XamarinFormsApp.Android/XamarinFormsApp.Android.csproj
msbuildArguments: -t:Clean,SignAndroidPackage -p:AotAssemblies=true -p:AndroidEnableProfiledAot=true -bl:$(Build.ArtifactStagingDirectory)/logs/XamarinFormsFlyout-Aot.binlog
- task: MSBuild@1
displayName: build Xamarin.Forms Blank app AOT
inputs:
solution: XamarinFormsBlank/XamarinFormsBlank/XamarinFormsBlank.Android/XamarinFormsBlank.Android.csproj
msbuildArguments: -t:Clean,SignAndroidPackage -p:AotAssemblies=true -p:AndroidEnableProfiledAot=true -bl:$(Build.ArtifactStagingDirectory)/logs/XamarinFormsFlyout-Aot.binlog
- task: CopyFiles@2
displayName: copy apks
inputs:
contents: |
XamarinAndroidApp/**/*-Signed.apk
XamarinFormsFlyout/**/*-Signed.apk
XamarinFormsBlank/**/*-Signed.apk
flattenFolders: true
targetFolder: $(Build.ArtifactStagingDirectory)/release-aot
- task: PublishBuildArtifacts@1
displayName: upload artifacts
inputs:
artifactName: xamarin-artifacts
condition: succeededOrFailed()
- job: MAUI
workspace:
clean: all
pool:
vmImage: macOS-latest
steps:
- checkout: self
submodules: true
- task: UseDotNet@2
displayName: Use .NET $(DotNet.Version)
inputs:
version: $(DotNet.Version)
includePreviewVersions: true
- bash: dotnet workload install maui $(Maui.Feeds) --verbosity diag
displayName: install optional workloads
- bash: >
dotnet new android -o HelloAndroid &&
dotnet new maui -o HelloMaui
displayName: dotnet new
- bash: dotnet build HelloAndroid/HelloAndroid.csproj -r $(RID) -p:RunAOTCompilation=false -bl:$(Build.ArtifactStagingDirectory)/logs/HelloAndroid.binlog
displayName: build android
- bash: >
dotnet restore HelloMaui/HelloMaui.csproj -bl:$(Build.ArtifactStagingDirectory)/logs/HelloMaui-restore.binlog &&
dotnet build HelloMaui/HelloMaui.csproj -f $(MauiTargetFramework)-android -r $(RID) -p:RunAOTCompilation=false --no-restore -bl:$(Build.ArtifactStagingDirectory)/logs/HelloMaui.binlog
displayName: build maui
- bash: >
dotnet restore HelloMauiOld/HelloMauiOld.csproj -bl:$(Build.ArtifactStagingDirectory)/logs/HelloMauiOld-restore.binlog &&
dotnet build HelloMauiOld/HelloMauiOld.csproj -f $(MauiTargetFramework)-android -r $(RID) -p:RunAOTCompilation=false --no-restore -bl:$(Build.ArtifactStagingDirectory)/logs/HelloMauiOld.binlog
displayName: build old maui
condition: false
- bash: >
dotnet restore external/dotnet-podcasts/src/Mobile/Microsoft.NetConf2021.Maui.csproj -bl:$(Build.ArtifactStagingDirectory)/logs/dotnet-podcasts-restore.binlog &&
dotnet build external/dotnet-podcasts/src/Mobile/Microsoft.NetConf2021.Maui.csproj -f $(MauiTargetFramework)-android -r $(RID) -p:RunAOTCompilation=false --no-restore -bl:$(Build.ArtifactStagingDirectory)/logs/dotnet-podcasts.binlog
displayName: build podcast
condition: false
- task: CopyFiles@2
displayName: copy apks
inputs:
contents: |
HelloAndroid/**/*-Signed.apk
HelloMaui/**/*-Signed.apk
HelloMauiOld/**/*-Signed.apk
external/dotnet-podcasts/**/*-Signed.apk
flattenFolders: true
targetFolder: $(Build.ArtifactStagingDirectory)/release-jit
- bash: dotnet build HelloAndroid/HelloAndroid.csproj -r $(RID) -t:Rebuild -p:TrimMode=full -bl:$(Build.ArtifactStagingDirectory)/logs/HelloAndroid-Interp.binlog
displayName: build android trimmode
- bash: dotnet build HelloMaui/HelloMaui.csproj -f $(MauiTargetFramework)-android -r $(RID) -t:Rebuild -p:TrimMode=full --no-restore -bl:$(Build.ArtifactStagingDirectory)/logs/HelloMaui-Interp.binlog
displayName: build maui trimmode
- bash: dotnet build HelloMauiOld/HelloMauiOld.csproj -f $(MauiTargetFramework)-android -r $(RID) -t:Rebuild -p:TrimMode=full --no-restore -bl:$(Build.ArtifactStagingDirectory)/logs/HelloMauiOld-Interp.binlog
displayName: build old maui trimmode
condition: false
- bash: dotnet build external/dotnet-podcasts/src/Mobile/Microsoft.NetConf2021.Maui.csproj -f $(MauiTargetFramework)-android -r $(RID) -t:Rebuild -p:TrimMode=full --no-restore -bl:$(Build.ArtifactStagingDirectory)/logs/dotnet-podcasts-Interp.binlog
displayName: build podcast trimmode
condition: false
- task: CopyFiles@2
displayName: copy apks
inputs:
contents: |
HelloAndroid/**/*-Signed.apk
HelloMaui/**/*-Signed.apk
HelloMauiOld/**/*-Signed.apk
external/dotnet-podcasts/**/*-Signed.apk
flattenFolders: true
targetFolder: $(Build.ArtifactStagingDirectory)/release-trimmode-full
- bash: dotnet build HelloAndroid/HelloAndroid.csproj -r $(RID) -t:Rebuild -p:RunAOTCompilation=true -p:AndroidEnableProfiledAot=true -bl:$(Build.ArtifactStagingDirectory)/logs/HelloAndroid-Aot.binlog
displayName: build android AOT
- bash: dotnet build HelloMaui/HelloMaui.csproj -f $(MauiTargetFramework)-android -r $(RID) -t:Rebuild -p:RunAOTCompilation=true -p:AndroidEnableProfiledAot=true --no-restore -bl:$(Build.ArtifactStagingDirectory)/logs/HelloMaui-Aot.binlog
displayName: build maui AOT
- bash: dotnet build HelloMauiOld/HelloMauiOld.csproj -f $(MauiTargetFramework)-android -r $(RID) -t:Rebuild -p:RunAOTCompilation=true -p:AndroidEnableProfiledAot=true --no-restore -bl:$(Build.ArtifactStagingDirectory)/logs/HelloMauiOld-Aot.binlog
displayName: build old maui AOT
condition: false
- bash: dotnet build external/dotnet-podcasts/src/Mobile/Microsoft.NetConf2021.Maui.csproj -f $(MauiTargetFramework)-android -r $(RID) -t:Rebuild -p:RunAOTCompilation=true -p:AndroidEnableProfiledAot=true --no-restore -bl:$(Build.ArtifactStagingDirectory)/logs/dotnet-podcasts-Aot.binlog
displayName: build podcast AOT
condition: false
- task: CopyFiles@2
displayName: copy apks
inputs:
contents: |
HelloAndroid/**/*-Signed.apk
HelloMaui/**/*-Signed.apk
HelloMauiOld/**/*-Signed.apk
external/dotnet-podcasts/**/*-Signed.apk
flattenFolders: true
targetFolder: $(Build.ArtifactStagingDirectory)/release-aot
- task: PublishBuildArtifacts@1
displayName: upload artifacts
inputs:
artifactName: maui-artifacts
condition: succeededOrFailed()