ci: restore cache in one action

This commit is contained in:
Dmitriy Pleshevskiy 2022-07-21 11:03:27 +03:00
parent 4fa80dcc5a
commit 17f39253d0
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -22,6 +22,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Restore cargo cache
uses: actions/cache@v2.1.7
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }}
- name: Toolchain
uses: actions-rs/toolchain@v1
with:
@ -29,18 +38,6 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }}
- name: Build
run: cargo build --verbose
@ -61,30 +58,21 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install latest stable
- name: Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: clippy
- name: Cache cargo registry
uses: actions/cache@v1
- name: Restore cargo cache
uses: actions/cache@v2.1.7
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargoo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-stable-${{ hashFiles('Cargo.lock') }}
- name: Check clippy
uses: actions-rs/cargo@v1
@ -98,13 +86,22 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install latest stable
- name: Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Restore cargo cache
uses: actions/cache@v2.1.7
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-stable-${{ hashFiles('Cargo.lock') }}
- name: Check format
uses: actions-rs/cargo@v1
with: