STL/azure-pipelines.yml

95 строки
3.1 KiB
YAML

# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Build STL targeting x86, x64, arm, arm64
variables:
tmpDir: 'D:\Temp'
buildOutputLocation: 'D:\build'
pool: 'StlBuild-2022-04-12-T1624'
stages:
- stage: Code_Format
displayName: 'Code Format'
jobs:
- job: Code_Format_Validation
timeoutInMinutes: 90
displayName: 'Validation'
variables:
- name: DiffFile
value: '$(Build.ArtifactStagingDirectory)/format.diff'
steps:
- script: |
if exist "$(tmpDir)" (
rmdir /S /Q $(tmpDir)
)
mkdir $(tmpDir)
displayName: 'Setup TMP Directory'
- checkout: self
clean: true
submodules: false
- script: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
-host_arch=amd64 -arch=amd64 -no_logo
cmake -G Ninja -S $(Build.SourcesDirectory)/tools/format -B $(tmpDir)/format-build
cmake --build $(tmpDir)/format-build
displayName: 'clang-format'
timeoutInMinutes: 5
condition: succeededOrFailed()
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
- script: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Preview\Common7\Tools\VsDevCmd.bat" ^
-host_arch=amd64 -arch=amd64 -no_logo
cmake -G Ninja -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release ^
-S $(Build.SourcesDirectory)/tools/validate -B $(tmpDir)/validate-build
cmake --build $(tmpDir)/validate-build
"$(tmpDir)\validate-build\validate.exe"
displayName: 'Validate Files'
timeoutInMinutes: 5
condition: succeededOrFailed()
env: { TMP: $(tmpDir), TEMP: $(tmpDir) }
- task: Powershell@2
displayName: 'Create Diff'
inputs:
filePath: azure-devops/create-prdiff.ps1
arguments: '-DiffFile $(DiffFile)'
pwsh: false
condition: succeededOrFailed()
- stage: Build_And_Test_x64
dependsOn: Code_Format
displayName: 'Build and Test'
jobs:
- template: azure-devops/native-build-test.yml
parameters:
targetPlatform: x64
vsDevCmdArch: amd64
- stage: Build_And_Test_x86
dependsOn: Build_And_Test_x64
displayName: 'Build and Test'
jobs:
- template: azure-devops/native-build-test.yml
parameters:
targetPlatform: x86
vsDevCmdArch: x86
- stage: Build_ARM
dependsOn: Build_And_Test_x64
displayName: 'Build'
jobs:
- template: azure-devops/cross-build.yml
parameters:
targetPlatform: arm
vsDevCmdArch: arm
- stage: Build_ARM64
dependsOn: Build_And_Test_x64
displayName: 'Build'
jobs:
- template: azure-devops/cross-build.yml
parameters:
targetPlatform: arm64
vsDevCmdArch: arm64