From a663ccfe96791e1da187169bd6993c2f7be7907d Mon Sep 17 00:00:00 2001 From: David Liao Date: Fri, 9 Aug 2024 00:59:33 +0100 Subject: [PATCH] Update r.yml --- .github/workflows/r.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 4fb4171..e981203 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -5,7 +5,6 @@ # # See https://github.com/r-lib/actions/tree/master/examples#readme for # additional example workflows available for the R community. - name: R on: @@ -19,22 +18,40 @@ permissions: jobs: build: - runs-on: macos-latest + runs-on: ${{ matrix.os }} strategy: matrix: - r-version: ['3.6.3', '4.1.1'] + os: [macos-latest, windows-latest] # Added windows-latest to the matrix + r-version: ['4.1.1', '4.3.0'] # Use recent versions of R steps: - uses: actions/checkout@v4 + - name: Set up R ${{ matrix.r-version }} - uses: r-lib/actions/setup-r@f57f1301a053485946083d7a45022b278929a78a + uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.r-version }} - - name: Install dependencies + + - name: Install system dependencies on macOS + if: runner.os == 'macOS' + run: | + brew install qpdf + brew install pkg-config + brew install checkbashisms + + - name: Install system dependencies on Windows + if: runner.os == 'Windows' + run: | + choco install qpdf + choco install pkgconfiglite + choco install make + + - name: Install R package dependencies run: | install.packages(c("remotes", "rcmdcheck")) remotes::install_deps(dependencies = TRUE) shell: Rscript {0} + - name: Check run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") shell: Rscript {0}