NixOS/ofborg

Detect what to build based on touched file paths

pbsds opened this issue · 0 comments

pbsds commented

Relying on PR and commit titles to determine which attribute paths to build alone is sensitive to human error, and committers are depending on state of mind prone to merge PRs where CI is all green without checking if any builds were dispatched or not.

Therefore i propose some extra logic to determine which packages to build in ofborg CI:

  • Build packages whose meta.position is touched.
    • Skip this logic if more than say 5 packages share the same meta.position.
  • Build xyz if any file in pkgs/by-name/xy/xyz/ is touched
    • This is safe, since the by-name CI check ensures there are no ../* references in by-name packages.
    • This will cause a build if only say patch files are touched, and not only trigger for package.nix

This can of course be a fallback used only if no valid/existing attribute path could be extracted from the PR/commit titles.

Thoughts?