From cd836eb3ca4700d3e16b10e84a0a43ee414e7af8 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 3 May 2020 16:50:20 -0700 Subject: [PATCH] Try caching Cargo index to speed up 1.13 build This one build always took several (10+) minutes on: Updating registry `https://github.com/rust-lang/crates.io-index` --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23e1b4bc..a6f3bb6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,13 @@ jobs: steps: - uses: actions/checkout@v2 - uses: dtolnay/rust-toolchain@1.13.0 + - name: Get timestamp for cache + id: date + run: echo ::set-output name=yearmo::$(date +%Y%m) + - uses: actions/cache@v1 + with: + path: ~/.cargo/registry/index + key: cargo-registry-index-${{steps.date.outputs.yearmo}} - run: cd serde && cargo build --features rc - run: cd serde && cargo build --no-default-features - run: cd serde_test && cargo build