2019-06-03 19:45:14 +03:00
|
|
|
trigger:
|
2019-06-03 21:06:11 +03:00
|
|
|
batch: true
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
|
2019-09-17 19:05:25 +03:00
|
|
|
resources:
|
|
|
|
containers:
|
|
|
|
- container: nv-bionic-wasm
|
|
|
|
image: nventive/wasm-build:1.3
|
|
|
|
|
2019-06-03 21:06:11 +03:00
|
|
|
pr:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
2019-11-01 20:50:28 +03:00
|
|
|
paths:
|
2020-03-09 17:20:23 +03:00
|
|
|
include:
|
|
|
|
- *
|
2019-11-01 20:50:28 +03:00
|
|
|
exclude:
|
2020-03-09 17:20:23 +03:00
|
|
|
- '*.md'
|
2019-06-03 21:06:11 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: Windows
|
|
|
|
|
|
|
|
pool:
|
2019-07-09 00:17:43 +03:00
|
|
|
name: 'Hosted Windows 2019 with VS2019'
|
2019-06-03 21:06:11 +03:00
|
|
|
|
|
|
|
workspace:
|
|
|
|
clean: all
|
|
|
|
|
|
|
|
variables:
|
|
|
|
- name: UnoPackageOutputPath
|
|
|
|
value: $(Build.ArtifactStagingDirectory)
|
2019-07-08 23:09:58 +03:00
|
|
|
- name: ANDROID_NDK_HOME
|
|
|
|
value: C:\Microsoft\AndroidNDK64\android-ndk-r16b
|
|
|
|
- name: ANDROID_NDK_PATH
|
|
|
|
value: C:\Microsoft\AndroidNDK64\android-ndk-r16b
|
2019-07-08 23:10:27 +03:00
|
|
|
- name: AndroidNdkDirectory
|
2019-07-08 23:09:58 +03:00
|
|
|
value: C:\Microsoft\AndroidNDK64\android-ndk-r16b
|
2019-07-09 22:12:48 +03:00
|
|
|
- group: 'UADO Keystore'
|
2019-06-03 21:06:11 +03:00
|
|
|
|
|
|
|
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: 4.9.1
|
|
|
|
|
2019-07-09 22:12:48 +03:00
|
|
|
- task: DownloadSecureFile@1
|
|
|
|
condition: eq(variables['BuildPlatform'], 'Android')
|
|
|
|
name: Keystore
|
|
|
|
inputs:
|
|
|
|
secureFile: nventive.jks
|
|
|
|
|
2019-06-03 21:06:11 +03:00
|
|
|
- task: NuGetCommand@2
|
|
|
|
inputs:
|
|
|
|
command: restore
|
|
|
|
restoreSolution: src/Uno.AzureDevOps.sln
|
|
|
|
feedsToUse: select
|
|
|
|
|
2019-06-17 20:51:49 +03:00
|
|
|
- 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
|
|
|
|
|
2019-07-09 21:25:13 +03:00
|
|
|
- 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
|
|
|
|
|
2019-06-03 21:06:11 +03:00
|
|
|
- task: MSBuild@1
|
|
|
|
inputs:
|
|
|
|
solution: src/Uno.AzureDevOps.sln
|
|
|
|
configuration: Release
|
|
|
|
platform: $(BuildPlatform)
|
|
|
|
restoreNugetPackages: false
|
2019-07-09 22:12:48 +03:00
|
|
|
msbuildArguments: /p:AndroidSigningKeyStore=$(Keystore.secureFilePath) /p:AndroidSigningKeyAlias=$(AndroidSigningKeyAlias) /p:AndroidSigningKeyPass=$(AndroidSigningKeyPass) /p:AndroidSigningStorePass=$(AndroidSigningStorePass)
|
2019-06-03 21:06:11 +03:00
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
ArtifactName: $(BuildPlatform)
|
|
|
|
PathtoPublish: $(UnoPackageOutputPath)
|
2019-07-08 23:09:58 +03:00
|
|
|
publishLocation: Container
|
2019-09-17 19:05:25 +03:00
|
|
|
|
|
|
|
- job: linux
|
|
|
|
container: nv-bionic-wasm
|
|
|
|
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-16.04'
|
|
|
|
|
|
|
|
variables:
|
|
|
|
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
|
|
|
|
|
|
|
|
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
|
2020-03-09 17:20:23 +03:00
|
|
|
ArtifactType: Container
|