Enable PGO for Linux x86-64 Ruff releases (#27570)
## Summary
This PR enables PGO for Ruff releases, starting with Linux x86-64.
### Design
The release pipeline is modified as follows:
- We build an instrumented, stripped release binary.
- We run `check` and `format` on a corpus of projects from our ecosystem
reports -- specifically, eight of the pinned ecosystem projects that we
use in the ty CI. (In total, it's 502 Python and stub files.)
- We merge the profiles via `llvm-profdata`.
- We feed the result back into the existing `maturin` build.
### Results
We evaluate performance on a held-out corpus: Prefect, Django, Pandas,
scikit-learn, SciPy, and SymPy.
Results are as follows:
| Held-out project | `ruff check` | `ruff format` |
| --- | ---: | ---: |
| Django | 10.9% faster | 6.6% faster |
| pandas | 16.3% faster | 9.7% faster |
| scikit-learn | 10.8% faster | 7.9% faster |
| SciPy | 14.7% faster | 5.6% faster |
| SymPy | 17.1% faster | 11.4% faster |
| Geometric mean | **14.0% faster** | **8.3% faster** |
Beyond runtime:
- **Binary size decreased by 6.2%** (27.96 MB to 26.23 MB).
- **Release pipeline gets about 2x longer** (non-PGO release build took
7m22s; PGO pipeline took 15m14s (8m35s instrumented training plus 6m39s
optimized wheel).
### Stack
Additional platforms are covered in subsequent PRs in the stacked;
platforms that are lower-priority at at-all difficult to run on natively
are omitted. In the end, I'm targeting Linux x86-64, Linux ARM, macOS
ARM, and Windows x86-64.
I also attempted BOLT in https://github.com/astral-sh/ruff/pull/27588,
but I've decided against pursuing that for now; see the results in that
PR which speak for themselves.
ty and uv will follow the same approach; see the stacks here:
- https://github.com/astral-sh/ty/pull/4213
- https://github.com/astral-sh/uv/pull/21001
See: https://github.com/astral-sh/ruff/issues/7055.