Skip to content

Parallelize test suits#198

Merged
strokovok merged 4 commits intodevelopfrom
parallelize-test-suits
Jul 23, 2021
Merged

Parallelize test suits#198
strokovok merged 4 commits intodevelopfrom
parallelize-test-suits

Conversation

@strokovok
Copy link
Copy Markdown
Member

@strokovok strokovok commented Jul 23, 2021

  • Parallelize tests using strategy.matrix
  • Fix issue with data race (copy target parts instead of symlinking). target/release and target/debug are not actually concurrency-safe, my bad

@strokovok strokovok marked this pull request as ready for review July 23, 2021 11:13
@strokovok strokovok requested a review from artob as a code owner July 23, 2021 11:13
@strokovok strokovok requested a review from birchmd July 23, 2021 11:13
Copy link
Copy Markdown
Member

@birchmd birchmd left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this! I think this is definitely a step in the right direction!

Comment thread .github/workflows/tests.yml Outdated
Comment on lines +22 to +23
mv -n target/debug/* ~/build-cache/aurora-engine/debug
mv -n target/release/* ~/build-cache/aurora-engine/release
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think no-clobber will be good enough because we may want to overwrite some files that are updated sometimes. To be honest I'm not 100% sure on this because I don't know exactly how rust compilation artifacts are represented. Regardless, I think rsync might be a better choice here.

I also think it would be good to update the whole target directory, not just debug and release because there are some other build artifacts we care about in target not under those directories (e.g. solidity build artifacts and wasm build artifacts).

Copy link
Copy Markdown
Member Author

@strokovok strokovok Jul 23, 2021

Choose a reason for hiding this comment

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

I've came to the exactly same conclusion.
Artifacts in debug in release are suffixed with some hash, so I assumed that compiler kinda only creates artifacts with new hash instead of overwriting existing ones. But it seems to me that it's not true, because cleaning build-cache and starting from scratch gives the same time result :(

So this new solution doesn't help at all, you are right. I'll delete it.
I'm now thinking about implementing the same thing that we had in actions/cache, but saving cache locally, and without using compression. I'll do this in another commit. Thanks for details!

@strokovok strokovok requested a review from birchmd July 23, 2021 13:44
Copy link
Copy Markdown
Member

@birchmd birchmd left a comment

Choose a reason for hiding this comment

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

It's not obvious to me that this will be faster because even though they are now running in parallel, they are also now building from scratch. But it probably doesn't hurt and I assume you'll bring in a new caching solution in a new PR.

Please also merge in develop and revert my needs change since it will not be needed now without the caching.

@strokovok strokovok force-pushed the parallelize-test-suits branch from 7a70ba3 to b1f60c3 Compare July 23, 2021 13:57
@strokovok strokovok merged commit fe0be5f into develop Jul 23, 2021
@strokovok strokovok deleted the parallelize-test-suits branch July 23, 2021 14:11
artob added a commit that referenced this pull request Jul 30, 2021
* JSON: fix bugs and add unit tests. (#141)
* Add storage layout debug support for `EvmErc20.sol`. (#178)
* ERC-20: forbid using invalid NEP-141 AccountID for mapping. (#179)
* Add EIP-2930 support. (#181, #182)
* Migrate all workflows to self-hosted runners. (#185)
* Speed up the workflow using build caching. (#189)
* Use the new math API host functions. (#190)
* Fix `clippy::enum_variant_names` warning. (#192)
* Add different networks to the Makefile. (#193)
* Update the network status in the README. (#194)
* Remove the toolchain installation step in workflows. (#195)
* Run all tests for all networks in CI. (#196)
* Optimize for performance instead of code size. (#197)
* Parallelize the test suites. (#198)
* Add build-caching to the testing workflow. (#201)
* Refactor tests to use Signer. (#203)
* Add options to the bench profile. (#204)
* Remove a duplicate test. (#205)
* Add a sanity test for access list handling. (#206)
* Update nearcore to the latest branch.
* Add feature gates to the SDK's new host functions.

Co-authored-by: Ahmed Ali <ahmed@aurora.dev>
Co-authored-by: Dmitry Strokov <dmitry@aurora.dev>
Co-authored-by: Evgeny Ukhanov <evgeny@aurora.dev>
Co-authored-by: Joshua J. Bouw <joshua@aurora.dev>
Co-authored-by: Kirill <kirill@aurora.dev>
Co-authored-by: Michael Birch <michael@aurora.dev>
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.

2 participants