Skip to content

Commit

Permalink
Add caching to CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Raniz85 committed Dec 14, 2022
1 parent 3ff541a commit f2e47d4
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys:
- ${{ runner.os }}-cargo
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
Expand Down Expand Up @@ -41,6 +51,16 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys:
- ${{ runner.os }}-cargo
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
Expand All @@ -61,6 +81,16 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys:
- ${{ runner.os }}-cargo
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
Expand All @@ -79,6 +109,16 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys:
- ${{ runner.os }}-cargo
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
Expand All @@ -99,6 +139,16 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys:
- ${{ runner.os }}-cargo
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand All @@ -121,6 +171,16 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys:
- ${{ runner.os }}-cargo
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
Expand Down

0 comments on commit f2e47d4

Please sign in to comment.