test-dev-context-only-utils.sh 1.2 KB

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. set -eo pipefail
  3. source ./ci/_
  4. (unset RUSTC_WRAPPER; cargo install --force --git https://github.com/anza-xyz/cargo-hack.git --rev 5e59c3ec6c661c02601487c0d4b2a2649fe06c9f cargo-hack)
  5. # Here, experimentally switch the sccache storage from GCS to local disk by
  6. # `unset`-ing gcs credentials so that sccache automatically falls back to the
  7. # local disk storage.
  8. unset SCCACHE_GCS_KEY_PATH SCCACHE_GCS_BUCKET SCCACHE_GCS_RW_MODE SCCACHE_GCS_KEY_PREFIX
  9. # sccache's default is 10G, but our boxes have far more storage. :)
  10. export SCCACHE_CACHE_SIZE="200G"
  11. # Disable incremental compilation as this is documented as not-compatible with
  12. # sccache at https://github.com/mozilla/sccache/blob/v0.9.1/README.md#rust
  13. # > Incrementally compiled crates cannot be cached.
  14. export CARGO_INCREMENTAL=0
  15. _ sccache --show-stats
  16. scripts/check-dev-context-only-utils.sh check-all-targets "$@"
  17. scripts/check-dev-context-only-utils.sh check-bins-and-lib "$@"
  18. # This shows final stats while stopping the sccache background server as well
  19. # for later normal sccache use (if any). Remember that sccache is now
  20. # temporarily and experimtally running with the local disk storage.
  21. _ sccache --stop-server