Fix issues and warnings #122
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################## | |
# GitHub Actions Workflow to test the R interface of volesti | |
# | |
# Copyright (c) 2020-2024 Vissarion Fisikopoulos | |
# | |
# Licensed under GNU LGPL.3, see LICENCE file | |
############################################################################## | |
on: [push, pull_request] | |
name: R-CMD-check-macOS | |
jobs: | |
R-CMD-check: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
## incompatible versions of gfortran and R | |
- {os: macOS-latest, r: '4.1.2'} | |
## building with clang 15 yields a compile error from external/PackedCSparse/FloatArray.h:11: | |
## error "This header is only meant to be used on x86 and x64 architecture" | |
- {os: macOS-latest, r: 'release'} | |
## In file included from direct_sampling.cpp:19: | |
## In file included from volesti/include/volume/volume_sequence_of_balls.hpp:21: | |
## volesti/include/convex_bodies/hpolytope.h:1015:35: error: no template named 'is_same_v' in namespace 'std'; did you mean 'is_same'? | |
## -> std::enable_if_t<std::is_same_v<MT, Eigen::SparseMatrix<NT, Eigen::RowMajor>> && !std::is_same_v<update_parameters, int>, void> { // MT must be in RowMajor format | |
- {os: macOS-13, r: '4.1.2'} | |
- {os: macOS-12, r: '4.1.2'} | |
## pass without errors | |
- {os: macOS-13, r: 'release'} | |
- {os: macOS-12, r: 'release'} | |
env: | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
RSPM: ${{ matrix.config.rspm }} | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- 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: 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@v4 | |
with: | |
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | |
path: check |