-
Notifications
You must be signed in to change notification settings - Fork 47
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
docs: Add Makefile generation target and CI testing #124
Conversation
Would it make sense to add the documentation build process to Github CI? We can make the build fail on warnings with:
|
Yes, that would be very positive, agreed. |
IIUC from https://doc.rust-lang.org/cargo/commands/cargo-doc.html, we will not generate the
Indeed, using |
Fix a broken link in the generated documentation for `RawAllocMapping`, which will cause a CI break with the upcoming changes in coconut-svsm#124. Signed-off-by: Carlos López <[email protected]>
We still need to fail, at least in CI, if there are warnings in the build. This can be done in the Makefile: diff --git a/Makefile b/Makefile
index 8725dcf..6beaf91 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ test:
cargo test --target=x86_64-unknown-linux-gnu
doc:
- cargo doc --open --all-features --document-private-items
+ RUSTDOCFLAGS="-D warnings" cargo doc --open --all-features --document-private-items
utils/gen_meta: utils/gen_meta.c
cc -O3 -Wall -o $@ $< Or in Github Actions: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index ca67d19..04121e9 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -57,3 +57,5 @@ jobs:
- name: Check documentation
run: make doc
+ env:
+ RUSTDOCFLAGS: -D warnings Not sure which one is the best approach. |
Add Makefile target to generate cargo documentation and update README accordingly. Signed-off-by: Carlos Bilbao <[email protected]>
Check documentation didn't break on pull requests. Signed-off-by: Carlos Bilbao <[email protected]>
Thanks @00xc I have updated setting RUSTDOCFLAGS in the workflow and rebased. But we got:
which makes me think we actually don't want to fail on warnings, right? |
I would want them, it's just a matter of fixing remaining warnings before merging this. |
Fix a broken link in the generated documentation for `RawAllocMapping`, which will cause a CI break with the upcoming changes in coconut-svsm#124. Signed-off-by: Carlos López <[email protected]>
Fix a broken link in the generated documentation for `RawAllocMapping`, which will cause a CI break with the upcoming changes in coconut-svsm#124. Signed-off-by: Carlos López <[email protected]>
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.
Remember to merge #124 first :-)
@00xc but I don't think that this warning is generated by this PR?
|
No, it was introduced before. It should be fixed by #144. |
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. Once the PR mentioned above is merged CI should no longer fail.
Add Makefile target to generate cargo documentation and update README accordingly.