Skip to content

Commit

Permalink
test of edited R-CMD-Check wf
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewphamilton committed Oct 2, 2023
1 parent daebd2a commit 5faf6e1
Showing 1 changed file with 54 additions and 50 deletions.
104 changes: 54 additions & 50 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ jobs:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}
#- {os: windows-latest, r: '3.6'}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.0.0 (ubuntu-20.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
# - {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "R/4.0.0 (ubuntu-20.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
# - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
#- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
Expand All @@ -37,59 +38,62 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3 #

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}

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

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows' && !matrix.config.autobrew
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ matrix.config.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ matrix.config.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get install libharfbuzz-dev
sudo apt-get install libfribidi-dev
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
- name: Install system dependencies
if: runner.os == 'MacOS' && !matrix.config.autobrew
run: brew install harfbuzz fribidi

- name: Remove homebrew
if: matrix.config.autobrew
uses: autobrew/uninstall-homebrew@master

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2

# - uses: r-lib/actions/setup-pandoc@v2
#
# - name: Query dependencies
# run: |
# install.packages('remotes')
# saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
# writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
# shell: Rscript {0}
#
# - name: Cache R packages
# if: runner.os != 'Windows' && !matrix.config.autobrew
# uses: actions/cache@v1
# with:
# path: ${{ env.R_LIBS_USER }}
# key: ${{ matrix.config.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
# restore-keys: ${{ matrix.config.os }}-${{ hashFiles('.github/R-version') }}-1-
#
# - name: Install system dependencies
# if: runner.os == 'Linux'
# run: |
# sudo apt-get install libharfbuzz-dev
# sudo apt-get install libfribidi-dev
# while read -r cmd
# do
# eval sudo $cmd
# done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "20.04"), sep = "\n")')
# - name: Install system dependencies
# if: runner.os == 'MacOS' && !matrix.config.autobrew
# run: brew install harfbuzz fribidi
#
# - name: Remove homebrew
# if: matrix.config.autobrew
# uses: autobrew/uninstall-homebrew@master
#
# - name: Install dependencies
# run: |
# remotes::install_deps(dependencies = TRUE)
# remotes::install_cran("rcmdcheck")
# shell: Rscript {0}

# - name: Session info
# run: |
# options(width = 100)
# pkgs <- installed.packages()[, "Package"]
# sessioninfo::session_info(pkgs, include_base = TRUE)
# shell: Rscript {0}

- name: Check
env:
Expand Down

0 comments on commit 5faf6e1

Please sign in to comment.