-
Notifications
You must be signed in to change notification settings - Fork 571
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
Trim down the Travis build #83
Conversation
Related: rust-lang/cargo#2234 Cargo builds build-dependencies (syntex) in release mode when building benchmarks. |
(cd json_tests && travis-cargo --only nightly bench -- features nightly-testing) && | ||
(cd json_tests && travis-cargo --only nightly bench -- --features "nightly-testing with-syntex" --no-default-features) && | ||
(cd json && travis-cargo --only stable doc) | ||
if [ -z $BENCH ]; then |
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 don't speak bash... What does the -z do, and why is the bench flag set to 1 on 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.
-z
means empty i.e. BENCH.len() == 0
. We run four builds: the three release channels stable beta and nightly, and a fourth one that is nightly with an environment variable BENCH=1. The bench build was the longest so I split it out into it's own build to increase parallelism. The stable/beta/nightly builds all run the first part of this if
statement. The BENCH=1 build runs the second part which is just travis-cargo bench
.
Is there any point in running benchmarks on travis? |
@@ -7,6 +7,11 @@ rust: | |||
- beta | |||
- 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.
This is where the first three builds are declared.
Basically to make sure it compiles. Also I guess to have a record of performance to look back on when trying to identify what commit introduced a performance regression - it is faster than running |
Iirc cargo test also compiles the benches. But having the travis logs for future reference is a good idea. Thanks for the detailed explanation @homu r+ |
Trim down the Travis build This takes us from 28 minutes to 5 minutes. The biggest savings is not compiling all of Clippy + Syntex in release mode for the benchmark.....
This takes us from 28 minutes to 5 minutes. The biggest savings is not compiling all of Clippy + Syntex in release mode for the benchmark.....