Skip to content

Commit

Permalink
improve caching
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdutey committed Nov 19, 2023
1 parent 9d48e21 commit d738073
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ jobs:
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
- name: Restore cached R packages
if: runner.os != 'Windows'
uses: actions/cache@v2
id: restore-r-packages
uses: actions/cache/restore@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-


- name: Install system dependencies
if: runner.os == 'Linux'
run: |
Expand All @@ -90,6 +90,14 @@ jobs:
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
id: cache-r-packages
uses: actions/cache/save@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ steps.restore-r-packages.outputs.cache-primary-key }}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
Expand Down

0 comments on commit d738073

Please sign in to comment.