Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down