Skip to content

ci: speed up per-commit clang-tidy checks by checking only the diff to upstream master

Gabriel Ferreira requested to merge Gabrielcarvfer/ns-3-dev:clangTidyDiff into master

This should drastically reduce per-commit CI job times (30-60x) by only checking the diff between the master and the fork.

  • we add nsnam/ns-3-dev as the "upstream" remote (making sure forks work correctly)
  • we get the unified git diff between "upstream/master" and the HEAD of the fork
  • pass the diff to the clang-tidy-diff.py script
    • the script only runs clang-tidy for the files impacted by the diff instead of scanning the entire repository every single time
Edited by Gabriel Ferreira

Merge request reports