-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Update Travis CI build to try building docs #7753
Conversation
- cd julia && make -C doc html SPHINXOPT="-W" | ||
- make -C doc latexpdf SPHINXOPT="-W" | ||
- make -C doc doctest | ||
- make -C doc linkcheck |
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.
Does it make sense to test documentation both in GCC and CLANG?
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.
In theory, the binaries built by gcc
and clang
could produce different output (e.g. memory addresses in printouts). If build-dependent information exists in the documentation, that should certainly be checked for.
What can we do about all the random numbers? |
Hidden Or just have them in a code block instead of a doctest block. |
If you meant tests using If you meant things like line numbers and method counts, I don't have any good ideas. |
Of course we want to err on the side of testing more things automatically, but we'll have to see how annoying the changing line numbers are in practice. I'm afraid it might be very annoying. |
Actually I have an idea about the line numbers. Since we use our own Python classes anyway to run the tests in JuliaDoc, it is possible to intercept the test check here with a custom |
On an unrelated note, it also occurs to me that JuliaDoc itself could be a good candidate for using |
That would be conditional on pyjulia actually working :-(. I haven't looked at it in months and it is probably broken, although one intrepid windows user has gotten it to work for him. |
3923b6a
to
a7bba61
Compare
c0a45c2
to
8333051
Compare
6c7c7e3
to
1a4c02f
Compare
03983e0
to
aa7a437
Compare
I've rebased and updated this PR so that only the basic HTML and PDF docbuilds are run. I realize that these tests add more time to the Travis build, but it takes only about a minute or two to run and will catch syntax errors in changes to the documentation, which are unfortunately quite frequent since not many people are familiar with the nuances of ReStructuredText. As for the doctests, I think running them as part of the |
I'll remove the gcc line, it must have been left over from the rebase. The pip lines are necessary to install sphinx and the doc theme correctly. |
aa7a437
to
778960f
Compare
Oh, the new virtualenv setup means that it's no longer necessary to install sphinx manually. Let me try that. |
778960f
to
1eaae76
Compare
[av skip]
1eaae76
to
6887e04
Compare
Alternative idea; We could add an entry to the build environment matrix that is a "no-arch" run, that just builds the docs and not Julia. It can then run in parallel to the other jobs, and won't run multiple times. |
That's exactly the approach I took in #9553, which I am increasingly convinced no one other than me has ever looked at. |
Sounds good. I think @tkelman proposed something similar in one of the other issues. This afternoon I played around with trying to make Travis short-circuit the build if only doc files were changed. (see the cjh/probe-travis branch) I've figured out what to do as a git pre-push hook here, but Travis appears to choke on the |
I don't know where you're getting the inputs from, but note that
If you try to write too much bash in yaml you will only end up tearing your hair out. Write a script under |
The pre-push hook is for my local use with
I did notice this and tried to substitute as proxy the nearest branch point. I tried the magic incantation from this SO thread
Knowing the parent branch allows you to retrieve the commit at the branch point with
This works locally for me, in that branches off master gave PARENT_BRANCH=master and similarly for release-0.3, but not on Travis https://travis-ci.org/JuliaLang/julia/builds/49214143#L136 I think owing to the clone being shallow. |
There's also something a little strange about the way remotes work on Travis that can make |
I'll leave my git experiments here for now. It's time to ford the 3' snowdrifts in search of suds and vittles. |
No longer relevant, we've been building the docs in |
But not the manual or on Travis still. |
Good point, guess we could reopen and/or try again. |
This PR adds automatic doctest builds to Travis. By including the doctests as part of the Travis test suite, the hope is to prevent the documentation examples from becoming so far out of sync with reality as to require serious manual updating, as in #7693.
This is the brute force solution to #7691.
Four documentation tests are included here: