Skip to content

Conversation

@llucax
Copy link
Contributor

@llucax llucax commented Jan 23, 2025

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.

@github-actions github-actions bot added the part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) label Jan 23, 2025
@llucax
Copy link
Contributor Author

llucax commented Jan 23, 2025

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]>
@llucax
Copy link
Contributor Author

llucax commented Jan 24, 2025

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 arm instead of arm64 and now they worked pretty fast and well, so I'm making this non-draft.

It reduces the CI time for pushes to ~1/4 from (~16m to ~4m).

@llucax llucax marked this pull request as ready for review January 24, 2025 10:47
@llucax llucax requested a review from a team as a code owner January 24, 2025 10:47
@llucax llucax requested review from Marenz and removed request for a team January 24, 2025 10:47
@llucax llucax added the type:tech-debt Improves the project without visible changes for users label Jan 24, 2025
@llucax llucax self-assigned this Jan 24, 2025
@llucax llucax enabled auto-merge January 24, 2025 10:47
Copy link
Contributor

@ela-kotulska-frequenz ela-kotulska-frequenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shsms
Copy link
Contributor

shsms commented Jan 27, 2025

Where do you see that the CI jobs have finished? From what I can see, they're still pending.

Oh never mind, I see that the jobs have new names.

@shsms
Copy link
Contributor

shsms commented Jan 27, 2025

I don't get it, I only see ci_checks_max running on amd64 here: https://github.com/frequenz-floss/frequenz-sdk-python/actions/runs/12948017451/job/36115782506. Don't see any of the other runs.

@llucax
Copy link
Contributor Author

llucax commented Jan 27, 2025

I don't get it, I only see ci_checks_max running on amd64 here https://github.com/frequenz-floss/frequenz-sdk-python/actions/runs/12948017451/job/36115782506

https://github.com/frequenz-floss/frequenz-sdk-python/actions/runs/12948017451/job/36115782506#step:2:558

Don't see any of the other runs.

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

Copy link
Contributor

@shsms shsms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super!

@llucax
Copy link
Contributor Author

llucax commented Jan 27, 2025

OK, I will update the required checks for merging and merge! 🎉

@llucax llucax disabled auto-merge January 27, 2025 14:08
@llucax llucax added this pull request to the merge queue Jan 27, 2025
@llucax
Copy link
Contributor Author

llucax commented Jan 27, 2025

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 27, 2025
@shsms
Copy link
Contributor

shsms commented Jan 27, 2025

Github is being weird, I had to try to merge my PR several times as well, but it worked eventually.

@llucax llucax added this pull request to the merge queue Jan 28, 2025
Merged via the queue into frequenz-floss:v1.x.x with commit 0ba3a3c Jan 28, 2025
6 checks passed
@llucax llucax deleted the gh-arm branch January 28, 2025 08:14
@llucax llucax added this to the v1.0.0-rc1600 milestone Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) type:tech-debt Improves the project without visible changes for users

Projects

Development

Successfully merging this pull request may close these issues.

4 participants