CI: Add some documentation to GH Actions caching
@@ -83,6 +83,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 +104,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 +117,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 +127,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 +137,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 +147,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:
