Skip to content
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

Merged
merged 1 commit into from
Jun 25, 2016
Merged

Trim down the Travis build #83

merged 1 commit into from
Jun 25, 2016

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Jun 25, 2016

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.....

@dtolnay
Copy link
Member Author

dtolnay commented Jun 25, 2016

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
Copy link
Member

@oli-obk oli-obk Jun 25, 2016

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?

Copy link
Member Author

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.

@oli-obk
Copy link
Member

oli-obk commented Jun 25, 2016

Is there any point in running benchmarks on travis?

@@ -7,6 +7,11 @@ rust:
- beta
- nightly
Copy link
Member Author

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.

@dtolnay
Copy link
Member Author

dtolnay commented Jun 25, 2016

Is there any point in running benchmarks on travis?

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 cargo bench locally. The way I have it, it adds no time to the Travis build because it runs in parallel with the other three builds.

@oli-obk
Copy link
Member

oli-obk commented Jun 25, 2016

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+

@homu homu merged commit 9dce160 into serde-rs:master Jun 25, 2016
homu added a commit that referenced this pull request Jun 25, 2016
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.....
@dtolnay dtolnay deleted the travis branch June 25, 2016 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants