зеркало из https://github.com/Azure/c-logging.git
322 строки
9.0 KiB
YAML
322 строки
9.0 KiB
YAML
name: $(BuildID)_$(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
|
|
|
|
resources:
|
|
- repo: self
|
|
clean: true
|
|
|
|
jobs:
|
|
- job: windowsx64debug
|
|
displayName: 'Build Windows x64 Debug'
|
|
pool:
|
|
name: Azure-MessagingStore
|
|
demands:
|
|
- Build
|
|
- Cmd
|
|
- msbuild
|
|
- cmake
|
|
- visualstudio
|
|
|
|
steps:
|
|
- task: BatchScript@1
|
|
displayName: 'Git submodule update'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'submodule update --init --force'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Git submodule clean'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'submodule foreach --recursive "git clean -xdff"'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Git clean'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'clean -xdff'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Setup VS Vars'
|
|
inputs:
|
|
filename: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"'
|
|
modifyEnvironment: true
|
|
|
|
- task: CMake@1
|
|
displayName: 'CMake .. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=OFF -G "Visual Studio 16 2019" -A x64'
|
|
inputs:
|
|
workingDirectory: 'build_x64'
|
|
cmakeArgs: '.. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=OFF -G "Visual Studio 16 2019" -A x64'
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build solution build_x64\*.sln'
|
|
inputs:
|
|
solution: 'build_x64\*.sln'
|
|
msbuildArgs: '/t:restore /t:build /p:ForceImportBeforeCppTargets=$(Build.SourcesDirectory)/vld.props'
|
|
platform: x64
|
|
configuration: Debug
|
|
maximumCpuCount: true
|
|
|
|
- task: CmdLine@1
|
|
displayName: 'Run ctest'
|
|
inputs:
|
|
filename: ctest
|
|
arguments: '-C "Debug" -V --output-on-failure'
|
|
workingFolder: 'build_x64'
|
|
|
|
- job: windowsx64relwithdebinfo
|
|
displayName: 'Build Windows x64 RelWithDebInfo'
|
|
pool:
|
|
name: Azure-MessagingStore
|
|
demands:
|
|
- Build
|
|
- Cmd
|
|
- msbuild
|
|
- cmake
|
|
- visualstudio
|
|
- vstest
|
|
|
|
steps:
|
|
- task: BatchScript@1
|
|
displayName: 'Git submodule update'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'submodule update --init --force'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Git submodule clean'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'submodule foreach --recursive "git clean -xdff"'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Git clean'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'clean -xdff'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Setup VS Vars'
|
|
inputs:
|
|
filename: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"'
|
|
modifyEnvironment: true
|
|
|
|
- task: CMake@1
|
|
displayName: 'CMake .. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=ON -G "Visual Studio 16 2019" -A x64'
|
|
inputs:
|
|
workingDirectory: 'build_x64'
|
|
cmakeArgs: '.. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=ON -G "Visual Studio 16 2019" -A x64'
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build solution build_x64\*.sln'
|
|
inputs:
|
|
solution: 'build_x64\*.sln'
|
|
platform: x64
|
|
msbuildArgs: '/t:restore /t:build'
|
|
configuration: RelWithDebInfo
|
|
maximumCpuCount: true
|
|
|
|
- task: CmdLine@1
|
|
displayName: 'Run ctest'
|
|
inputs:
|
|
filename: ctest
|
|
arguments: '-C "RelWithDebInfo" -V --output-on-failure'
|
|
workingFolder: 'build_x64'
|
|
|
|
- job: windowsx86debug
|
|
displayName: 'Build Windows x86 Debug'
|
|
pool:
|
|
name: Azure-MessagingStore
|
|
demands:
|
|
- Build
|
|
- Cmd
|
|
- msbuild
|
|
- cmake
|
|
- visualstudio
|
|
|
|
steps:
|
|
- task: BatchScript@1
|
|
displayName: 'Git submodule update'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'submodule update --init --force'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Git submodule clean'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'submodule foreach --recursive "git clean -xdff"'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Git clean'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'clean -xdff'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Setup VS Vars'
|
|
inputs:
|
|
filename: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"'
|
|
modifyEnvironment: true
|
|
|
|
- task: CMake@1
|
|
displayName: CMake
|
|
inputs:
|
|
workingDirectory: 'build_x86'
|
|
cmakeArgs: '.. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Drun_e2e_tests:bool=ON -G "Visual Studio 16 2019" -A Win32'
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build solution build_x86\*.sln'
|
|
inputs:
|
|
solution: 'build_x86\*.sln'
|
|
platform: Win32
|
|
msbuildArgs: '/t:restore /t:build'
|
|
configuration: Debug
|
|
maximumCpuCount: true
|
|
|
|
- task: CmdLine@1
|
|
displayName: 'Run ctest'
|
|
inputs:
|
|
filename: ctest
|
|
arguments: '-C "Debug" -V --output-on-failure'
|
|
workingFolder: 'build_x86'
|
|
|
|
- job: linuxubuntu
|
|
displayName: 'Build Linux Ubuntu 18.04'
|
|
pool:
|
|
name: Azure-MessagingStore
|
|
demands:
|
|
- linux
|
|
|
|
steps:
|
|
- bash: |
|
|
pushd $(Build.Repository.LocalPath)
|
|
git submodule update --init
|
|
git submodule foreach --recursive "git clean -xdff"
|
|
git clean -xdff
|
|
popd
|
|
workingDirectory: '$(Build.Repository.LocalPath)'
|
|
displayName: 'git submodule update and clean'
|
|
|
|
- task: Bash@3
|
|
displayName: 'Build and run tests'
|
|
inputs:
|
|
targetType: filePath
|
|
filePath: './build/linux/build_linux.sh'
|
|
arguments: '$(Build.Repository.LocalPath)'
|
|
workingDirectory: '$(Build.Repository.LocalPath)'
|
|
|
|
- job: includecheck
|
|
pool:
|
|
name: Azure-MessagingStore
|
|
demands:
|
|
- Build
|
|
- Cmd
|
|
- msbuild
|
|
- cmake
|
|
- visualstudio
|
|
|
|
steps:
|
|
- task: BatchScript@1
|
|
displayName: 'Git submodule update'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'submodule update --init --force'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Git submodule clean'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'submodule foreach --recursive "git clean -xdff"'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Git clean'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'clean -xdff'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Setup VS Vars'
|
|
inputs:
|
|
filename: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"'
|
|
modifyEnvironment: true
|
|
|
|
- task: CMake@1
|
|
displayName: 'Running cmake'
|
|
inputs:
|
|
workingDirectory: 'build_ninja'
|
|
cmakeArgs: '.. -GNinja -DCMAKE_C_INCLUDE_WHAT_YOU_USE:UNINITIALIZED=include-what-you-use;-Xiwyu;--mapping_file=../deps/c-build-tools/iwyu/rules.imp;--driver-mode=cl -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE:UNINITIALIZED=include-what-you-use;-Xiwyu;--mapping_file=../deps/c-build-tools/iwyu/rules.imp;--driver-mode=cl -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Drun_perf_tests:bool=ON'
|
|
|
|
- task: PowerShell@2
|
|
displayName: 'Build solution and check includes'
|
|
inputs:
|
|
workingDirectory: 'build_ninja'
|
|
targetType: 'inline'
|
|
script: |
|
|
cmake --build . | tee build.log
|
|
if ((Select-String -Path "./build.log" -Pattern "Warning:") -ne $null) { throw "include check failed" }
|
|
|
|
- job: Traceability
|
|
pool:
|
|
name: Azure-MessagingStore
|
|
demands:
|
|
- Build
|
|
- Cmd
|
|
- msbuild
|
|
- cmake
|
|
- visualstudio
|
|
|
|
steps:
|
|
- task: BatchScript@1
|
|
displayName: 'Git submodule update'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'submodule update --init --force'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Git submodule clean'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'submodule foreach --recursive "git clean -xdff"'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Git clean'
|
|
inputs:
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
|
arguments: 'clean -xdff'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Setup VS Vars'
|
|
inputs:
|
|
filename: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"'
|
|
modifyEnvironment: true
|
|
|
|
- task: NuGetCommand@2
|
|
displayName: 'NuGet restore'
|
|
inputs:
|
|
restoreSolution: deps/c-build-tools/traceabilitytool/traceabilitytool.sln
|
|
|
|
- task: CMake@1
|
|
displayName: CMake
|
|
inputs:
|
|
workingDirectory: 'build'
|
|
cmakeArgs: '.. -Ax64'
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build traceabilitytool only'
|
|
inputs:
|
|
solution: 'build\c_logging.sln'
|
|
vsVersion: 16.0
|
|
platform: x64
|
|
configuration: RelWithDebInfo
|
|
msbuildArgs: '/t:restore /t:build /t:traceabilitytool'
|
|
clean: true
|
|
maximumCpuCount: true
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Run traceability tool'
|
|
inputs:
|
|
filename: 'build/deps/c-build-tools/traceabilitytool/RelWithDebInfo/traceabilitytool.exe'
|
|
arguments: '-i $(Build.SourcesDirectory) -buildcheck -e deps'
|
|
modifyEnvironment: false
|
|
workingFolder: '$(Build.SourcesDirectory)'
|