зеркало из https://github.com/microsoft/STL.git
40 строки
1.6 KiB
YAML
40 строки
1.6 KiB
YAML
# Copyright (c) Microsoft Corporation.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
# run the `validator` tool, and ensure code is properly clang-formatted
|
|
|
|
jobs:
|
|
- job: Code_Format_Validation
|
|
timeoutInMinutes: 5
|
|
displayName: 'Validation'
|
|
steps:
|
|
- template: checkout-self.yml
|
|
- script: |
|
|
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
|
|
-host_arch=x64 -arch=x64 -no_logo
|
|
cmake -G Ninja -S $(Build.SourcesDirectory)/tools -B $(tmpDir)/format-validate-build
|
|
cmake --build $(tmpDir)/format-validate-build
|
|
displayName: 'Build format and validation'
|
|
timeoutInMinutes: 5
|
|
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
|
|
- script: |
|
|
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
|
|
-host_arch=x64 -arch=x64 -no_logo
|
|
cmake --build $(tmpDir)/format-validate-build --target run-format
|
|
displayName: 'clang-format Files'
|
|
timeoutInMinutes: 5
|
|
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
|
|
- script: |
|
|
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
|
|
-host_arch=x64 -arch=x64 -no_logo
|
|
cmake --build $(tmpDir)/format-validate-build --target run-validate
|
|
displayName: 'Validate Files'
|
|
timeoutInMinutes: 2
|
|
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
|
|
- task: PowerShell@2
|
|
displayName: 'Create Diff'
|
|
inputs:
|
|
filePath: azure-devops/create-prdiff.ps1
|
|
condition: succeededOrFailed()
|
|
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
|