Skip to content

Commit bff9bca

Browse files
committed
ci: add gcov build in UO pipelines
1 parent d81bfea commit bff9bca

5 files changed

Lines changed: 103 additions & 9 deletions

File tree

.gitlab/gitlab-ci-spack.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,25 @@ default:
4545
script:
4646
- bash scripts/ci/gitlab-ci/run.sh memcheck
4747

48+
.common-test-coverage:
49+
extends:
50+
- .common
51+
stage: test
52+
script:
53+
- bash scripts/ci/gitlab-ci/run.sh test 2>&1 | tee coverage-test.log
54+
- bash scripts/ci/gitlab-ci/run.sh coverage 2>&1 | tee coverage-ctest.log
55+
- lcov --capture --directory "$CI_BIN_DIR" --output-file coverage.info 2>&1 | tee coverage-lcov.log
56+
- genhtml coverage.info --output-directory coverage-report 2>&1 | tee -a coverage-lcov.log
57+
artifacts:
58+
expire_in: 1 week
59+
when: always
60+
paths:
61+
- coverage.info
62+
- coverage-report/
63+
- coverage-test.log
64+
- coverage-ctest.log
65+
- coverage-lcov.log
66+
4867
#===============================================================================
4968
build:uo-sanitizer-asan:
5069
image:
@@ -90,6 +109,17 @@ test:uo-sanitizer-ubsan:
90109
extends: [.common-memcheck]
91110
needs: [build:uo-sanitizer-ubsan]
92111

112+
build:uo-coverage:
113+
image:
114+
name: ghcr.io/ornladios/adios2:ci-opensuse-tw-coverage-20260313
115+
extends: [.common-build]
116+
117+
test:uo-coverage:
118+
image:
119+
name: ghcr.io/ornladios/adios2:ci-opensuse-tw-coverage-20260313
120+
extends: [.common-test-coverage]
121+
needs: [build:uo-coverage]
122+
93123
deploy:sync-ornl:
94124
environment: ornl
95125
rules:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SPDX-FileCopyrightText: 2026 Oak Ridge National Laboratory and Contributors
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Client maintainer: vicente.bolea@kitware.com
6+
7+
set(ENV{CC} gcc)
8+
set(ENV{CXX} g++)
9+
10+
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
11+
12+
set(dashboard_cache "
13+
BUILD_TESTING:BOOL=ON
14+
ADIOS2_BUILD_EXAMPLES:BOOL=ON
15+
16+
ADIOS2_USE_Fortran:STRING=OFF
17+
ADIOS2_USE_HDF5:STRING=ON
18+
ADIOS2_USE_MPI:STRING=OFF
19+
ADIOS2_USE_Python:STRING=OFF
20+
ADIOS2_USE_ZFP:STRING=ON
21+
22+
CMAKE_BUILD_TYPE:STRING=Debug
23+
CMAKE_C_FLAGS:STRING=--coverage
24+
CMAKE_CXX_FLAGS:STRING=--coverage
25+
CMAKE_EXE_LINKER_FLAGS:STRING=--coverage
26+
CMAKE_MODULE_LINKER_FLAGS:STRING=--coverage
27+
CMAKE_SHARED_LINKER_FLAGS:STRING=--coverage
28+
")
29+
30+
set(dashboard_track "Analysis")
31+
set(CTEST_CMAKE_GENERATOR "Ninja")
32+
set(CTEST_BUILD_CONFIGURATION Debug)
33+
34+
set(ADIOS_TEST_REPEAT 0)
35+
list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
36+
include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake)

scripts/ci/images/opensuse-tw/build-images-opensuse-tw

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ declare -u ENABLE_PUSH=
1818
function docker_build() {
1919
local docker_file=$1
2020
local docker_tag=$2
21-
local args=(--progress=plain --rm)
21+
local full_tag="${DOCKER_REPOSITORY}:${docker_tag}-$(date +"%Y%m%d")"
2222

23-
if [[ -n "${ENABLE_PUSH}" ]]; then
24-
args+=("--push")
25-
fi
26-
27-
sudo docker build "${args[@]}" \
23+
podman build --rm \
2824
--file "${docker_file}" \
29-
--tag "${DOCKER_REPOSITORY}:${docker_tag}-$(date +"%Y%m%d")" \
25+
--tag "${full_tag}" \
3026
.
27+
28+
if [[ -n "${ENABLE_PUSH}" ]]; then
29+
podman push "${full_tag}"
30+
fi
3131
}
3232

3333
function usage() {
@@ -51,3 +51,4 @@ docker_build opensuse-tw-asan.dockerfile ci-opensuse-tw-asan
5151
docker_build opensuse-tw-msan.dockerfile ci-opensuse-tw-msan
5252
docker_build opensuse-tw-tsan.dockerfile ci-opensuse-tw-tsan
5353
docker_build opensuse-tw-ubsan.dockerfile ci-opensuse-tw-ubsan
54+
docker_build opensuse-tw-coverage.dockerfile ci-opensuse-tw-coverage
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-FileCopyrightText: 2026 Oak Ridge National Laboratory and Contributors
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
FROM ghcr.io/ornladios/adios2:ci-opensuse-tw-sanitizer-base-20260313
6+
LABEL maintainer "Vicente Adolfo Bolea Sanchez<vicente.bolea@kitware.com>"
7+
8+
RUN zypper refresh && \
9+
zypper install -y --no-recommends \
10+
lcov \
11+
&& \
12+
zypper clean --all
13+
14+
# Install ZFP
15+
WORKDIR /opt/zfp
16+
RUN curl -L https://github.com/LLNL/zfp/releases/download/1.0.1/zfp-1.0.1.tar.gz | tar -xvz && \
17+
cmake -GNinja -S zfp-1.0.1 -B build \
18+
-DBUILD_SHARED_LIBS=ON \
19+
-DCMAKE_BUILD_TYPE=Release \
20+
-DCMAKE_INSTALL_PREFIX=/opt/zfp/1.0.1 \
21+
&& \
22+
cmake --build build && \
23+
cmake --install build && \
24+
rm -rf zfp-1.0.1 build
25+
ENV PATH=/opt/zfp/1.0.1/bin:${PATH} \
26+
LD_LIBRARY_PATH=/opt/zfp/1.0.1/lib64:${LD_LIBRARY_PATH} \
27+
CMAKE_PREFIX_PATH=/opt/zfp/1.0.1:${CMAKE_PREFIX_PATH}

scripts/ci/images/opensuse-tw/opensuse-tw-sanitizer-base.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN zypper refresh && \
1313
bzip2 \
1414
gzip \
1515
bzip3-devel \
16-
clang17 \
16+
clang18 \
1717
cmake \
1818
curl \
1919
file \
@@ -25,7 +25,7 @@ RUN zypper refresh && \
2525
libffi-devel \
2626
libpng16-devel \
2727
libunwind-devel \
28-
llvm17 \
28+
llvm18 \
2929
ninja \
3030
patch \
3131
python3-devel \

0 commit comments

Comments
 (0)