Fix windows install? #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: R CMD check | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
schedule: | |
- cron: '0 0 * * 0' # Run every Sunday at midnight UTC | |
jobs: | |
R-CMD-check: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (R-${{ matrix.config.r }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: windows-latest, r: 'release'} | |
- {os: windows-latest, r: 'devel'} | |
- {os: macOS-latest, r: 'release'} | |
- {os: macOS-latest, r: 'devel'} | |
- {os: ubuntu-latest, r: '4.1.0'} | |
- {os: ubuntu-latest, r: 'release'} | |
- {os: ubuntu-latest, r: 'devel'} | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
http-user-agent: ${{ matrix.config.http-user-agent }} | |
- name: Install system dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y texlive-latex-base texlive-latex-recommended texlive-fonts-recommended texlive-fonts-extra | |
- name: Install system dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install --cask basictex | |
sudo /Library/TeX/texbin/tlmgr update --self | |
sudo /Library/TeX/texbin/tlmgr install inconsolata | |
echo "/Library/TeX/texbin" >> $GITHUB_PATH | |
- name: Install TinyTeX and LaTeX packages on Windows | |
if: runner.os == 'Windows' | |
run: | | |
install.packages('tinytex') | |
tinytex::install_tinytex(force = TRUE) | |
tinytex::tlmgr_install(c('inconsolata', 'pdftex', 'latex-bin', 'tools', 'amsmath', 'geometry', 'hyperref')) | |
tinytex::tlmgr_update() | |
writeLines(sprintf('PATH="%s/bin/win32;%s"', tinytex::tinytex_root(), Sys.getenv('PATH')), "~/.Renviron") | |
source("~/.Renviron") | |
shell: Rscript {0} | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::rcmdcheck | |
needs: check | |
- uses: r-lib/actions/check-r-package@v2 | |
with: | |
upload-snapshots: true | |
args: c('--as-cran') | |
- name: Show testthat output | |
if: always() | |
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true | |
shell: bash | |
- name: Upload check results | |
if: failure() | |
uses: actions/upload-artifact@main | |
with: | |
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | |
path: check |