Your pull request must pass all required CI checks before review/merge. The pipeline validates formatting and static analysis, builds on all platforms, runs functional tests (threads and MPI), measures performance, builds docs, and publishes artifacts (coverage report, docs, scoreboard).
- Pre-commit checks (fast) — runs repository hooks on changed files; fix locally via
pre-commit run -a. - Platform builds and tests (Ubuntu, macOS, Windows) — Ubuntu (GCC/Clang, amd64+arm), macOS (Clang), Windows (MSVC/Clang‑CL); functional tests via
scripts/run_tests.pyfor threads (--counts 1 2 3 4; extended5 7 11 13) and processes (MPI,--counts 1 2 3 4). - Sanitizers (Ubuntu/Clang) — Address/UB/Leak; tests use
PPC_ASAN_RUN=1to skip valgrind. - Coverage (Ubuntu/GCC) —
-D USE_COVERAGE=ON+ gcovr; publishes to Codecov and uploadscov-report(HTML). - Performance (perf) —
scripts/generate_perf_results.shproducesbuild/perf_stat_dir; uploadsperf-stat(Linux) andperf-stat-macos(macOS). - Pages (docs and scoreboard) — builds Doxygen XML and Sphinx (EN+RU) + scoreboard; on
masterdeploys with coverage to GitHub Pages. - Security and static analysis — clang‑tidy on PRs (avoid
NOLINT/IWYU pragma), scheduled CodeQL (C++/Python) and OpenSSF Scorecard.
The pipeline is illustrated below. Image is auto-generated by scripts/jobs_graph.py:
Use the scripts/run_tests.py helper. Common environment variables:
PPC_NUM_THREADS- Number of threads (also exported as
OMP_NUM_THREADS). PPC_NUM_PROC- Number of MPI processes to launch.
PPC_ASAN_RUN- Set to
1when sanitizers are enabled to skipvalgrindruns (default0). PPC_IGNORE_TEST_TIME_LIMIT- Set to
1to disable test time limits (default0).
Execution modes:
- --running-type=threads — shared-memory backends (OpenMP/TBB/std::thread)
- --running-type=processes — MPI tests
- --running-type=performance — performance benchmarks (mirrors CI perf job)
Examples:
export PPC_NUM_THREADS=4
export PPC_NUM_PROC=2
# Threads (functional)
scripts/run_tests.py --running-type=threads --counts 1 2 4
# MPI (functional)
scripts/run_tests.py --running-type=processes --counts 2 4
# Performance (benchmarks)
scripts/run_tests.py --running-type=performanceOptions:
- --counts runs tests for multiple thread/process counts sequentially.
- --additional-mpi-args passes extra launcher flags (e.g., --oversubscribe).
- --verbose prints every executed command.
- Sanitizers (Linux): configure with
-D ENABLE_ADDRESS_SANITIZER=ON(and optional UB/Leak), run tests withPPC_ASAN_RUN=1. - Coverage (Linux/GCC): configure with
-D USE_COVERAGE=ON, run tests, then generate HTML viagcovr(see CIgcc-build-codecovfor command line).
- Docs: run Doxygen first (
doxygen Doxyfile), then Sphinx EN/RU via CMake targetsdocs_gettext,docs_update,docs_html. - Scoreboard: generate perf stats (
scripts/generate_perf_results.sh) and build scoreboard target or usepython3 scoreboard/main.pylocally.
- Pre-commit fails: run
pre-commit run -alocally (install withpre-commit install) and commit fixes. - Static analysis (clang-tidy) fails: address comments; do not use
NOLINT/IWYU pragmain task code. - Tests not found/not running: verify
settings.jsonenables required technologies and tests exist; see :doc:`submit_work`. - Time limits exceeded: reduce data sizes; prefer env vars (:doc:`environment_variables`) like
PPC_TASK_MAX_TIME/PPC_PERF_MAX_TIME; avoid sleeps/randomness. - MPI runs fail locally: set
PPC_NUM_PROCand try--additional-mpi-args=\"--oversubscribe\". - Docs build fails: fix RST warnings; run
doxygen Doxyfilebefore Sphinx targets. - Performance job fails: ensure exactly two perf tests (
taskandpipeline) and keep durations within limits.
clang-tidy (static analysis):
# Configure with compile_commands.json
cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Release -D CMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build -j
# clang-tidy run:
### analyze all sources
run-clang-tidy -p build
### apply available automatic fixes
run-clang-tidy -p build -fixgcovr (coverage, GCC):
# Configure with coverage flags (use GCC)
cmake -S . -B build -G Ninja -D USE_COVERAGE=ON -D CMAKE_BUILD_TYPE=Release
cmake --build build -j
# Run tests here (threads/processes/performance)
scripts/run_tests.py --running-type=threads --counts 1 2 4
# Generate reports (install gcovr if needed: python3 -m pip install gcovr)
mkdir -p cov-report
(cd build && gcovr --gcov-executable "$(which gcov-14 || which gcov)" \
-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)- clang-tidy version
- CI uses clang-tidy 22. Prefer the same locally to avoid mismatches.
- The helper may be named
clang-tidy-22orrun-clang-tidy-22on some systems. - Linux
- clang-tidy: install from your distro (e.g.,
apt install clang-tidy-22) or use the course Docker image. - gcovr:python3 -m pip install gcovror a distro package. - GCC version: usegcov-14when building with GCC 14 (as in CI). - macOS
- clang-tidy:
brew install llvm; binary at$(brew --prefix)/opt/llvm/bin/clang-tidy. - Optionally add LLVM to PATH or invoke with full path. - gcovr:python3 -m pip install gcovrorbrew install gcovr. - Windows
- clang-tidy: install LLVM (Clang) or use
choco install llvm; ensureclang-tidy.exeis in PATH. - gcovr:py -m pip install gcovr. - Coverage is primarily supported in our CI on Linux/GCC; prefer generating reports on Linux.