2020-05-11 07:48:53 +03:00
|
|
|
name: $(BuildID)_$(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
|
2021-01-20 23:39:11 +03:00
|
|
|
|
2020-05-11 07:48:53 +03:00
|
|
|
resources:
|
|
|
|
- repo: self
|
|
|
|
clean: true
|
2021-01-20 23:39:11 +03:00
|
|
|
|
2020-05-11 07:48:53 +03:00
|
|
|
jobs:
|
|
|
|
- job: windowsx64debug
|
|
|
|
displayName: 'Build Windows x64 Debug'
|
|
|
|
pool:
|
2020-09-29 08:32:18 +03:00
|
|
|
name: Azure-MessagingStore
|
2020-05-11 07:48:53 +03:00
|
|
|
demands:
|
2021-01-20 23:39:11 +03:00
|
|
|
- Build
|
2020-05-11 07:48:53 +03:00
|
|
|
- Cmd
|
|
|
|
- msbuild
|
2021-01-20 23:39:11 +03:00
|
|
|
- cmake
|
2020-05-11 07:48:53 +03:00
|
|
|
- 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:
|
2020-09-29 08:32:18 +03:00
|
|
|
filename: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"'
|
2020-05-11 07:48:53 +03:00
|
|
|
modifyEnvironment: true
|
|
|
|
|
|
|
|
- task: CMake@1
|
2020-10-06 02:04:10 +03:00
|
|
|
displayName: 'CMake .. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=OFF -G "Visual Studio 16 2019" -A x64'
|
2020-05-11 07:48:53 +03:00
|
|
|
inputs:
|
|
|
|
workingDirectory: 'build_x64'
|
2020-10-06 02:04:10 +03:00
|
|
|
cmakeArgs: '.. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=OFF -G "Visual Studio 16 2019" -A x64'
|
2020-05-11 07:48:53 +03:00
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build solution build_x64\*.sln'
|
|
|
|
inputs:
|
|
|
|
solution: 'build_x64\*.sln'
|
2020-05-11 10:39:10 +03:00
|
|
|
msbuildArgs: '/t:restore /t:build /p:ForceImportBeforeCppTargets=$(Build.SourcesDirectory)/vld.props'
|
2020-05-11 07:48:53 +03:00
|
|
|
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
|
2020-09-29 08:32:18 +03:00
|
|
|
displayName: 'Build Windows x64 RelWithDebInfo'
|
2020-05-11 07:48:53 +03:00
|
|
|
pool:
|
2020-09-29 08:32:18 +03:00
|
|
|
name: Azure-MessagingStore
|
2020-05-11 07:48:53 +03:00
|
|
|
demands:
|
2021-01-20 23:39:11 +03:00
|
|
|
- Build
|
2020-05-11 07:48:53 +03:00
|
|
|
- Cmd
|
|
|
|
- msbuild
|
2021-01-20 23:39:11 +03:00
|
|
|
- cmake
|
2020-05-11 07:48:53 +03:00
|
|
|
- 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:
|
2020-09-29 08:32:18 +03:00
|
|
|
filename: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"'
|
2020-05-11 07:48:53 +03:00
|
|
|
modifyEnvironment: true
|
|
|
|
|
|
|
|
- task: CMake@1
|
2020-09-29 08:32:18 +03:00
|
|
|
displayName: 'CMake .. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=ON -G "Visual Studio 16 2019" -A x64'
|
2020-05-11 07:48:53 +03:00
|
|
|
inputs:
|
|
|
|
workingDirectory: 'build_x64'
|
2020-09-29 08:32:18 +03:00
|
|
|
cmakeArgs: '.. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=ON -G "Visual Studio 16 2019" -A x64'
|
2020-05-11 07:48:53 +03:00
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build solution build_x64\*.sln'
|
|
|
|
inputs:
|
|
|
|
solution: 'build_x64\*.sln'
|
2020-09-29 08:32:18 +03:00
|
|
|
platform: x64
|
2020-06-13 03:07:19 +03:00
|
|
|
msbuildArgs: '/t:restore /t:build'
|
2020-05-11 07:48:53 +03:00
|
|
|
configuration: RelWithDebInfo
|
|
|
|
maximumCpuCount: true
|
|
|
|
|
2021-01-20 23:24:54 +03:00
|
|
|
- task: CmdLine@1
|
|
|
|
displayName: 'Run ctest'
|
2020-05-11 07:48:53 +03:00
|
|
|
inputs:
|
2021-01-20 23:24:54 +03:00
|
|
|
filename: ctest
|
|
|
|
arguments: '-C "RelWithDebInfo" -V --output-on-failure'
|
|
|
|
workingFolder: 'build_x64'
|
2020-05-11 07:48:53 +03:00
|
|
|
|
|
|
|
- job: windowsx86debug
|
|
|
|
displayName: 'Build Windows x86 Debug'
|
|
|
|
pool:
|
2020-09-29 08:32:18 +03:00
|
|
|
name: Azure-MessagingStore
|
2021-01-20 23:24:54 +03:00
|
|
|
demands:
|
2021-01-20 23:39:11 +03:00
|
|
|
- Build
|
2020-05-11 07:48:53 +03:00
|
|
|
- Cmd
|
|
|
|
- msbuild
|
2021-01-20 23:39:11 +03:00
|
|
|
- cmake
|
2020-05-11 07:48:53 +03:00
|
|
|
- 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:
|
2020-09-29 08:32:18 +03:00
|
|
|
filename: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"'
|
2020-05-11 07:48:53 +03:00
|
|
|
modifyEnvironment: true
|
|
|
|
|
|
|
|
- task: CMake@1
|
|
|
|
displayName: CMake
|
|
|
|
inputs:
|
|
|
|
workingDirectory: 'build_x86'
|
2020-09-29 08:32:18 +03:00
|
|
|
cmakeArgs: '.. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Drun_e2e_tests:bool=ON -G "Visual Studio 16 2019" -A Win32'
|
2020-05-11 07:48:53 +03:00
|
|
|
|
|
|
|
- task: VSBuild@1
|
|
|
|
displayName: 'Build solution build_x86\*.sln'
|
|
|
|
inputs:
|
|
|
|
solution: 'build_x86\*.sln'
|
|
|
|
platform: Win32
|
2020-06-13 03:07:19 +03:00
|
|
|
msbuildArgs: '/t:restore /t:build'
|
2020-05-11 07:48:53 +03:00
|
|
|
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
|
2020-09-29 08:32:18 +03:00
|
|
|
displayName: 'Build Linux Ubuntu 18.04'
|
2020-05-11 07:48:53 +03:00
|
|
|
pool:
|
2020-09-29 08:32:18 +03:00
|
|
|
name: Azure-MessagingStore
|
|
|
|
demands:
|
|
|
|
- linux
|
2020-05-11 07:48:53 +03:00
|
|
|
|
|
|
|
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)'
|
|
|
|
|
2021-01-20 23:39:11 +03:00
|
|
|
- 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" }
|
|
|
|
|
2020-05-11 07:48:53 +03:00
|
|
|
- job: Traceability
|
|
|
|
pool:
|
2020-09-29 08:32:18 +03:00
|
|
|
name: Azure-MessagingStore
|
2020-05-11 07:48:53 +03:00
|
|
|
demands:
|
2021-01-20 23:39:11 +03:00
|
|
|
- Build
|
2020-05-11 07:48:53 +03:00
|
|
|
- Cmd
|
|
|
|
- msbuild
|
2021-01-20 23:39:11 +03:00
|
|
|
- cmake
|
2020-05-11 07:48:53 +03:00
|
|
|
- visualstudio
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: BatchScript@1
|
|
|
|
displayName: 'Git submodule update'
|
|
|
|
inputs:
|
|
|
|
filename: 'C:\Program Files\Git\bin\git.exe'
|
2020-05-11 20:27:46 +03:00
|
|
|
arguments: 'submodule update --init --force'
|
2020-05-11 07:48:53 +03:00
|
|
|
|
|
|
|
- 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:
|
2020-09-29 08:32:18 +03:00
|
|
|
filename: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"'
|
2020-05-11 07:48:53 +03:00
|
|
|
modifyEnvironment: true
|
|
|
|
|
|
|
|
- task: NuGetCommand@2
|
|
|
|
displayName: 'NuGet restore'
|
|
|
|
inputs:
|
2020-10-30 19:05:49 +03:00
|
|
|
restoreSolution: deps/c-build-tools/traceabilitytool/traceabilitytool.sln
|
2020-05-11 07:48:53 +03:00
|
|
|
|
2020-05-11 08:30:26 +03:00
|
|
|
- task: CMake@1
|
|
|
|
displayName: CMake
|
|
|
|
inputs:
|
|
|
|
workingDirectory: 'build'
|
2020-05-11 08:33:28 +03:00
|
|
|
cmakeArgs: '.. -Ax64'
|
2020-05-11 08:30:26 +03:00
|
|
|
|
2020-05-11 07:48:53 +03:00
|
|
|
- task: VSBuild@1
|
2020-05-11 08:30:26 +03:00
|
|
|
displayName: 'Build traceabilitytool only'
|
2020-05-11 07:48:53 +03:00
|
|
|
inputs:
|
2020-10-30 19:57:24 +03:00
|
|
|
solution: 'build\c_logging.sln'
|
2020-05-11 08:30:26 +03:00
|
|
|
vsVersion: 16.0
|
|
|
|
platform: x64
|
|
|
|
configuration: RelWithDebInfo
|
|
|
|
msbuildArgs: '/t:restore /t:build /t:traceabilitytool'
|
|
|
|
clean: true
|
2020-05-11 07:48:53 +03:00
|
|
|
maximumCpuCount: true
|
2020-05-11 08:30:26 +03:00
|
|
|
|
2020-05-11 07:48:53 +03:00
|
|
|
- task: BatchScript@1
|
|
|
|
displayName: 'Run traceability tool'
|
|
|
|
inputs:
|
2020-10-30 19:05:49 +03:00
|
|
|
filename: 'build/deps/c-build-tools/traceabilitytool/RelWithDebInfo/traceabilitytool.exe'
|
2020-05-11 07:48:53 +03:00
|
|
|
arguments: '-i $(Build.SourcesDirectory) -buildcheck -e deps'
|
|
|
|
modifyEnvironment: false
|
|
|
|
workingFolder: '$(Build.SourcesDirectory)'
|
2021-01-22 21:44:29 +03:00
|
|
|
|
|
|
|
- job: includecheck_linux
|
|
|
|
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 with iwyu'
|
|
|
|
inputs:
|
|
|
|
targetType: filePath
|
|
|
|
filePath: './build/linux/build_linux_iwyu.sh'
|
|
|
|
arguments: '$(Build.Repository.LocalPath)'
|
|
|
|
workingDirectory: '$(Build.Repository.LocalPath)'
|