Skip to content

Instantly share code, notes, and snippets.

@EricRahm
Created May 20, 2019 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EricRahm/d0bcedc0af5fcbd33dbedff497893cee to your computer and use it in GitHub Desktop.
Save EricRahm/d0bcedc0af5fcbd33dbedff497893cee to your computer and use it in GitHub Desktop.
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