Skip to content

Commit

Permalink
ci: decrease the github ci cache storage (#186)
Browse files Browse the repository at this point in the history
We limit the cache to the main branch, to decrease the number of created
cache while ci actions on pr.
  • Loading branch information
pythonbrad authored Mar 5, 2024
1 parent 629450d commit d284bff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
# To only cache runs from `master`
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: rustup component add llvm-tools-preview

- name: Install grcov
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2

with:
# To only cache runs from `master`
save-if: ${{ github.ref == 'refs/heads/main' }}
- if: matrix.os == 'ubuntu-latest'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
# To only cache runs from `master`
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Add components
run: rustup component add clippy
Expand Down

0 comments on commit d284bff

Please sign in to comment.