From 102c414703c2459ba58666128a0b757ea2bb5e93 Mon Sep 17 00:00:00 2001 From: Vissarion Fisikopoulos Date: Mon, 10 Oct 2022 15:09:21 +0300 Subject: [PATCH] Update github actions --- ...{R-CDM-check.yml => R-CMD-check-macOS.yml} | 30 ++++------ .github/workflows/R-CMD-check-ubuntu.yml | 60 +++++++++++++++++++ .github/workflows/R-CMD-check-windows.yml | 56 +++++++++++++++++ 3 files changed, 126 insertions(+), 20 deletions(-) rename .github/workflows/{R-CDM-check.yml => R-CMD-check-macOS.yml} (51%) create mode 100644 .github/workflows/R-CMD-check-ubuntu.yml create mode 100644 .github/workflows/R-CMD-check-windows.yml diff --git a/.github/workflows/R-CDM-check.yml b/.github/workflows/R-CMD-check-macOS.yml similarity index 51% rename from .github/workflows/R-CDM-check.yml rename to .github/workflows/R-CMD-check-macOS.yml index feb8f5635..1ffba8f70 100644 --- a/.github/workflows/R-CDM-check.yml +++ b/.github/workflows/R-CMD-check-macOS.yml @@ -8,7 +8,7 @@ on: [push, pull_request] -name: R-CMD-check +name: R-CMD-check-macOS jobs: R-CMD-check: @@ -20,18 +20,9 @@ jobs: fail-fast: false matrix: config: -# - {os: macOS-latest, r: 'devel'} + - {os: macOS-latest, r: '4.1.2'} +# - {os: macOS-latest, r: 'devel'} # Error in library(devtools) : there is no package called ‘devtools’ - {os: macOS-latest, r: 'release'} -# - {os: windows-latest, r: 'devel'} - - {os: windows-latest, r: 'release'} -# - {os: ubuntu-latest, r: 'devel'} # error in "Run r-lib/actions/setup-r@master" -# - {os: ubuntu-latest, r: 'release'} ##[error]Error in library(devtools) : there is no package called ‘devtools’ -# - {os: ubuntu-18.04, r: 'release'} ##[error]Error in library(devtools) : there is no package called ‘devtools’ - - {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true @@ -46,22 +37,21 @@ jobs: r-version: ${{ matrix.config.r }} - uses: r-lib/actions/setup-pandoc@master - + - name: Install dependencies - run: Rscript -e "install.packages(c('devtools', dependencies=TRUE))" -e "install.packages(c('rcmdcheck', 'devtools', 'Rcpp', 'RcppEigen', 'BH', 'testthat'))" - + run: Rscript -e "install.packages(c('devtools', dependencies=TRUE))" -e "install.packages(c('rcmdcheck', 'devtools', 'Rcpp', 'RcppEigen', 'BH', 'testthat', 'downloader', 'xfun'))"; + - name: Check env: _R_CHECK_CRAN_INCOMING_REMOTE_: false - run: cd cran_gen/; - Rscript genCRANpkg.R; + run: cd cran_gen/; + Rscript genCRANpkg.R; cd cran_package; - Rscript -e "library(rcmdcheck)" -e "rcmdcheck::rcmdcheck(args = c('--no-manual', '--as-cran'), error_on = 'warning', check_dir = 'check')" + Rscript -e "library(rcmdcheck)" -e "rcmdcheck::rcmdcheck(args = c('--no-manual'), error_on = 'warning', check_dir = 'check')" - name: Upload check results if: failure() uses: actions/upload-artifact@master with: name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check - + path: check \ No newline at end of file diff --git a/.github/workflows/R-CMD-check-ubuntu.yml b/.github/workflows/R-CMD-check-ubuntu.yml new file mode 100644 index 000000000..e718f10c0 --- /dev/null +++ b/.github/workflows/R-CMD-check-ubuntu.yml @@ -0,0 +1,60 @@ +############################################################################## +# GitHub Actions Workflow to test the R interface of volesti +# +# Copyright (c) 2020 Vissarion Fisikopoulos +# +# Licensed under GNU LGPL.3, see LICENCE file +############################################################################## + +on: [push, pull_request] + +name: R-CMD-check-ubuntu + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: ubuntu-latest, r: 'devel'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-18.04, r: 'devel'} + - {os: ubuntu-18.04, r: 'release'} + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + RSPM: ${{ matrix.config.rspm }} + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v2 + - run: sudo apt-get update || true; + sudo apt install build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev libgit2-dev libfontconfig1-dev libharfbuzz-dev libfribidi-dev; + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + + - uses: r-lib/actions/setup-pandoc@master + + - name: Install dependencies + run: Rscript -e "install.packages(c('testthat', 'pkgload', 'rcmdcheck', 'devtools', 'Rcpp', 'RcppEigen', 'BH', 'downloader', 'xfun', dependencies=TRUE))"; + + - name: Check + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + run: cd cran_gen/; + Rscript genCRANpkg.R; + cd cran_package; + Rscript -e "library(rcmdcheck)" -e "rcmdcheck::rcmdcheck(args = c('--no-manual'), error_on = 'warning', check_dir = 'check')" + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@master + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: check \ No newline at end of file diff --git a/.github/workflows/R-CMD-check-windows.yml b/.github/workflows/R-CMD-check-windows.yml new file mode 100644 index 000000000..b60d29b6d --- /dev/null +++ b/.github/workflows/R-CMD-check-windows.yml @@ -0,0 +1,56 @@ +############################################################################## +# GitHub Actions Workflow to test the R interface of volesti +# +# Copyright (c) 2020 Vissarion Fisikopoulos +# +# Licensed under GNU LGPL.3, see LICENCE file +############################################################################## + +on: [push, pull_request] + +name: R-CMD-check-windows + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: +# - {os: windows-latest, r: 'devel'} # Error in library(devtools) : there is no package called ‘devtools’ + - {os: windows-latest, r: 'release'} + + env: + R_REMOTES_NO_ERRORS_FROM_WARNINGS: true + RSPM: ${{ matrix.config.rspm }} + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@master + with: + r-version: ${{ matrix.config.r }} + + - uses: r-lib/actions/setup-pandoc@master + + - name: Install dependencies + run: Rscript -e "install.packages(c('devtools', dependencies=TRUE))" -e "install.packages(c('rcmdcheck', 'devtools', 'Rcpp', 'RcppEigen', 'BH', 'testthat', 'downloader', 'xfun'))" + + - name: Check + env: + _R_CHECK_CRAN_INCOMING_REMOTE_: false + run: cd cran_gen/; + Rscript genCRANpkg.R; + cd cran_package; + Rscript -e "library(rcmdcheck)" -e "rcmdcheck::rcmdcheck(args = c('--no-manual'), error_on = 'warning', check_dir = 'check')" + + - name: Upload check results + if: failure() + uses: actions/upload-artifact@master + with: + name: ${{ runner.os }}-r${{ matrix.config.r }}-results + path: check \ No newline at end of file