-
Notifications
You must be signed in to change notification settings - Fork 4
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
Various CI pipeline improvements #35
Conversation
Workflow Status ReportGenerated for commit 7e8f879 on Wed Dec 18 23:16:26 UTC 2024. In case of failure, clippy warnings and rustfmt changes (if any) will be indicated as CI check warnings in the file comparison view. Documentation: Read Online Download Coverage Report: Read Online Download Note: Online versions of documentation and coverage reports may not be available indefinitely, especially after the pull request was merged. Code Coverage ReportCoverage target is 80%. Click on the coverage badge to access the full coverage report including a source code view. Expand to view coverage statistics
Total coverage: 54.76% |
dc14687
to
7fa9b86
Compare
9bcf98e
to
05653a4
Compare
05653a4
to
7c1b0f3
Compare
Quick question to the other maintainers @JKRhb @falko17: Do you think it's worth the effort to also build the documentation and push it to GitHub Pages? If so, would it make sense to do this for every pull request or only for the Doing so for every PR might make it easier for people to review documentation changes, but would also cause many different versions of the documentation to be available at the same time. As of now, I have not implemented a cleanup mechanism to remove old coverage reports (and possible documentation builds) of merged PRs from the GitHub pages deployment. This could be seen as an advantage (you can see the coverage reports even after the PR was merged), but I'm not sure if this could also have negative implications regarding repository size. |
Hmm, I guess it cannot hurt, but I am not sure whether it has that much of a benefit 🤔 If you want to review the rendered version, I guess you could also just quickly build the documentation locally. Then again, it might be nice to have links pointing to places where the rendering has issues 🤔 I guess it comes down to how easy this is to implement.
Would it be an option to not deploy GitHub pages via a branch but via an action? I guess then we would not have to worry about repository size at all. Maybe older reports could be stored in the cache for this approach. |
Probably not that complicated, I'll see what I can do.
Deploying via an action would (if I understand it correctly) have the disadvantage that we'd only have a single deployment for all branches, i.e., pushing to one of the current branches will override the deployment of the other one. We could deploy to a different repository, but in order to do so, we would have to create an access token, as the standard |
On another note, I just noticed that I might have to make some additional changes to properly support PRs from forked repositories, so I'll set this back to the draft state. |
Hmm, yeah, I guess in that case we would need to have an action that iterates over all (active) branches/PRs and then create the documentation/coverage reports for all of them. This would probably have the main downside of being slow if there are many branches/PRs. |
I agree with @JKRhb here in that it would be nice to have, but not important enough to warrant spending significant time on, since—AFAICT—this'd only be useful for reviews (and even then, building the documentation locally doesn't take long and isn't that complicated). |
Coverage reports are now generated using grcov instead of cargo-tarpaulin as grcov (using the rust compilers instrument-coverage flag) seems to be more accurate. Additionally, the coverage report including a source code view is now deployed to GitHub pages and should be linked in the autogenerated PR comment.
140a40d
to
a86e3e9
Compare
cbbd1ae
to
d15ff33
Compare
fe283d5
to
4083855
Compare
4083855
to
5a9a1a9
Compare
This should do it, sorry for filling your inbox with notifications...
To test this PR, I had to temporarily change the default branch, as |
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.
Looks good to me! I have just three small comments.
5a9a1a9
to
0ce795b
Compare
0ce795b
to
7e8f879
Compare
Thanks for the quick review! Remaining CI pipeline failures are unrelated to this PR (see #38), so I'll go ahead and merge. |
This PR makes some larger improvements to the
libcoap-rs
CI pipeline:cargo tarpaulin
to rustc's builtin-C instrument-coverage
flag+grcov
for coverage.grcov
generates a report in both Markdown and HTML format, with the Markdown being used for the PR sticky comment and the HTML version (that allows looking at the source code directly) being deployed to GitHub Pages and linked in the sticky comment.rustfmt