NixOS / ofborg

@ofborg tooling automation https://monitoring.ofborg.org/dashboard/db/ofborg

Home Page:https://ofborg.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Detect what to build based on touched file paths

pbsds opened this issue · comments

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?