mirror of
https://github.com/facebookresearch/faiss.git
synced 2026-10-12 02:13:36 +00:00
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/5291 TLDR: this runs the build on every merge of a PR. Yes it doubles the cost but it may increase cache hit rate, which is super low right now. Right now the cache is from May 5 when I first integrated it because there's no refresh on main branch. This is supposed to fix that. -- AI description: The `Build` workflow only triggered on `pull_request` and tag pushes, never on pushes to `main`. GitHub Actions caches are scoped per branch: PR runs read main's cache and write to their own throwaway PR scope. Main's cache is therefore only refreshed when the workflow runs on `main` itself, which never happened. Result: PRs were restoring a month-old ccache (`2026-05-05`) on every run, with hit rates around ~28%. Cache size sat at ~13 MB out of 2 GB. This adds `push: branches: [main]` so the cmake build (and only the cmake build) runs on each merge, populating main's ccache. The pip wheel jobs are gated to non-push or tag-push events to preserve their current behavior — they only run on PRs, manual dispatch, or tag releases, never on plain main pushes. PyPI publish jobs are already guarded by `startsWith(github.ref, 'refs/tags/v')`, so there is no risk of accidental publishes. ___ Differential Revision: D107964344 fbshipit-source-id: 14d636c17b38ae476bb9e7edbe5654d21dd74f0e