Skip to content

Instantly share code, notes, and snippets.

@EricRahm EricRahm/build.sh
Created May 20, 2019

Embed
What would you like to do?
Build script for testing cargo pipelining
#!/usr/bin/env sh
# Switch to the nightly builds
rustup default nightly
rustc -V
cargo -V
# Baseline runs without pipelining
unset CARGO_BUILD_PIPELINING
echo -n "Initial run to populate ccache..."
./mach -l build.log build > /dev/null
echo "done"
echo "Baseline run without pipelining"
echo "==============================="
echo "CARGO_BUILD_PIPELINING=$CARGO_BUILD_PIPELINING"
multitime -q -n 6 -r 'echo done && echo -n clobbering... && ./mach clobber && echo done && echo -n building...' ./mach -l build.log build
echo ""
echo "Running with pipelining"
echo "======================="
export CARGO_BUILD_PIPELINING=true
echo "CARGO_BUILD_PIPELINING=$CARGO_BUILD_PIPELINING"
multitime -q -n 6 -r 'echo done && echo -n clobbering... && ./mach clobber && echo done && echo -n building...' ./mach -l build.log build
unset CARGO_BUILD_PIPELINING
rustup default stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.