Test cargo incr comp
| #!/usr/bin/env bash | |
| cargo +nightly build --release 2> /dev/null | |
| rm -rf ./target/ | |
| echo 'full build' > timings.txt | |
| (time cargo +nightly build --release 2>/dev/null) 2>> timings.txt | |
| export CARGO_INCREMENTAL=1 | |
| rm -rf ./target/ | |
| echo -e '\nfull incremental build' >> timings.txt | |
| (time cargo +nightly build --release 2>/dev/null) 2>> timings.txt | |
| touch ./src/lib.rs | |
| echo -e '\ntouch lib.rs' >> timings.txt | |
| (time cargo +nightly build --release 2>/dev/null) 2>> timings.txt | |
| echo '#[allow(unused)] fn noop() {}' >> ./src/lib.rs | |
| echo -e '\nadd noop' >> timings.txt | |
| (time cargo +nightly build --release 2>/dev/null) 2>> timings.txt | |
| # reset to earlier state | |
| git checkout src/lib.rs | |
| cat timings.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment