diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 64f68ce..63b5947 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,5 +1,3 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: branches: [main, master] @@ -20,7 +18,7 @@ jobs: config: - {os: macos-latest, r: 'release'} - {os: windows-latest, r: 'release'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'devel'} - {os: ubuntu-latest, r: 'release'} - {os: ubuntu-latest, r: 'oldrel-1'} @@ -49,6 +47,14 @@ jobs: http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true + # Cache R packages to speed up builds + - name: Cache R packages + uses: actions/cache@v3 + with: + path: ~/.cache/R + key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('**/DESCRIPTION') }} + restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }} + - uses: r-lib/actions/setup-r-dependencies@v2 with: extra-packages: any::rcmdcheck