-
Notifications
You must be signed in to change notification settings - Fork 432
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
Extend CI configuration #563
Conversation
77677f8
to
083cdfb
Compare
f720c3c
to
1841db9
Compare
Notable changes here:
This is the most comprehensive set I could come up with, unless we start to make our own Qemu images of all supported OSes and start running tests on these. I.e. do a lot of work to set it up and maintain. The number of Travis builders is reduced from 11 to 8, all usually done in < 4 minutes. The 8 Travis builders:
|
9a6139c
to
132ca44
Compare
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.
Few comments. I'll finish reviewing later. But thanks for doing this; it was very much needed!
.travis.yml
Outdated
# | ||
# OPERATING SYSTEMS | ||
# Goal: test on many operating systems, to verify the OsRng code, which is | ||
# mostly architecture-independend. |
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.
dependent
.travis.yml
Outdated
# One builder cross-compiles for many of the remaining OSes, which ensures we | ||
# keep building, but doesn't run tests. | ||
# OSes supported by Rand but which we can't cross-compile because there | ||
# is no pre-build standard library available: Dragonfly BSD, Haiku, OpenBSD. |
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.
pre-built
.travis.yml
Outdated
# is no pre-build standard library available: Dragonfly BSD, Haiku, OpenBSD. | ||
# | ||
# CRATE FEATURES, TESTS, AND SUB-CRATES | ||
# Goal: Run unit tests, doctests, examples, and benchmarks (converted to tests) |
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.
and test benchmarks
.travis.yml
Outdated
# combinations of features. | ||
# Tests run on rand: | ||
# - test no_std support, but only the unit tests: | ||
# `cargo test --lib --no-default-features` |
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.
Do we want --lib or --tests?
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.
On master we have this comment:
# TODO: use --tests instead of --lib on more recent compiler
So I guess it depends on the minimal Rust version we are supporting.
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.
They do exactly the same (because we are only a library), but --lib
is available in Rust 1.22.0, --tests
isn't.
Thank you, maybe I should use the spell checker in gedit once in a while... |
Should we allow failures on nightly? I think those failures are currently a bit of a distraction... |
We are just unlucky at the moment. The alloc crate, wasm-bindgen and simd are all working towards stabilization, and shouldn't keep making breaking changes as often the the last few weeks. The nightly builders also do extra work, like generating the (most complete) documentation and testing the benchmarks. I wouldn't want to see them easily ignored (we already ignore them anyway when the fix is somewhat outside our control). |
I think we should have a test that enables all features. Currently it is easy to add a new feature and forget to make sure the tests actually run. |
# - test no_std support, but only the unit tests: | ||
# `cargo test --lib --no-default-features` | ||
# - run unit tests and doctests with all features which are available on stable: | ||
# `cargo test --features=serde1,log` |
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.
i128_support
is also available on recent stable compilers (though see comments in #566; this may get enabled by default)
.travis.yml
Outdated
# `cargo test --examples` | ||
# Additional tests on nightly: | ||
# - run unit tests and doctests with all features which are available on nightly: | ||
# `cargo test --features=serde1,log,nightly` |
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.
As @vks says, may make sense just to use --all-features
here
.travis.yml
Outdated
- cargo test --package rand_core --no-default-features | ||
- cargo test --features serde1,log | ||
- cargo test --package rand_isaac --features=serde1 | ||
# - cargo test --package rand_xorshift --features=serde1 |
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.
This can be enabled now.
Rebased and updated. |
The past releases had a couple bugs slip by that could have been caught by CI, so I'm trying to extend it a bit.
Please ignore for now.