Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Optimize build duration #203

Merged
merged 2 commits into from
Aug 16, 2018
Merged

Conversation

thomaseizinger
Copy link
Contributor

@thomaseizinger thomaseizinger commented Aug 8, 2018

Through the use of sccache and rsync, we can greatly speed up our builds!

We simply download the shared compilation cache from the VM before the build and upload the changes after the build. This takes not even 1 minute in total but greatly speeds up the build (only takes about 2 minutes then). In addition, the actual cache on Travis is much smaller and thus up- and downloaded faster!

Resolves #189.

@thomaseizinger thomaseizinger force-pushed the infrastructure/faster-builds-no-cache-target branch from 1fa15d3 to 69c4b5e Compare August 8, 2018 07:58
@D4nte
Copy link
Contributor

D4nte commented Aug 13, 2018

ready for review?

@thomaseizinger
Copy link
Contributor Author

Not yet, will announce when!

@thomaseizinger thomaseizinger changed the title [WIP] Optimize build duration Optimize build duration Aug 13, 2018
D4nte
D4nte previously approved these changes Aug 15, 2018
Copy link
Contributor

@D4nte D4nte left a comment

Choose a reason for hiding this comment

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

I know it's WIP :)


ALL_WORKSPACE_CRATES=$(find vendor application -name Cargo.toml -exec toml --nocolor {} package.name \;)

for CRATE in $ALL_WORKSPACE_CRATES;
Copy link
Contributor

Choose a reason for hiding this comment

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

[must] semi-colon is not needed thanks to the newline

do
CRATE=$(echo "$CRATE" | tr -d '"')

ARTIFCATS=$(find target/debug/deps -name "*$CRATE*")
Copy link
Contributor

Choose a reason for hiding this comment

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

[must] typo: ARTIFACTS


for ARTIFACT in $ARTIFCATS;
do
rm -rf $ARTIFACT
Copy link
Contributor

Choose a reason for hiding this comment

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

[must] add double quotes

@thomaseizinger thomaseizinger force-pushed the infrastructure/faster-builds-no-cache-target branch 8 times, most recently from 75d597e to b0c2cd6 Compare August 15, 2018 10:04
@thomaseizinger
Copy link
Contributor Author

@D4nte @bonomat @LLFourn Ready to review!

thomaseizinger and others added 2 commits August 16, 2018 11:09
We use sccache and synchronize its folder with our own VM. This
greatly speeds up the builds!
@bonomat bonomat force-pushed the infrastructure/faster-builds-no-cache-target branch from 13e3c97 to a32f03a Compare August 16, 2018 01:14
@bonomat bonomat merged commit c20d4c3 into master Aug 16, 2018
@bonomat bonomat deleted the infrastructure/faster-builds-no-cache-target branch August 16, 2018 01:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants