Skip to content

Add RelWithDebInfo mode sanitizer CI workflows #1565

Add RelWithDebInfo mode sanitizer CI workflows

Add RelWithDebInfo mode sanitizer CI workflows #1565

Workflow file for this run

# Copyright (c) 2020-2022 ETH Zurich
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
name: Linux CI (Coverage)
on:
merge_group:
pull_request:
push:
branches:
# Development and release branches
- main
- release**
jobs:
build:
name: github/linux/coverage
runs-on: ubuntu-24.04
container: pikaorg/pika-ci-base:28
steps:
- uses: actions/checkout@v4
- name: Update apt repositories for ccache
run: apt update
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: ccache-linux-coverage
- name: Configure
shell: bash
run: |
cmake \
. \
-Bbuild \
-GNinja \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="--coverage" \
-DCMAKE_EXE_LINKER_FLAGS="--coverage" \
-DPIKA_WITH_MALLOC=system \
-DPIKA_WITH_MPI=ON \
-DPIKA_WITH_EXAMPLES=ON \
-DPIKA_WITH_TESTS=ON \
-DPIKA_WITH_TESTS_HEADERS=OFF \
-DPIKA_WITH_TESTS_MAX_THREADS=$(nproc) \
-DPIKA_WITH_COMPILER_WARNINGS=ON \
-DPIKA_WITH_COMPILER_WARNINGS_AS_ERRORS=ON \
-DPIKA_WITH_PARALLEL_TESTS_BIND_NONE=ON
- name: Build
shell: bash
run: |
cmake --build build --target tests
- name: Test
shell: bash
working-directory: build
continue-on-error: true
run: |
# We are certain that we want to run mpiexec as root despite warnings as that is the
# only user available in the container. Mistakes will only affect the current step.
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
ctest -j2 --timeout 120 --output-on-failure
- name: Generate coverage report
shell: bash
working-directory: build
run: |
grcov . \
--source-dir .. \
--output-path lcov.info \
--output-type lcov \
--llvm \
--ignore-not-existing \
--keep-only "*libs/pika/*/{src,include}/*"
- name: Upload coverage report to GH artifacts
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: build/lcov.info
if-no-files-found: error