Skip to content
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

CI: Migrate test-new to meson #39641

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Mar 7, 2025

Migrates the test-new workflow to use Meson. The Meson build system rebuilds faster and leverages standard tools like ccache for caching Cython file compilation. The github workflow is also considerably easier to read and maintain now.

To ensure reliability, pushing the Docker image in the build workflow has been disabled, as it was continuously clogging the GitHub cache (limited to 10GB, while each cached image consumes several gigabytes). This change also resolves intermittent workflow failures caused by unsuccessful image pushes.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@tobiasdiez tobiasdiez mentioned this pull request Mar 7, 2025
5 tasks
test-long:
runs-on: ubuntu-latest
needs: [test-new]
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't remove this defeat the whole point of test-new? (that you do a fast-fail when there's a trivial error to notify the pull request author to fix it, so you don't burn CPU on testing the rest of the files)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The main point of test-new is that it provides quick feedback for devs. But I'm planning to also move these "long" tests to meson in a follow-up and then it's indeed a good idea to make run only after all other normal tests were passing.

@user202729
Copy link
Contributor

leverages standard tools like ccache for caching Cython file compilation

By the way, the only benefit of ccache I can see is when you git checkout a far away branch, does something, then git checkout back — the reason why meson would have taken longer without ccache is that the file modification time are bumped.

If you're already using docker then ccache should be useless. Also there's a risk of some hidden cache stale issue (there'd better be a rebuild from scratch every release at least)

@tobiasdiez
Copy link
Contributor Author

leverages standard tools like ccache for caching Cython file compilation

By the way, the only benefit of ccache I can see is when you git checkout a far away branch, does something, then git checkout back — the reason why meson would have taken longer without ccache is that the file modification time are bumped.
If you're already using docker then ccache should be useless. Also there's a risk of some hidden cache stale issue (there'd better be a rebuild from scratch every release at least)

The meson workflow is not using docker and thus ccache is used to cache the compilation (more precisely: cython is still run on all cython files, but the compilation of the resulting c/c++ is cached).

Copy link

github-actions bot commented Mar 7, 2025

Documentation preview for this PR (built with commit b9feb17; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Contributor

@user202729 user202729 left a comment

Choose a reason for hiding this comment

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

Sure why not, at least it's not slower than the current test-new.

The missing feature is "only run test-long (& full test with meson) if test-new succeeds" but… the only disadvantage is wasted electricity, I suppose.

@tobiasdiez
Copy link
Contributor Author

Thanks @user202729 for the review. I'm setting this now to "positive review", hope you are okay with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants