From ec54027fc966da9f65e3837fce0df06fcfb71e92 Mon Sep 17 00:00:00 2001 From: Damian Betebenner Date: Mon, 14 Oct 2024 10:38:31 -0400 Subject: [PATCH] Updating github workflow --- .../{check-standard.yaml => R-CMD-check.yaml} | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) rename .github/workflows/{check-standard.yaml => R-CMD-check.yaml} (62%) diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/R-CMD-check.yaml similarity index 62% rename from .github/workflows/check-standard.yaml rename to .github/workflows/R-CMD-check.yaml index d780c7b..6fa6710 100644 --- a/.github/workflows/check-standard.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] @@ -18,9 +16,9 @@ jobs: fail-fast: false matrix: config: - - {os: macOS-latest, r: 'release'} + - {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'} @@ -29,12 +27,17 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: + - name: Install Homebrew + if: runner.os == 'macOS' + run: | + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + - name: Install XQUARTZ dependencies on MacOS if: runner.os == 'macOS' run: | brew install --cask xquartz - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: r-lib/actions/setup-pandoc@v2 @@ -44,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 @@ -51,4 +62,4 @@ jobs: - uses: r-lib/actions/check-r-package@v2 with: - upload-snapshots: true + upload-snapshots: true \ No newline at end of file