-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the same cache cleanup as pola-rs (#442)
- Loading branch information
1 parent
4ae7a28
commit 7fee1c0
Showing
2 changed files
with
21 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,14 +19,8 @@ runs: | |
- name: Rust Dependency Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
save-if: ${{ github.ref == 'refs/heads/develop' }} | ||
save-if: ${{ github.ref_name == 'develop' }} | ||
shared-key: "shared" # To allow reuse across jobs | ||
cache-targets: false | ||
|
||
- name: Cargo clean | ||
shell: bash | ||
run: | | ||
cargo clean | ||
|
||
- name: Rust Compile Cache | ||
uses: mozilla-actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Taken from pola-rs/polars | ||
# Clearing caches regularly takes care of Rust caches growing to problematic size over time | ||
|
||
name: Clear caches | ||
|
||
on: | ||
schedule: | ||
- cron: '0 4 * * MON' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
clear-caches: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Clear all caches | ||
run: gh cache delete --all | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |