2020-04-22 08:12:21 +08:00
|
|
|
# Copyright (c) Microsoft Corporation.
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
#
|
|
|
|
variables:
|
2020-12-23 06:52:58 +08:00
|
|
|
windows-pool: 'PrWin-2020-12-17'
|
|
|
|
linux-pool: 'PrLin-2020-12-16'
|
2020-09-30 07:49:49 +08:00
|
|
|
osx-pool: 'PrOsx-2020-09-28'
|
2020-06-12 02:13:09 +08:00
|
|
|
|
2020-07-08 05:09:33 +08:00
|
|
|
stages:
|
2020-12-17 05:14:35 +08:00
|
|
|
- stage: FormatChecks
|
|
|
|
displayName: 'Formatting and Documentation Checks'
|
2020-07-08 05:09:33 +08:00
|
|
|
pool: $(windows-pool)
|
|
|
|
jobs:
|
|
|
|
- job:
|
2020-07-10 03:32:31 +08:00
|
|
|
workspace:
|
|
|
|
clean: resources
|
2020-12-17 05:14:35 +08:00
|
|
|
variables:
|
|
|
|
- name: VCPKG_DOWNLOADS
|
|
|
|
value: D:\downloads
|
|
|
|
- name: DiffFile
|
|
|
|
value: $(Build.ArtifactStagingDirectory)\format.diff
|
2020-07-08 05:09:33 +08:00
|
|
|
steps:
|
|
|
|
- task: Powershell@2
|
2020-12-17 05:14:35 +08:00
|
|
|
displayName: 'Format C++'
|
2020-07-08 05:09:33 +08:00
|
|
|
inputs:
|
2020-12-17 05:14:35 +08:00
|
|
|
filePath: 'scripts/azure-pipelines/Format-CxxCode.ps1'
|
2020-07-08 05:09:33 +08:00
|
|
|
arguments: '-Root .'
|
2020-08-28 03:27:39 +08:00
|
|
|
pwsh: true
|
2020-07-08 05:09:33 +08:00
|
|
|
- task: Powershell@2
|
2020-12-17 05:14:35 +08:00
|
|
|
displayName: 'Generate Documentation'
|
2020-07-08 05:09:33 +08:00
|
|
|
inputs:
|
2020-12-17 05:14:35 +08:00
|
|
|
filePath: 'docs/regenerate.ps1'
|
|
|
|
arguments: '-VcpkgRoot . -WarningAction Stop'
|
2020-08-28 03:27:39 +08:00
|
|
|
pwsh: true
|
2020-12-17 05:14:35 +08:00
|
|
|
- script: .\bootstrap-vcpkg.bat
|
|
|
|
displayName: 'Build vcpkg'
|
|
|
|
- script: '.\vcpkg format-manifest --all'
|
|
|
|
displayName: 'Format Manifests'
|
2020-12-02 05:37:26 +08:00
|
|
|
- task: Powershell@2
|
2020-12-17 05:14:35 +08:00
|
|
|
displayName: 'Create Diff'
|
2020-12-02 05:37:26 +08:00
|
|
|
inputs:
|
2020-12-17 05:14:35 +08:00
|
|
|
filePath: scripts/azure-pipelines/Create-FormatDiff.ps1
|
|
|
|
arguments: '-DiffFile $(DiffFile)'
|
2020-12-02 05:37:26 +08:00
|
|
|
pwsh: true
|
2020-12-17 05:14:35 +08:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
condition: failed()
|
|
|
|
displayName: 'Publish C++ Diff'
|
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(DiffFile)'
|
|
|
|
ArtifactName: 'format.diff'
|
|
|
|
- stage: RunPrTests
|
|
|
|
displayName: 'Run PR Tests:'
|
|
|
|
dependsOn: FormatChecks
|
2020-07-08 05:09:33 +08:00
|
|
|
jobs:
|
2020-06-26 13:19:17 +08:00
|
|
|
- template: windows/azure-pipelines.yml
|
|
|
|
parameters:
|
|
|
|
triplet: x86-windows
|
|
|
|
jobName: x86_windows
|
|
|
|
poolName: $(windows-pool)
|
|
|
|
|
|
|
|
- template: windows/azure-pipelines.yml
|
|
|
|
parameters:
|
|
|
|
triplet: x64-windows
|
|
|
|
jobName: x64_windows
|
|
|
|
poolName: $(windows-pool)
|
|
|
|
|
|
|
|
- template: windows/azure-pipelines.yml
|
|
|
|
parameters:
|
|
|
|
triplet: x64-windows-static
|
|
|
|
jobName: x64_windows_static
|
|
|
|
poolName: $(windows-pool)
|
|
|
|
|
2021-01-09 03:55:31 +08:00
|
|
|
- template: windows/azure-pipelines.yml
|
|
|
|
parameters:
|
|
|
|
triplet: x64-windows-static-md
|
|
|
|
jobName: x64_windows_static_md
|
|
|
|
poolName: $(windows-pool)
|
|
|
|
|
2020-06-26 13:19:17 +08:00
|
|
|
- template: windows/azure-pipelines.yml
|
|
|
|
parameters:
|
|
|
|
triplet: x64-uwp
|
|
|
|
jobName: x64_uwp
|
|
|
|
poolName: $(windows-pool)
|
|
|
|
|
|
|
|
- template: windows/azure-pipelines.yml
|
|
|
|
parameters:
|
|
|
|
triplet: arm64-windows
|
|
|
|
jobName: arm64_windows
|
|
|
|
poolName: $(windows-pool)
|
|
|
|
|
|
|
|
- template: windows/azure-pipelines.yml
|
|
|
|
parameters:
|
|
|
|
triplet: arm-uwp
|
|
|
|
jobName: arm_uwp
|
|
|
|
poolName: $(windows-pool)
|
|
|
|
|
|
|
|
- template: osx/azure-pipelines.yml
|
2020-09-25 06:15:06 +08:00
|
|
|
parameters:
|
|
|
|
poolName: $(osx-pool)
|
2020-06-26 13:19:17 +08:00
|
|
|
|
|
|
|
- template: linux/azure-pipelines.yml
|
|
|
|
parameters:
|
|
|
|
poolName: $(linux-pool)
|