-
Couldn't load subscription status.
- Fork 20
Rewrite CI: use reusable actions, native arm and faster PR testing #1153
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
Conversation
|
I got tired of waiting 10 minutes for the cross-arch tests to run and I thought it was time to revamp the CI a bit and use the reusable actions we have. This is a draft because it seems there aren't a lot of arm runners yet, so it still takes quite long for the arm jobs to run 😒 If it works out it will be used as a base to update the repo-config templates. |
This commit rewrites the CI configuration to use reusable actions for testing with nox and setting up Python. It also uses the new native arm runners, upgrade to use the Ubuntu 24.04 GitHub runner and split the CI into two workflows: one for PRs and one for pushes. The PR workflow only runs the nox tests for the default Python version and test the documentation website generation, so it should be much quicker. When pushing (to any branch, including merge queues, and tags), a more through CI is run, including all the nox sessions for all supported Python versions, archs and OSes, building the distribution packages, testing the installation of the built packages, publishing the documentation website, creating a GitHub release and publishing the packages to PyPI. Signed-off-by: Leandro Lucarella <[email protected]>
|
OK, the runners actually never started because the names are different from the ones we used for private repos 🤦 I updated the arm runner names (they are It reduces the CI time for pushes to ~1/4 from (~16m to ~4m). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Oh never mind, I see that the jobs have new names. |
|
I don't get it, I only see |
The idea is to only run one of the matrix items in the PR, as in our experience it is very unlikely that if one of the matrix runs passes, any of the other fails, so it is a wast (and slow) to run the full matrix each time a PR is updated. So we run the full matrix only when queuing to the merge queue or on pushes (branches and tags). Here you can see the full matrix run for a push in my fork: https://github.com/llucax/frequenz-sdk-python/actions/runs/12948016905 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super!
|
OK, I will update the required checks for merging and merge! 🎉 |
|
Queued, here is the run: https://github.com/frequenz-floss/frequenz-sdk-python/actions/runs/12990825581 |
|
Github is being weird, I had to try to merge my PR several times as well, but it worked eventually. |
This commit rewrites the CI configuration to use reusable actions for testing with nox and setting up Python.
It also uses the new native arm runners, upgrade to use the Ubuntu 24.04 GitHub runner and split the CI into two workflows: one for PRs and one for pushes.
The PR workflow only runs the nox tests for the default Python version and test the documentation website generation, so it should be much quicker.
When pushing (to any branch, including merge queues, and tags), a more through CI is run, including all the nox sessions for all supported Python versions, archs and OSes, building the distribution packages, testing the installation of the built packages, publishing the documentation website, creating a GitHub release and publishing the packages to PyPI.