diff --git a/.github/workflows/R-CMD-check-centos.yaml b/.github/workflows/R-CMD-check-centos.yaml new file mode 100644 index 00000000..8da83a44 --- /dev/null +++ b/.github/workflows/R-CMD-check-centos.yaml @@ -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