Skip to content

ci: Update pre-commit hooks and GitHub Action #2000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nicholasjng
Copy link
Contributor

@nicholasjng nicholasjng commented Jun 12, 2025

Using pre-commit together with uv gives a considerable speedup when running with --no-sync, and eliminates the need for our current elaborate caching setup in GitHub Actions.

Also adds the Python 3.13 trove classifier to pyproject.toml, since wheels for it have been published on PyPI.


Since uv is already used in cibuildwheel for Python virtual environment management, I figured it was a good idea to implement it here also. I've been running this setup (uv run pre-commit run ...) across multiple projects for a while now, including benchmark, so I consider it a well-tried approach.

As for the addition of --no-sync: This prevents the installation of google-benchmark into the virtual environment, which is good, since it is not necessary for pre-commit to begin with, and takes a good 20-30s on GitHub runners.

nicholasjng and others added 3 commits June 12, 2025 15:58
Using pre-commit together with uv gives a considerable speedup when running with `--no-sync`,
and eliminates the need for our current elaborate caching setup in GitHub Actions.
And invoke the pre-commit run only with the dev group enabled. This should avoid the costly install on sync.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants