Skip to content

Commit

Permalink
Centos (#230)
Browse files Browse the repository at this point in the history
*ci : Add CentOS GitHub Action
  • Loading branch information
statnmap authored Dec 8, 2023
1 parent 8045a50 commit d98fe48
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/R-CMD-check-centos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, centos]
pull_request:
branches: [main, master, centos]

name: R-CMD-check-centos

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
container: 'rstudio/r-base:4.3-centos7'

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
REPO_NAME: "https://packagemanager.posit.co/cran/__linux__/centos7/latest"
CRAN: "https://packagemanager.posit.co/cran/__linux__/centos7/latest"

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 }}
# use-public-rspm: true

- name: Set RSPM in Rprofile
run: |
print(Sys.getenv("HOME"))
print(getOption("repos"))
cat('\noptions(repos = c(RSPM = "https://packagemanager.posit.co/cran/__linux__/centos7/latest", "https://cran.rstudio.com"))', file = file.path(Sys.getenv("HOME"), ".Rprofile"), append = TRUE)
source(file.path(Sys.getenv("HOME"), ".Rprofile"))
print(getOption("repos"))
shell: Rscript {0}

- name: Check RSPM in R session and try install parsermd
run: |
print(getOption("repos"))
options(repos = c(RSPM = "https://packagemanager.posit.co/cran/__linux__/centos7/latest", "https://cran.rstudio.com"))
print(getOption("repos"))
install.packages("pak")
pak::pkg_install("statnmap/parsermd@nocpp")
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

0 comments on commit d98fe48

Please sign in to comment.