CCF/.azure-pipelines-templates/matrix.yml

151 строка
5.1 KiB
YAML

parameters:
target: ["Virtual", "SGX"]
env:
Hosted:
container: virtual
pool:
vmImage: ubuntu-20.04
Virtual:
container: virtual
pool: 1es-dv4-focal
SGX:
container: sgx
pool: 1es-DC16s_v3-focal
SNPCC:
pool: sev-snp-pool
build:
common:
cmake_args: ""
Virtual:
cmake_args: "-DCOMPILE_TARGET=virtual"
SGX:
cmake_args: "-DCOMPILE_TARGET=sgx"
SNPCC:
cmake_args: "-DCOMPILE_TARGET=snp -DLVI_MITIGATIONS=OFF -DLONG_TESTS=OFF"
debug:
cmake_args: "-DCMAKE_BUILD_TYPE=Debug -DLVI_MITIGATIONS=OFF -DVERBOSE_LOGGING=ON"
perf:
cmake_args: '-DBUILD_UNIT_TESTS=OFF -DBUILD_TPCC=ON -DDISTRIBUTE_PERF_TESTS="-n local://localhost -n local://localhost"'
release:
cmake_args: "-DTLS_TEST=ON -DLONG_TESTS=ON -DENABLE_BFT=OFF"
unsafe:
cmake_args: "-DLVI_MITIGATIONS=OFF -DVERBOSE_LOGGING=ON -DENABLE_BFT=OFF -DUNSAFE_VERSION=ON"
test:
Virtual:
ctest_args: '-LE "benchmark|perf|tlstest|vegeta|suite"'
SGX:
ctest_args: '-LE "benchmark|perf|tlstest|vegeta|suite"'
perf:
ctest_args: '-L "benchmark|perf|vegeta"'
release:
ctest_args: '-LE "benchmark|perf"'
virtual_perf:
ctest_args: '-L "perf|vegeta"'
jobs:
# Debug
- ${{ each target in parameters.target }}:
- template: common.yml
parameters:
target: ${{ target }}
env: ${{ parameters.env[target] }}
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.debug.cmake_args }} ${{ parameters.build[target].cmake_args }}"
suffix: "Debug"
artifact_name: "${{ target }}_Debug"
ctest_filter: "${{ parameters.test[target].ctest_args }}"
depends_on: configure
# Performance
- ${{ if eq(parameters.perf_tests, 'run') }}:
- template: common.yml
parameters:
target: SGX
env: ${{ parameters.env.SGX }}
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.perf.cmake_args }} ${{ parameters.build.SGX.cmake_args }}"
suffix: "Perf"
artifact_name: "SGX_Perf"
ctest_filter: "${{ parameters.test.perf.ctest_args }}"
depends_on: configure
- ${{ if eq(parameters.perf_tests, 'run') }}:
- template: common.yml
parameters:
target: Virtual
env: ${{ parameters.env.Virtual }}
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.perf.cmake_args }} ${{ parameters.build.Virtual.cmake_args }}"
suffix: "Perf"
artifact_name: "Virtual_Perf"
ctest_filter: "${{ parameters.test.virtual_perf.ctest_args }}"
depends_on: configure
- ${{ if eq(parameters.perf_tests, 'run') }}:
- template: cimetrics.yml
parameters:
target: Virtual
env: ${{ parameters.env.Virtual }}
suffix: "Perf"
depends_on:
- configure
- SGX_Perf
- Virtual_Perf
# Release
- ${{ if eq(parameters.perf_or_release, 'release') }}:
- template: checks.yml
parameters:
env: ${{ parameters.env.Hosted }}
- template: common.yml
parameters:
target: SGX
env: ${{ parameters.env.SGX }}
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.release.cmake_args }} ${{ parameters.build.SGX.cmake_args }}"
suffix: "Release"
artifact_name: "SGX_Release"
ctest_filter: "${{ parameters.test.release.ctest_args }}"
depends_on: configure
- template: common.yml
parameters:
target: SNPCC
env: ${{ parameters.env.Virtual }}
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.release.cmake_args }} ${{ parameters.build.SNPCC.cmake_args }}"
suffix: "Release"
artifact_name: "SNPCC_Release"
ctest_filter: "${{ parameters.test.release.ctest_args }}"
depends_on: configure
- template: common.yml
parameters:
target: Virtual
env: ${{ parameters.env.Virtual }}
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.release.cmake_args }} ${{ parameters.build.Virtual.cmake_args }}"
suffix: "Release"
artifact_name: "Virtual_Release"
ctest_filter: "${{ parameters.test.release.ctest_args }}"
depends_on: configure
# Build that produces unsafe binaries for troubleshooting purposes
- template: common.yml
parameters:
target: SGX
env: ${{ parameters.env.SGX }}
cmake_args: "${{ parameters.build.common.cmake_args }} ${{ parameters.build.unsafe.cmake_args }} ${{ parameters.build.SGX.cmake_args }}"
suffix: "Unsafe"
artifact_name: "SGX_Unsafe"
ctest_filter: "${{ parameters.test.release.ctest_args }}"
depends_on: configure
- template: release.yml
parameters:
env: ${{ parameters.env.Hosted }}
depends_on:
- Checks
- SGX_Release
- Virtual_Release
- SNPCC_Release
- SGX_Unsafe