Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -32,60 +32,60 @@ WarningsAsErrors: "*"
HeaderFilterRegex: '.*/(modules|tasks)/.*'

CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.ClassMemberCase
value: lower_case
- key: readability-identifier-naming.ConstexprVariableCase
value: CamelCase
- key: readability-identifier-naming.ConstexprVariablePrefix
value: k
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantPrefix
value: k
- key: readability-identifier-naming.FunctionCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: k
- key: readability-identifier-naming.StaticConstantCase
value: CamelCase
- key: readability-identifier-naming.StaticConstantPrefix
value: k
- key: readability-identifier-naming.StaticVariableCase
value: lower_case
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.MacroDefinitionIgnoredRegexp
value: '^[A-Z]+(_[A-Z]+)*_$'
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberSuffix
value: _
- key: readability-identifier-naming.PublicMemberSuffix
value: ''
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.TypeAliasCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 1
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.ClassMemberCase
value: lower_case
- key: readability-identifier-naming.ConstexprVariableCase
value: CamelCase
- key: readability-identifier-naming.ConstexprVariablePrefix
value: k
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantPrefix
value: k
- key: readability-identifier-naming.FunctionCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: k
- key: readability-identifier-naming.StaticConstantCase
value: CamelCase
- key: readability-identifier-naming.StaticConstantPrefix
value: k
- key: readability-identifier-naming.StaticVariableCase
value: lower_case
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.MacroDefinitionIgnoredRegexp
value: '^[A-Z]+(_[A-Z]+)*_$'
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberSuffix
value: _
- key: readability-identifier-naming.PublicMemberSuffix
value: ''
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.TypeAliasCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.IgnoreMainLikeFunctions
value: 1
# Functions with scores beyond 15 are typically flagged as potentially problematic (empirically)
- key: readability-function-cognitive-complexity.Threshold
value: 15 # default: 25
- key: readability-identifier-length.MinimumVariableNameLength
value: 1
- key: readability-identifier-length.MinimumParameterNameLength
value: 1
- key: readability-function-cognitive-complexity.Threshold
value: 15 # default: 25
- key: readability-identifier-length.MinimumVariableNameLength
value: 1
- key: readability-identifier-length.MinimumParameterNameLength
value: 1
- key: misc-include-cleaner.IgnoreHeaders
value: '(__chrono/.*|stdlib\.h|3rdparty/.*)'
50 changes: 19 additions & 31 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,10 @@ jobs:
env:
PPC_NUM_PROC: 1
PPC_ASAN_RUN: 1
gcc-build-codecov:
needs:
- gcc-test-extended
- clang-test-extended
clang-build-codecov:
# needs:
# - gcc-test-extended
# - clang-test-extended
runs-on: ubuntu-24.04
container:
image: ghcr.io/learning-process/ppc-ubuntu:latest
Expand All @@ -339,56 +339,44 @@ jobs:
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ runner.os }}-gcc
key: ${{ runner.os }}-clang-coverage
create-symlink: true
max-size: 1G
- name: CMake configure
run: >
cmake -S . -B build -G Ninja
-D CMAKE_C_COMPILER=clang-20 -D CMAKE_CXX_COMPILER=clang++-20
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
-D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_VERBOSE_MAKEFILE=ON -D USE_COVERAGE=ON
-D CMAKE_INSTALL_PREFIX=install
- name: Build project
run: |
cmake --build build --parallel
- name: Run tests (MPI)
run: scripts/run_tests.py --running-type="processes" --additional-mpi-args="--oversubscribe"
- name: Install project
run: |
cmake --build build --target install
- name: Run tests and generate coverage
run: >
python3 scripts/run_tests.py --running-type=processes_coverage
--additional-mpi-args="--oversubscribe" --llvm-version=20
env:
PPC_NUM_PROC: 2
LLVM_PROFILE_FILE: build/coverage-%p-%m.profraw
PPC_NUM_THREADS: 2
PPC_NUM_PROC: 2
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
- name: Run tests (threads)
run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4
env:
PPC_NUM_PROC: 1
- name: Generate gcovr Coverage Data
run: |
mkdir cov-report
cd build
gcovr --gcov-executable `which gcov-14` \
-r ../ \
--exclude '.*3rdparty/.*' \
--exclude '/usr/.*' \
--exclude '.*tasks/.*/tests/.*' \
--exclude '.*modules/.*/tests/.*' \
--exclude '.*tasks/common/runners/.*' \
--exclude '.*modules/runners/.*' \
--exclude '.*modules/util/include/perf_test_util.hpp' \
--exclude '.*modules/util/include/func_test_util.hpp' \
--exclude '.*modules/util/src/func_test_util.cpp' \
--xml --output ../coverage.xml \
--html=../cov-report/index.html --html-details
PPC_DISABLE_VALGRIND: 1
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
files: coverage.xml
files: build/coverage/coverage.lcov
- name: Upload coverage report artifact
id: upload-cov
uses: actions/upload-artifact@v4
with:
name: cov-report
path: 'cov-report'
path: 'build/coverage/html'
- name: Comment coverage report link
# TODO: Support PRs from forks and handle cases with insufficient write permissions
continue-on-error: true
Expand Down
5 changes: 3 additions & 2 deletions cmake/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ if(UNIX)
endif()

if(USE_COVERAGE)
add_compile_options(--coverage)
add_link_options(--coverage)
# Use LLVM source-based code coverage
add_compile_options(-fprofile-instr-generate -fcoverage-mapping)
add_link_options(-fprofile-instr-generate -fcoverage-mapping)
endif(USE_COVERAGE)
endif()

Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN set -e \
openmpi-bin openmpi-common libopenmpi-dev \
libomp-dev \
gcc-14 g++-14 \
gcovr zip \
zip \
&& wget -q https://apt.llvm.org/llvm.sh \
&& chmod +x llvm.sh \
&& ./llvm.sh 20 all \
Expand Down
Loading
Loading