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

Local readthedocs #4542

Merged
merged 2 commits into from
Aug 19, 2024
Merged

Local readthedocs #4542

merged 2 commits into from
Aug 19, 2024

Conversation

KrystalDelusion
Copy link
Member

What are the reasons/motivation for this change?
Yosys ReadtheDocs is currently built from a separate repo, yosys-cmd-ref. This would occasionally lead to problems with people looking at the wrong repository for the documentation source, since yosys-cmd-ref is automatically updated from this repo with the verific runner. This was being done since a portion of the documentation requires yosys to be compiled in order to generate, which would take too long for the ReadtheDocs builder and would generate without verific compatibility which also changes the generated documentation.

Because the verific runner would only update documentation from the main branch, the current setup also makes it more difficult to preview documentation changes for, e.g., yosys PRs. The yosys-cmd-ref repo also ends up with a lot of code-generated images and such which get committed/updated from time to time.

Explain how this is achieved.
This PR provides the necessary framework to allow ReadtheDocs to be built from the Yosys repository directly, making use of the rtds-action to create build artifacts and trigger ReadtheDocs to build using those artifacts; negating the need for a second repository.

If applicable, please suggest to reviewers how they can test the change.
These docs were built from my fork of this repo with all of the expected artifacts (compiled on the standard git runner without verific). And another example demonstrating how pr previews could work with this.

If this PR is passing all checks, it should be safe to merge into main. The current status of the ReadtheDocs integration is that the verific runner builds and uploads the artifact needed, and can trigger the ReadtheDocs webhook to build, but ReadtheDocs rejects building because krys/rtd is not a branch that it recognises as needing to publish. Once this gets merged into main, I suspect that the verific runner will run the merged commit, triggering the webhook from the main branch, which will then update the 'latest' version of the ReadtheDocs. If for some reason that breaks, manually rebuilding on ReadtheDocs will continue to use the yosys-cmd-ref repo.

Use rtds-action instead of yosys-cmd-ref repo.
Add rtds_action to docs configuration.
Add `.readthedocs.yaml`.
Update `DOCS_USAGE_` make target to be able to use pre-generated executables without forcing a remake.
Copy link
Member

@mmicko mmicko left a comment

Choose a reason for hiding this comment

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

Looks good.
Reminder for me TODO after release:

  • remove access secrets on this repo
  • yosys-cmd-ref - probably we can just archive this one
  • also disable readthedocs old webhooks that are not used any more
  • disable yosyshq-ci user access to yosys-cmd-ref

@nakengelhardt nakengelhardt merged commit 7f08a29 into main Aug 19, 2024
37 checks passed
@nakengelhardt nakengelhardt deleted the krys/rtd branch August 19, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants