Skip to content

Commit 6aa4444

Browse files
authored
Setup GHA caching (#83)
* Add caching step * try using different cache step * Each job has its own cache key
1 parent 2f24e04 commit 6aa4444

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/R-CMD-check.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ jobs:
2323
- name: Install Rust
2424
uses: dtolnay/rust-toolchain@stable
2525

26+
- name: Caching
27+
uses: Swatinem/rust-cache@v2
28+
with:
29+
shared-key: ${{ runner.os }}-R-CMD-Check
30+
cache-on-failure: true
31+
2632
- name: Check disk space
2733
run: df -h
2834

.github/workflows/build.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ jobs:
2424
- name: Install Rust
2525
uses: dtolnay/rust-toolchain@stable
2626

27-
- name: Check disk space
28-
run: df -h
27+
- name: Caching
28+
uses: Swatinem/rust-cache@v2
29+
with:
30+
shared-key: ${{ runner.os }}-build
31+
cache-on-failure: true
2932

3033
- name: Build with cargo
3134
run: cargo build --verbose

.github/workflows/publish.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ jobs:
2525
- name: Install Rust
2626
uses: dtolnay/rust-toolchain@stable
2727

28+
- name: Caching
29+
uses: Swatinem/rust-cache@v2
30+
with:
31+
shared-key: ${{ runner.os }}-publish
32+
cache-on-failure: true
33+
2834
- name: Setup quarto
2935
uses: quarto-dev/quarto-actions/setup@v2
3036

0 commit comments

Comments
 (0)