Skip to content

Commit

Permalink
Merge remote-tracking branch 'rstudio_origin/main' into jg-tree-fix
Browse files Browse the repository at this point in the history
* rstudio_origin/main:
  Use latest Pandoc  in GHA and update workflow (rstudio#2244)
  • Loading branch information
jonathan-g committed Nov 29, 2021
2 parents 337a6e2 + 69e6f98 commit 10da592
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 118 deletions.
67 changes: 17 additions & 50 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,33 @@ jobs:
matrix:
config:
# testing R release with last shipped pandoc version in RStudio IDE and new pandoc
# TODO: issue on windows with pandoc 2.11.4 - change when fixed
- {os: windows-latest, pandoc: '2.7.3', r: 'release'}
- {os: macOS-latest, pandoc: '2.11.4', r: 'release'}
- {os: ubuntu-18.04, pandoc: '2.11.4', r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, pandoc: 'devel', r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: windows-latest, pandoc: '2.16.1', r: 'release'}
- {os: macOS-latest, pandoc: '2.16.1', r: 'release'}
- {os: ubuntu-18.04, pandoc: '2.16.1', r: 'release'}
- {os: ubuntu-18.04, pandoc: 'devel', r: 'release'}
# testing older pandoc versions
- {os: ubuntu-18.04, pandoc: '2.7.3', r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, pandoc: '2.5', r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, pandoc: '2.0.0.1', r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, pandoc: '2.14.2', r: 'release'}
- {os: ubuntu-18.04, pandoc: '2.11.4', r: 'release'}
- {os: ubuntu-18.04, pandoc: '2.7.3', r: 'release'}
- {os: ubuntu-18.04, pandoc: '2.5', r: 'release'}
- {os: ubuntu-18.04, pandoc: '2.0.0.1', r: 'release'}
# testing other R versions
- {os: ubuntu-18.04, pandoc: '2.11.4', r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04, pandoc: '2.11.4', r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
- {os: ubuntu-18.04, pandoc: '2.11.4', r: 'oldrel'}
- {os: ubuntu-18.04, pandoc: '2.11.4', r: 'devel', http-user-agent: 'release'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
id: install-r
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: change temp dir
if: runner.os == 'Windows'
Expand All @@ -79,52 +80,18 @@ jobs:
cat(readLines("~/.Rprofile"), sep = "\n")
shell: Rscript {0}

- name: Install pak and query dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v1
with:
path: |
${{ env.R_LIBS_USER }}/*
!${{ env.R_LIBS_USER }}/pak
key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
pak::local_system_requirements(execute = TRUE)
pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
shell: Rscript {0}
extra-packages: rcmdcheck

- name: Install dependencies
- name: Pandoc and Tinytex info
run: |
pak::local_install_dev_deps(upgrade = TRUE)
pak::pkg_install("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- .packages(TRUE)
sessioninfo::session_info(pkgs, include_base = TRUE)
rmarkdown::find_pandoc()
tinytex::tlmgr("--version")
tinytex::tl_pkgs()
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
_R_CHECK_TESTS_NLINES_: 0
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v1

- name: Show testthat output
if: always()
Expand Down
49 changes: 8 additions & 41 deletions .github/workflows/check-pandoc-daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@ jobs:
config:
- {os: windows-latest}
- {os: macOS-latest}
- {os: ubuntu-18.04, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
- {os: ubuntu-18.04}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
id: install-r
with:
use-public-rspm: true

- name: change temp dir
if: runner.os == 'Windows'
Expand All @@ -50,52 +51,18 @@ jobs:
cat(readLines("~/.Rprofile"), sep = "\n")
shell: Rscript {0}

- name: Install pak and query dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}

- name: Restore R package cache
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v1
with:
path: |
${{ env.R_LIBS_USER }}/*
!${{ env.R_LIBS_USER }}/pak
key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
pak::local_system_requirements(execute = TRUE)
pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
shell: Rscript {0}
extra-packages: rcmdcheck

- name: Install dependencies
- name: Pandoc and Tinytex info
run: |
pak::local_install_dev_deps(upgrade = TRUE)
pak::pkg_install("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- .packages(TRUE)
sessioninfo::session_info(pkgs, include_base = TRUE)
rmarkdown::find_pandoc()
tinytex::tlmgr("--version")
tinytex::tl_pkgs()
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
_R_CHECK_TESTS_NLINES_: 0
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v1

- name: Show testthat output
if: always()
Expand Down
34 changes: 7 additions & 27 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,22 @@ jobs:
if: ${{ github.event_name == 'push' || startsWith(github.head_ref, 'pkgdown/') }}
runs-on: ubuntu-18.04
env:
RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
id: install-r
with:
use-public-rspm: true

- uses: r-lib/actions/setup-pandoc@v1

- name: Install pak and query dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ${{ runner.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
pak::local_system_requirements(execute = TRUE)
pak::pkg_system_requirements("pkgdown", execute = TRUE)
shell: Rscript {0}

- name: Install package and dependencies
run: |
pak::local_install_dev_deps(upgrade = TRUE)
pak::pkg_install("r-lib/pkgdown")
pak::pkg_install("rstudio/quillt")
shell: Rscript {0}
extra-packages: |
r-lib/pkgdown
rstudio/quillt
needs: website

- name: Install package
run: R CMD INSTALL .
Expand Down

0 comments on commit 10da592

Please sign in to comment.