mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
ci: Add jobs to perform coverage with BullseyeCoverage on Linux
This commit is contained in:
@@ -186,6 +186,42 @@ a:fedora42-gcc-gcov:
|
||||
variables:
|
||||
CMAKE_CI_JOB_NIGHTLY: "true"
|
||||
|
||||
b:fedora42-bullseye-coverage:
|
||||
extends:
|
||||
- .fedora42_bullseye_coverage
|
||||
- .cmake_build_linux
|
||||
- .cmake_build_artifacts
|
||||
- .linux_x86_64_tags
|
||||
- .run_manually
|
||||
variables:
|
||||
CMAKE_CI_JOB_NIGHTLY: "true"
|
||||
|
||||
t:fedora42-bullseye-coverage:
|
||||
extends:
|
||||
- .fedora42_bullseye_coverage
|
||||
- .cmake_test_linux
|
||||
- .cmake_coverage_artifacts
|
||||
- .linux_x86_64_tags_x11
|
||||
- .run_dependent
|
||||
# Run coverage analysis even if the tests fail.
|
||||
allow_failure: true
|
||||
needs:
|
||||
- b:fedora42-bullseye-coverage
|
||||
variables:
|
||||
CMAKE_CI_JOB_NIGHTLY: "true"
|
||||
|
||||
a:fedora42-bullseye-coverage:
|
||||
extends:
|
||||
- .fedora42_bullseye_coverage
|
||||
- .cmake_coverage_linux
|
||||
- .cmake_cdash_artifacts
|
||||
- .linux_x86_64_tags
|
||||
- .run_dependent
|
||||
needs:
|
||||
- t:fedora42-bullseye-coverage
|
||||
variables:
|
||||
CMAKE_CI_JOB_NIGHTLY: "true"
|
||||
|
||||
# Linux builds
|
||||
|
||||
b:centos7-x86_64:
|
||||
|
@@ -65,6 +65,7 @@
|
||||
|
||||
# CTest coverage files.
|
||||
- ${CMAKE_CI_BUILD_DIR}/CMakeFiles/TargetDirectories.txt
|
||||
- ${CMAKE_CI_BUILD_DIR}/Bullseye/
|
||||
- ${CMAKE_CI_BUILD_DIR}/**/*.gcno
|
||||
- ${CMAKE_CI_BUILD_DIR}/Source/QtDialog/moc_*.cpp
|
||||
- ${CMAKE_CI_BUILD_DIR}/Source/QtDialog/ui_*.h
|
||||
@@ -190,6 +191,7 @@
|
||||
|
||||
# CTest coverage files.
|
||||
- ${CMAKE_CI_BUILD_DIR}/CMakeFiles/TargetDirectories.txt
|
||||
- ${CMAKE_CI_BUILD_DIR}/Bullseye/
|
||||
- ${CMAKE_CI_BUILD_DIR}/**/*.gcno
|
||||
- ${CMAKE_CI_BUILD_DIR}/**/*.gcda
|
||||
|
||||
|
21
.gitlab/ci/configure_fedora42_bullseye_coverage.cmake
Normal file
21
.gitlab/ci/configure_fedora42_bullseye_coverage.cmake
Normal file
@@ -0,0 +1,21 @@
|
||||
# Compile with Bullseye compiler wrappers, but do not test with them.
|
||||
set(CMAKE_C_COMPILER "/opt/bullseye/bin/cc" CACHE PATH "")
|
||||
set(CMAKE_CXX_COMPILER "/opt/bullseye/bin/c++" CACHE PATH "")
|
||||
|
||||
# Bullseye records a COVFILE id in object files, so they cannot be cached.
|
||||
set(configure_no_sccache 1)
|
||||
|
||||
# Do not bootstrap for the coverage test suite.
|
||||
set(CMAKE_SKIP_BOOTSTRAP_TEST TRUE CACHE BOOL "")
|
||||
|
||||
# Shrink stress tests when running with Bullseye.
|
||||
set(ENV{KWSYS_TEST_PROCESS_1_COUNT} 11)
|
||||
|
||||
set(CMake_TEST_GUI "ON" CACHE BOOL "")
|
||||
set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,shared,bmionly,build_database" CACHE STRING "")
|
||||
set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "")
|
||||
set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "")
|
||||
set(CMake_TEST_TLS_VERSION "1.3" CACHE STRING "")
|
||||
set(CMake_TEST_TLS_VERSION_URL_BAD "https://badtls-v1-1.kitware.com:8011" CACHE STRING "")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora42_common.cmake")
|
10
.gitlab/ci/env_fedora42_bullseye_coverage.sh
Normal file
10
.gitlab/ci/env_fedora42_bullseye_coverage.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
source .gitlab/ci/bullseye-env.sh
|
||||
|
||||
# Store Bullseye activation state in the work directory.
|
||||
export COVAPPDATADIR="$CI_PROJECT_DIR/build/Bullseye"
|
||||
|
||||
# Collect all coverage in a single location.
|
||||
export COVFILE="$COVAPPDATADIR/CMake.cov"
|
||||
|
||||
# Suppress the Bullseye startup banner on compilation.
|
||||
export COVCOPT="--no-banner"
|
2
.gitlab/ci/pre_build_fedora42_bullseye_coverage.sh
Normal file
2
.gitlab/ci/pre_build_fedora42_bullseye_coverage.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
# Turn on Bullseye coverage for build step.
|
||||
cov01 --on
|
2
.gitlab/ci/pre_configure_fedora42_bullseye_coverage.sh
Normal file
2
.gitlab/ci/pre_configure_fedora42_bullseye_coverage.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
# Turn off Bullseye coverage for configure step.
|
||||
cov01 --off
|
2
.gitlab/ci/pre_test_fedora42_bullseye_coverage.sh
Normal file
2
.gitlab/ci/pre_test_fedora42_bullseye_coverage.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
# Turn on Bullseye coverage for test step.
|
||||
cov01 --on
|
@@ -111,6 +111,19 @@
|
||||
CMAKE_CI_TEST_TIMEOUT: "1500"
|
||||
CMAKE_CI_NO_INSTALL: 1
|
||||
|
||||
.fedora42_bullseye_coverage:
|
||||
extends: .fedora42
|
||||
environment:
|
||||
name: bullseye-coverage
|
||||
variables:
|
||||
# See issue #20001
|
||||
CMAKE_GENERATOR: "Unix Makefiles"
|
||||
CMAKE_CONFIGURATION: fedora42_bullseye_coverage
|
||||
CTEST_NO_WARNINGS_ALLOWED: 1
|
||||
CMAKE_CI_BUILD_TYPE: Debug
|
||||
CMAKE_CI_TEST_TIMEOUT: "1500"
|
||||
CMAKE_CI_NO_INSTALL: 1
|
||||
|
||||
#### Lint builds
|
||||
|
||||
.fedora42_tidy:
|
||||
|
@@ -576,7 +576,7 @@ run_cmake_command(EmptyDirTest-ctest
|
||||
|
||||
run_cmake_command(EmptyDirCoverage-ctest
|
||||
# Isolate this test from any surrounding coverage tool.
|
||||
${CMAKE_COMMAND} -E env --unset=COVFILE
|
||||
${CMAKE_COMMAND} -E env COVNOSAVE=1 --unset=COVAPPDATADIR --unset=COVFILE
|
||||
${CMAKE_CTEST_COMMAND} -C Debug -M Experimental -T Coverage
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user