ci: add cache

This commit is contained in:
MedzikUser 2022-03-14 19:51:07 +01:00
parent 95a377d4a8
commit c4cf7c08bf
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
3 changed files with 22 additions and 3 deletions

View File

@ -10,3 +10,7 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
[*.yml]
indent_style = space
indent_size = 2

View File

@ -70,7 +70,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
- name: Checkout
uses: actions/checkout@v3
- name: Setup Rust toolchain
@ -79,6 +79,13 @@ jobs:
toolchain: stable
target: ${{ matrix.target }}
- name: Cache
uses: actions/cache@v2
id: cache
with:
path: target
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
- name: cargo build
uses: actions-rs/cargo@v1
with:
@ -136,7 +143,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
- name: Checkout
uses: actions/checkout@v3
- name: Setup Rust toolchain

View File

@ -23,7 +23,8 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
@ -33,6 +34,13 @@ jobs:
override: true
components: rustfmt, clippy
- name: Cache
uses: actions/cache@v2
id: cache
with:
path: target
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
- name: cargo build
uses: actions-rs/cargo@v1
with: