diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9069dde357a..119d733ec1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: PERCY_PROJECT: crates-io/crates.io steps: - - uses: actions/checkout@v2-beta + - uses: actions/checkout@v2 - uses: actions/cache@v1 with: @@ -62,13 +62,14 @@ jobs: - nightly env: + RUST_BACKTRACE: 1 DATABASE_URL: postgres://postgres:@localhost/cargo_registry_test TEST_DATABASE_URL: postgres://postgres:@localhost/cargo_registry_test CARGO_INCREMENTAL: 0 RUSTFLAGS: "-C debuginfo=0 -D warnings" steps: - - uses: actions/checkout@v2-beta + - uses: actions/checkout@v2 - name: Cleanup pre-installed Rust toolchains # The pre-installed toolchain is under root permission, and this would @@ -83,6 +84,18 @@ jobs: fi echo "::add-path::$HOME/.cargo/bin" + # FIXME: Nightly and beta channels have high churn. The cache quickly expires, but there is + # no way (that I can find) to overwrite an existing cache. There is also no way to + # dynamically include the latest version number for a release channel into the cache `key` + # value. Once a cached release becomes stale, every job will begin downloading the latest + # release from upstream and the cache becomes useless for that channel. + # + # Including `hashFiles('**/Cargo.lock')` below is a hack. Ideally, we would change the `key` + # for each channel at the same rate as the release cadence for that channel. For the stable + # channel this is too frequent and for the nightly channel (and probably beta as well) it is + # not often enough. + # + # Current size as of 2019-12-23: ~123 MB - name: Cache rustup uses: actions/cache@v1 with: @@ -92,6 +105,10 @@ jobs: ${{ runner.os }}-rustup-${{ matrix.rust }}- ${{ runner.os }}-rustup- + # This step has the same tradeoffs as `Cache rustup`, however the cache size is significantly + # smaller. The installed `diesel` binary is also stored here. + # + # Current size as of 2019-12-23: ~6 MB - name: Cache cargo binaries uses: actions/cache@v1 with: @@ -101,6 +118,7 @@ jobs: ${{ runner.os }}-cargo-bin-${{ matrix.rust }}- ${{ runner.os }}-cargo-bin- + # Current size as of 2019-12-23: ~77 MB - name: Cache cargo registry cache uses: actions/cache@v1 with: @@ -110,6 +128,7 @@ jobs: ${{ runner.os }}-cargo-registry-cache-${{ matrix.rust }}- ${{ runner.os }}-cargo-registry-cache- + # Current size as of 2019-12-23: ~38 MB - name: Cache cargo registry index uses: actions/cache@v1 with: @@ -119,6 +138,7 @@ jobs: ${{ runner.os }}-cargo-registry-index-${{ matrix.rust }}- ${{ runner.os }}-cargo-registry-index- + # Current size as of 2019-12-23: ~4 MB - name: Cache cargo git db uses: actions/cache@v1 with: @@ -128,6 +148,7 @@ jobs: ${{ runner.os }}-cargo-git-db-${{ matrix.rust }}- ${{ runner.os }}-cargo-git-db- + # Current size as of 2019-12-23: ~336 MB - name: Cache cargo build uses: actions/cache@v1 with: diff --git a/.travis.yml b/.travis.yml index ea12b7cc85c..5ab69e0c5d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ before_cache: script/ci/prune-cache.sh env: global: + - RUST_BACKTRACE=1 - JOBS=1 # See https://git.io/vdao3 for details. - DATABASE_URL=postgres://postgres:@localhost/cargo_registry_test - TEST_DATABASE_URL=postgres://postgres:@localhost/cargo_registry_test