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

Speed up building and running of tests #383

Merged
merged 3 commits into from May 3, 2021

Conversation

sbillig
Copy link
Collaborator

@sbillig sbillig commented Apr 30, 2021

What was wrong?

Tests take a long time to run.

How was it fixed?

Mostly by telling cargo to build solc with optimizations for dev builds. I also moved the integration tests into a single module (and thus a single binary), to cut down on the time spent linking the test binaries, removed some dependencies and updated the rest.

In practice, this will slow down the build of solc in favor of much faster test execution. I'm not exactly sure by how much, because I'm sick of timing builds :). If solc is built using sccache (which will now happen automatically, if sccache is installed), then every build after the first will be much faster than it was prior to this pr.

Times on my laptop, before:
(with rust artifacts cached via sccache, but not solc because it wasn't possible/easy prior to g-r-a-n-t/solc-rust#2)

cargo clean && cargo test --workspace --all-features: 687s
cargo test --workspace --all-features: 85s

after:
(with rust and solc cached via sccache)
cargo clean && cargo test --workspace --all-features 176s
cargo test --workspace --all-features 18s

@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2021

Codecov Report

Merging #383 (9de205a) into master (2960a12) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #383   +/-   ##
=======================================
  Coverage   86.30%   86.30%           
=======================================
  Files          67       67           
  Lines        4032     4032           
=======================================
  Hits         3480     3480           
  Misses        552      552           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2960a12...9de205a. Read the comment docs.

Copy link
Collaborator

@cburgdorf cburgdorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. You know a whole lot of tricks and tools man 👍

@g-r-a-n-t g-r-a-n-t merged commit ec2ee41 into ethereum:master May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants