Skip to content

Commit

Permalink
Update r-cmd-check.yml
Browse files Browse the repository at this point in the history
More efficient R-CMD-CHECK workflow
  • Loading branch information
JuKo007 authored Jun 12, 2024
1 parent 96f15ff commit f2671c6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/r-cmd-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on: [push, pull_request]
jobs:
check:
runs-on: ${{ matrix.config.os }}
timeout-minutes: 660
strategy:
fail-fast: false
matrix:
Expand All @@ -30,10 +31,18 @@ jobs:
key: ${{ runner.os }}-texlive-${{ hashFiles('**/DESCRIPTION') }}
restore-keys: ${{ runner.os }}-texlive-

- name: Cache R
uses: actions/cache@v4
with:
path: |
${{ runner.tool_cache }}/R
key: ${{ runner.os }}-R-${{ matrix.config.r }}

- name: Set up R
uses: r-lib/actions/[email protected]
with:
r-version: ${{ matrix.config.r }}
continue-on-error: true

- name: Install Linux system dependencies
if: runner.os == 'Linux'
Expand All @@ -54,7 +63,6 @@ jobs:
echo "C:\Program Files\MiKTeX\miktex\bin\x64" | Out-File -Append -FilePath $Env:GITHUB_PATH
& "C:\Program Files\MiKTeX\miktex\bin\x64\initexmf.exe" --update-fndb
- name: Install macOS system dependencies
if: runner.os == 'macOS'
run: |
Expand All @@ -67,7 +75,6 @@ jobs:
# Install recommended fonts, including Helvetica
sudo /Library/TeX/texbin/tlmgr install collection-fontsrecommended
- name: Install rJava and other R dependencies
run: |
Rscript -e "install.packages('rJava')"
Expand All @@ -77,4 +84,3 @@ jobs:
- name: Check
shell: bash
run: R CMD build . && R CMD check *tar.gz --as-cran

0 comments on commit f2671c6

Please sign in to comment.