snmalloc/azure-pipelines.yml

348 строки
8.4 KiB
YAML

trigger:
- master
pr:
- master
jobs:
- job:
displayName: Linux
pool:
vmImage: 'ubuntu-18.04'
strategy:
matrix:
64-bit Clang-7 Debug:
CC: clang-7
CXX: clang++-7
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Clang-7 Release:
CC: clang-7
CXX: clang++-7
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Clang-8 Debug:
CC: clang-8
CXX: clang++-8
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Clang-8 Release:
CC: clang-8
CXX: clang++-8
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Clang-9 Debug:
CC: clang-9
CXX: clang++-9
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Clang-9 Release:
CC: clang-9
CXX: clang++-9
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit GCC-8 Debug:
CC: gcc-8
CXX: g++-8
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit GCC-8 Release:
CC: gcc-8
CXX: g++-8
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Self Host:
CC: clang-7
CXX: clang++-7
BuildType: Debug
SelfHost: true
CMakeArgs: ''
Image: snmallocciteam/build_linux_x64:latest
64-bit Cache Friendly:
CC: clang-7
CXX: clang++-7
BuildType: Debug
SelfHost: false
CMakeArgs: '-DCACHE_FRIENDLY_OFFSET=64'
Image: snmallocciteam/build_linux_x64:latest
32-bit Clang-9 Debug:
CC: clang-9
CXX: clang++-9
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x86:latest
32-bit Clang-9 Release:
CC: clang-9
CXX: clang++-9
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_x86:latest
container: $[ variables['Image'] ]
steps:
- script: |
set -eo pipefail
ci/scripts/build.sh
env:
CC: $(CC)
CXX: $(CXX)
BUILD_TYPE: $(BuildType)
CMAKE_ARGS: $(CMakeArgs)
displayName: 'Build'
- script: |
set -eo pipefail
ci/scripts/test.sh
env:
SELF_HOST: $(SelfHost)
BUILD_TYPE: $(BuildType)
displayName: 'Test'
- job:
displayName: 'ARM Linux'
pool:
vmImage: 'ubuntu-18.04'
strategy:
matrix:
64-bit Clang-9 Debug:
CC: clang-9
CXX: clang++-9
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_arm64:latest
64-bit Clang-9 Release:
CC: clang-9
CXX: clang++-9
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_arm64:latest
32-bit Clang-9 Debug:
CC: clang-9
CXX: clang++-9
BuildType: Debug
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_armhf:latest
32-bit Clang-9 Release:
CC: clang-9
CXX: clang++-9
BuildType: Release
SelfHost: false
CMakeArgs: ''
Image: snmallocciteam/build_linux_armhf:latest
steps:
- script: |
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
displayName: 'Enable QEmu'
- script: |
sudo docker run -v $PWD:/src \
-e CC=$(CC) \
-e CXX=$(CXX) \
-e BUILD_TYPE=$(BuildType) \
-e CMAKE_ARGS=$(CMakeArgs) \
$(Image) \
ci/scripts/build.sh
displayName: 'Build'
- script: |
sudo docker run -v $PWD:/src \
-e BUILD_TYPE=$(BuildType) \
-e SELF_HOST=$(SelfHost) \
$(Image) \
ci/scripts/test.sh
displayName: 'Test'
- job:
displayName: Windows
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
64-bit Debug:
BuildType: Debug
CMakeArgs: '-G"Visual Studio 15 2017 Win64"'
JFlag: -j 4
64-bit Release:
BuildType: Release
CMakeArgs: '-G"Visual Studio 15 2017 Win64"'
JFlag: '-j 2'
64-bit Release Windows8Compat:
BuildType: Release
CMakeArgs: '-G"Visual Studio 15 2017 Win64" -DWIN8COMPAT=TRUE'
JFlag: '-j 2'
32-bit Debug:
BuildType: Debug
CMakeArgs: '-G"Visual Studio 15 2017"'
JFlag: '-j 4'
32-bit Release:
BuildType: Release
CMakeArgs: '-G"Visual Studio 15 2017"'
JFlag: '-j 2'
steps:
- script: |
bash -c "cat /proc/cpuinfo"
bash -c "cat /proc/meminfo"
displayName: 'Machine stats'
- task: CMake@1
displayName: 'CMake .. $(CMakeArgs) -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On'
inputs:
cmakeArgs: '.. $(CMakeArgs) -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On'
- task: MSBuild@1
displayName: 'Build solution build/snmalloc.sln'
inputs:
solution: build/snmalloc.sln
msbuildArguments: '/m /p:Configuration=$(BuildType)'
- script: 'ctest $(JFlag) --interactive-debug-mode 0 --output-on-failure -C $(BuildType)'
workingDirectory: build
displayName: 'Run Ctest'
- job:
displayName: WinClang
pool:
vmImage: 'windows-2019'
strategy:
matrix:
64-bit Debug Clang:
BuildType: Debug
CMakeArgs: '-GNinja -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_RC_COMPILER="C:/Program Files/LLVM/bin/llvm-rc"'
JFlag: -j 4
64-bit Release Clang:
BuildType: Release
CMakeArgs: '-GNinja -DCMAKE_C_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_RC_COMPILER="C:/Program Files/LLVM/bin/llvm-rc"'
JFlag: -j 4
steps:
- script: |
bash -c "cat /proc/cpuinfo"
bash -c "cat /proc/meminfo"
displayName: 'Machine stats'
- script: |
choco install --accept-license -y Ninja llvm
displayName: 'Dependencies'
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
mkdir build
cd build
cmake .. $(CMakeArgs) -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On
cmake --build . --config ${BuildType}
displayName: 'build'
- script: |
set PATH=%PATH%;"C:\Program Files\LLVM\bin\"
func-statistics-1.exe
ctest $(JFlag) --interactive-debug-mode 0 --output-on-failure -C $(BuildType)
workingDirectory: build
displayName: 'Run Ctest'
- job:
displayName: macOS
pool:
vmImage: 'macOS-10.15'
strategy:
matrix:
Debug:
BuildType: Debug
Release:
BuildType: Release
steps:
- task: CMake@1
displayName: 'CMake .. -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On'
inputs:
cmakeArgs: '.. -DCMAKE_BUILD_TYPE=$(BuildType) -DSNMALLOC_CI_BUILD=On -DSNMALLOC_RUST_SUPPORT=On'
- script: |
set -eo pipefail
make -j 4
workingDirectory: build
failOnStderr: true
displayName: 'Compile'
- script: |
set -eo pipefail
ctest -j 4 --output-on-failure -C $(BuildType)
workingDirectory: build
failOnStderr: true
displayName: 'Test'
- job:
displayName: Format
pool:
vmImage: 'ubuntu-18.04'
container: snmallocciteam/build_linux_x64:latest
steps:
- script: |
mkdir build
cd build
cmake -GNinja ..
env:
CC: /usr/bin/gcc-8
CXX: /usr/bin/g++-8
- script: |
set -eo pipefail
ninja clangformat
git diff --exit-code
workingDirectory: build
failOnStderr: true
displayName: 'Clang-Format'
- script: |
set -eo pipefail
clang-tidy-9 src/override/malloc.cc -header-filter="`pwd`/*" -warnings-as-errors='*' -export-fixes=tidy.fail -- -std=c++17 -mcx16
displayName: 'Clang-Tidy'