forked from unoplatform/calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vsts-ci.Windows.yml
214 lines (192 loc) · 7.3 KB
/
.vsts-ci.Windows.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
209
210
211
212
213
214
jobs:
- job: Windows
pool:
vmImage: 'windows-2022'
variables:
ANDROID_NDK_HOME: C:\Microsoft\AndroidNDK64\android-ndk-r16b
ANDROID_NDK_PATH: C:\Microsoft\AndroidNDK64\android-ndk-r16b
AndroidNdkDirectory: C:\Microsoft\AndroidNDK64\android-ndk-r16b
VersionCodeOffset: 400559 # last value for the APK release
workspace:
clean: all
steps:
- template: build/uno-ci/canary-updater.yml
- template: build/uno-ci/gitversion.yml
- task: UseDotNet@2
displayName: 'Use .NET runtime 6.0.400'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: 6.0.400
- template: build/uno-ci/dotnet-install-windows.yml
- template: build/uno-ci/jdk-setup.yml
- task: MSBuild@1
inputs:
solution: src/build/build.csproj
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release /detailedsummary
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: MSBuild@1
displayName: ARM Android build
inputs:
solution: src/CalcManager.Android/CalcManager.Android.vcxproj
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release /p:Platform=ARM /detailedsummary
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: MSBuild@1
displayName: ARM64 Android build
inputs:
solution: src/CalcManager.Android/CalcManager.Android.vcxproj
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release /p:Platform=ARM64 /detailedsummary
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: MSBuild@1
displayName: X86 Android build
inputs:
solution: src/CalcManager.Android/CalcManager.Android.vcxproj
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release /p:Platform=x86 /detailedsummary
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: MSBuild@1
displayName: x64 Android build
inputs:
solution: src/CalcManager.Android/CalcManager.Android.vcxproj
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release /p:Platform=x64 /detailedsummary
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: MSBuild@1
displayName: Build Win32 CalcManager
inputs:
solution: src/CalcManager.Win32\CalcManager.Win32.vcxproj
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /p:Configuration=Release /p:Platform=x64
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- script: |
cd $(build.sourcesdirectory)/src/Calculator.mobile
dotnet publish -f:net6.0-android -c:Release /p:AndroidSigningKeyPass=$(KeystorePassword) /p:AndroidSigningStorePass=$(KeystorePassword) "/p:InformationalVersion=$(GITVERSION.INFORMATIONALVERSION)" /bl:$(build.artifactstagingdirectory)/android/msbuild-net6.binlog
displayName: 'Build Store Packages (net6)'
- task: CopyFiles@2
displayName: 'Publish Android net6 Binaries'
retryCountOnTaskFailure: 3
inputs:
SourceFolder: $(build.sourcesdirectory)/src/Calculator.Mobile/bin/Release/net6.0-android
Contents: |
**/*.aab
**/*.apk
TargetFolder: $(build.artifactstagingdirectory)/android-net6
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- task: MSBuild@1
displayName: 'Build Store Packages (Xamarin)'
retryCountOnTaskFailure: 3
inputs:
solution: src/Calculator.windows-ci-only.slnf
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release /detailedsummary /p:SkipWasmBuild=true /p:BuildForPlayStore=true /p:AndroidSigningKeyPass=$(KeystorePassword) /p:AndroidSigningStorePass=$(KeystorePassword) "/p:InformationalVersion=$(GITVERSION.INFORMATIONALVERSION)" /bl:$(build.artifactstagingdirectory)/android/msbuild-xamarin.binlog
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: MSBuild@1
displayName: 'Build Android AppCenter package'
retryCountOnTaskFailure: 3
inputs:
solution: src/Calculator.Droid/Calculator.Droid.csproj
msbuildLocationMethod: version
msbuildVersion: latest
msbuildArchitecture: x86
msbuildArguments: /r /p:Configuration=Release /detailedsummary /p:BuildForPlayStore=false /p:AndroidSigningKeyPass=$(KeystorePassword) /p:AndroidSigningStorePass=$(KeystorePassword) "/p:InformationalVersion=$(GITVERSION.INFORMATIONALVERSION)"
clean: false
maximumCpuCount: true
restoreNugetPackages: false
logProjectEvents: false
createLogFile: false
- task: CopyFiles@2
displayName: 'Publish Android Binaries'
retryCountOnTaskFailure: 3
inputs:
SourceFolder: $(build.sourcesdirectory)/src/Calculator.Droid/bin/Release
Contents: |
**/*.aab
**/*.apk
TargetFolder: $(build.artifactstagingdirectory)/android-xamarin
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- script: dotnet publish -c Release -r win10-x64 --self-contained true $(build.sourcesdirectory)/src/Calculator.Skia.Gtk/Calculator.Skia.Gtk.csproj
displayName: 'Build Skia win10-x64'
- task: ArchiveFiles@2
displayName: 'Archive Skia win10-x64'
retryCountOnTaskFailure: 3
inputs:
rootFolderOrFile: '$(build.sourcesdirectory)\src\Calculator.Skia.Gtk\bin\Release\net6.0\win10-x64\publish'
archiveFile: '$(Build.ArtifactStagingDirectory)/skia/Calculator-win10-x64.zip'
includeRootFolder: false
- task: CopyFiles@2
displayName: 'Publish Wasm Binaries'
retryCountOnTaskFailure: 3
inputs:
SourceFolder: $(build.sourcesdirectory)/src/Calculator.Wasm/bin/Release/net5.0/dist
Contents: '**/*.*'
TargetFolder: $(build.artifactstagingdirectory)/wasm-interp
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- task: CopyFiles@2
displayName: 'Publish Windows Binaries'
retryCountOnTaskFailure: 3
inputs:
SourceFolder: $(build.sourcesdirectory)/src/Calculator.UWP/AppPackages
Contents: '**/*.*'
TargetFolder: $(build.artifactstagingdirectory)/windows
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- task: PublishBuildArtifacts@1
displayName: Publish Package Artifacts
condition: always()
retryCountOnTaskFailure: 3
inputs:
pathToPublish: $(build.artifactstagingdirectory)
artifactType: container
artifactName: Calculator