1843: Improve cache steps in github actions r=CreepySkeleton a=pksunkara



Co-authored-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
This commit is contained in:
bors[bot] 2020-04-20 14:49:48 +00:00 committed by GitHub
commit fe1ce65272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 5 deletions

View file

@ -15,10 +15,13 @@ jobs:
uses: actions/checkout@v2
with:
ref: master
- name: Ready cache
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
- name: Cache cargo
uses: actions/cache@v1
id: cache
with:
path: /home/runner/.cargo
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Bench base
run: cargo bench -- -R bencher | tee output.txt
@ -43,10 +46,14 @@ jobs:
external-data-json-path: ./benchmark-data.json
github-token: ${{ github.token }}
annotate-always: true
- name: temporary
run: rm ~/.cargo/bin/cargo-cache
- name: Install cargo-cache
uses: actions-rs/install@v0.1
if: steps.cache.outputs.cache-hit != 'true'
with:
crate: cargo-cache
use-tool-cache: true
- name: Cleanup cache
if: steps.cache.outputs.cache-hit != 'true'
run: cargo cache -a

View file

@ -16,10 +16,13 @@ jobs:
toolchain: stable
- name: Checkout
uses: actions/checkout@v2
- name: Ready cache
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
- name: Cache cargo
uses: actions/cache@v1
id: cache
with:
path: /home/runner/.cargo
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Test
uses: actions-rs/cargo@v1
@ -28,8 +31,10 @@ jobs:
args: --release --features "yaml unstable"
- name: Install cargo-cache
uses: actions-rs/install@v0.1
if: steps.cache.outputs.cache-hit != 'true'
with:
crate: cargo-cache
use-tool-cache: true
- name: Cleanup cache
if: steps.cache.outputs.cache-hit != 'true'
run: cargo cache -a

View file

@ -63,10 +63,10 @@ maintenance = {status = "actively-developed"}
[dependencies]
bitflags = "1.2"
unicode-width = "0.1.4"
unicode-width = "0.1"
textwrap = "0.11"
indexmap = "1.0.1"
strsim = { version = "0.9.0", optional = true }
indexmap = "1.0"
strsim = { version = "0.10", optional = true }
yaml-rust = { version = "0.4.1", optional = true }
atty = { version = "0.2", optional = true }
termcolor = { version = "1.1", optional = true }