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`
This commit is contained in:
David Tolnay 2020-05-03 16:50:20 -07:00
parent 2b4355724e
commit cd836eb3ca
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -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