mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 06:42:33 +00:00
Merge #1843
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:
commit
fe1ce65272
3 changed files with 17 additions and 5 deletions
9
.github/workflows/benchmark.yml
vendored
9
.github/workflows/benchmark.yml
vendored
|
@ -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
|
||||
|
|
7
.github/workflows/linux.yml
vendored
7
.github/workflows/linux.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue