Skip to content

Commit

Permalink
ci: Add cargo cache
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp-caspers committed Oct 14, 2024
1 parent a829356 commit f1a0104
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cargo build
uses: devcontainers/[email protected]
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci_format_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,14 @@ jobs:
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Verify Code is formatted
run: cargo fmt -- --check
9 changes: 9 additions & 0 deletions .github/workflows/ci_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ jobs:
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ jobs:
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ jobs:
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand Down

0 comments on commit f1a0104

Please sign in to comment.