-
Notifications
You must be signed in to change notification settings - Fork 313
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
[WIP] Add Github workflow: "Pull Request Docs Check" #2499
Conversation
I think this is going to need to be reworked to include something like with:
build-command: "sphinx-build -b html docsrc/ _build -f /tmp/sphinx.log " but with the command we use. Unfortunately that's not straightforward because of our using the |
1bf58da
to
63a73ef
Compare
This reverts commit da177a8.
As of 5008060, the only warnings were this twice:
This does NOT happen when building with the Docker image on my Mac. I thus tried to get the workflow to run on the Docker image, and I'm not sure if I succeeded. I definitely see the container getting initialized and torn down, but I can't get that warning to go away, and now it's not marking the check as failed (as I want it to, and as it did in 5008060). |
@billsacks You're the one who set up the doc-builder system, right? Would you be able to shed any light on this? |
Sorry, can you clarify what you want me to shed light on? Do you mean #2499 (comment)? If so, that doesn't look familiar and I'm not sure what would be causing it - sorry. Yes, I created the doc-builder library. Does that seem to be the source of the problems? In this use case, the doc-builder library might be adding more complexity than help: the main things it helps with are (1) Instantiating a docker container for some steps of the build process; and (2) Building versioned documentation in the correct location. (2) seems irrelevant here, and for (1) if you're running this whole GitHub Action within a Docker container (are you?) then you're not gaining much from doc-builder (and if you do use doc-builder, you should do it without the |
Hi @billsacks, looking at my post in the light of day I'm sorry I was so vague! The doc-builder library does NOT seem to be the source of any problem. Rather, I was thinking that indicated you had more experience with building the docs in general, which is what I'm having issues with. Specifically, the issue is that I want the new Github action to only throw errors/warnings that get thrown when using the Docker method, but it throws a new one: That "Failed to create a cross reference" warning. And it's not just a difference in log level or something, because the Docker method (on my Mac, at least) does actually generate the reference. So I think I'm failing to recreate the environment and/or the build command call, but I'm not sure which. In trying to troubleshoot, I've made versions of the action that run inside and outside the container. However, both give that warning. I'm actually not even 100% sure the container task is actually running inside the container! So I guess my question is: If you're familiar enough with Github actions, could you see if there's anything obviously wrong with my setup for the containerized version? |
3216827
to
92e8cba
Compare
bc0a2f1
to
a5d155f
Compare
Current status: I don't know why the original action (
Going to try removing all |
|
Trying to avoid problem creating _build here: ESCOMP/CTSM#2499 (comment)
Re-running after having the Dockerfile make |
I'm not that familiar with GitHub actions, but what you have looks reasonable to me. (You could add something like Have you checked the sphinx-build command that's printed by the 'make html' step – e.g., something like:
I doubt that would shine any light on this, but comparing that command in the GitHub action vs. outside it could confirm that you're invoking things correctly. |
Works in conjunction with latest change to my fork of the Github action.
Thanks, @billsacks! It looks like the issue was actually me not mounting the build directory in the container, but trying to make it IN the container. |
Well, it works on my machine at least (testing with |
Closing, as this functionality will come in on #2809. |
Description of changes
Adds a Github workflow that checks whether a PR has any documentation build errors.
To resolve existing docs errors in order for this new check to pass:
Specific notes
Contributors other than yourself, if any: None
CTSM Issues Fixed (include github issue #): None
Are answers expected to change (and if so in what way)? None
Any User Interface Changes (namelist or namelist defaults changes)? No
Testing performed, if any: In progress on this PR page.