-
Notifications
You must be signed in to change notification settings - Fork 206
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
add build tests for the doc-build #1309
Conversation
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.
What would be valid assertions here?
See #822 for some suggestions.
should we test add-essential-files separately?
I don't know how useful this is to test. It depends on the toolchain used, so rustdoc can break it at any time even if the tests pass in CI. I would rather have #1302.
My current (not yet validated) assumption is that the container and rustwide .workspace will only set up once per job, and not per test-case.
Yes, it will take much too long otherwise. Even downloading crates-build-env
takes a very long time, if there's a way to change that for tests it would be useful.
What would be the best rust-way of splitting them and only running them on CI? Not sure if #[ignore] and cargo test -- --ignored is too hidden
This seems reasonable as a first step.
Landing an MVP sounds good to me. @pietroalbini I'd be interested to know what you think about this - it's closer to #524 than anything else, but it's better than not having tests at all. It does add an extra 10 minutes to CI unfortunately. @syphar could you try switching the docker image to something smaller for CI? Maybe a base ubuntu:20.04 image? Right now I think |
I'm happy to add some more tests, since it works generally.
I'll give it a try (ignore the notifications until I ping you, I'll have to test with commits on github again) |
834542b
to
256603d
Compare
@jyn514 short summary about the status quo:
Next improvements could be getting rid of the 2 min cargo-sweep install, but that I would look at separately. |
I don't have a chance to look into this more, but there are a couple of suggestions I have here:
|
I'll try that too, thanks @pietroalbini !
I tried that (with this action), and likely due to the other (s3, db) images the build actually became slower than without the caching. (I might have misunderstood what you meant, or don't know enough about docker to find a loophole here). |
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.
I think we can address anything else in follow-ups :)
The time for this went down from 10 to 6 minutes after the smaller docker image and fast_init(true)
- I'm not super happy it takes that long, but it's definitely better than not having tests at all.
We don't have any tests for the build-process, here we can add some.
I don't know the build-process in detail, so
add-essential-files
separately?My current (not yet validated) assumption is that the container and rustwide
.workspace
will only set up once per job, and not per test-case.Also, these tests would definitely fail on macs, and also on some linux-machines (cc @Nemo157 ). What would be the best rust-way of splitting them and only running them on CI? Not sure if
#[ignore]
andcargo test -- --ignored
is too hidden