-
Notifications
You must be signed in to change notification settings - Fork 18
/
azure-pipelines.yml
142 lines (118 loc) · 4.33 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
trigger:
batch: true
branches:
include:
- master
resources:
containers:
- container: nv-bionic-wasm
image: nventive/wasm-build:1.3
pr:
branches:
include:
- master
paths:
include:
- '*'
exclude:
- '*.md'
jobs:
- job: Windows
pool:
vmImage: windows-2022
workspace:
clean: all
variables:
- name: UnoPackageOutputPath
value: $(Build.ArtifactStagingDirectory)
- name: ANDROID_NDK_HOME
value: C:\Microsoft\AndroidNDK64\android-ndk-r16b
- name: ANDROID_NDK_PATH
value: C:\Microsoft\AndroidNDK64\android-ndk-r16b
- name: AndroidNdkDirectory
value: C:\Microsoft\AndroidNDK64\android-ndk-r16b
- group: 'UADO Keystore'
strategy:
maxParallel: 3
matrix:
Release_UWP:
BuildPlatform: UWP
Release_Android:
BuildPlatform: Android
Release_Wasm:
BuildPlatform: Wasm
steps:
- task: gittools.gitversion.gitversion-task.GitVersion@4
- task: NuGetToolInstaller@0
inputs:
versionSpec: 6.1.0
- task: DownloadSecureFile@1
condition: eq(variables['BuildPlatform'], 'Android')
name: Keystore
inputs:
secureFile: nventive.jks
- task: NuGetCommand@2
inputs:
command: restore
restoreSolution: src/Uno.AzureDevOps.sln
feedsToUse: select
- powershell: ((Get-Content src\Uno.AzureDevOps\Uno.AzureDevOps.Shared\Client\ClientConstants.cs -Raw) -Replace '--production-secret--','$(ProductionSecret)' -Replace '--staging-secret--','$(StagingSecret)').Trim() | Set-Content -Path src\Uno.AzureDevOps\Uno.AzureDevOps.Shared\Client\ClientConstants.cs -Encoding UTF8
displayName: Set client secrets
- powershell: ((Get-Content src\Uno.AzureDevOps\Uno.AzureDevOps.Shared\Client\ClientConstants.cs -Raw) -Replace '--appcenter-secret-android--','$(AppCenterSecretAndroid)').Trim() | Set-Content -Path src\Uno.AzureDevOps\Uno.AzureDevOps.Shared\Client\ClientConstants.cs -Encoding UTF8
displayName: Set AppCenter secret
- task: MSBuild@1
inputs:
solution: src/Uno.AzureDevOps.sln
configuration: Release
platform: $(BuildPlatform)
restoreNugetPackages: false
msbuildArguments: /p:AndroidSigningKeyStore=$(Keystore.secureFilePath) /p:AndroidSigningKeyAlias=$(AndroidSigningKeyAlias) /p:AndroidSigningKeyPass=$(AndroidSigningKeyPass) /p:AndroidSigningStorePass=$(AndroidSigningStorePass)
- task: PublishBuildArtifacts@1
inputs:
ArtifactName: $(BuildPlatform)
PathtoPublish: $(UnoPackageOutputPath)
publishLocation: Container
- job: linux
container: unoplatform/wasm-build:2.2
pool:
vmImage: 'ubuntu-18.04'
variables:
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
SkipUnknownFrameworks: True
steps:
- checkout: self
clean: true
- bash: |
cd /emsdk
sudo ./emsdk activate sdk-1.38.31-64bit
sudo chmod -R 777 /emsdk
displayName: 'Setup Emscripten'
- task: GitVersion@4
inputs:
updateAssemblyInfo: false
- bash: |
sed -i 's/--production-secret--/$(ProductionSecret)/g' ClientConstants.cs
sed -i 's/--staging-secret--/$(StagingSecret)/g' ClientConstants.cs
sed -i 's/--appcenter-secret-android--/$(AppCenterSecretAndroid)/g' ClientConstants.cs
workingDirectory: $(build.sourcesdirectory)/src/Uno.AzureDevOps/Uno.AzureDevOps.Shared/Client/
- script: |
source /emsdk/emsdk_env.sh
cd $(build.sourcesdirectory)
msbuild /r /p:Configuration=Release $(build.sourcesdirectory)/src/Uno.AzureDevOps/Uno.AzureDevOps.Wasm/Uno.AzureDevOps.Wasm.csproj
env:
GITVERSION_FullSemVer: $(GITVERSION_FullSemVer)
displayName: 'Build Uado'
- task: CopyFiles@2
displayName: 'Publish Wasm Binaries'
inputs:
SourceFolder: $(build.sourcesdirectory)/src/Uno.AzureDevOps/Uno.AzureDevOps.Wasm/bin/Release/netstandard2.0/dist
Contents: '**/*.*'
TargetFolder: $(build.artifactstagingdirectory)
CleanTargetFolder: false
OverWrite: false
flattenFolders: false
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: Uno-AzureDevOps-wasm
ArtifactType: Container