Skip to content

More examples for Functions of vectors, matrices, and cubes #164

More examples for Functions of vectors, matrices, and cubes

More examples for Functions of vectors, matrices, and cubes #164

Workflow file for this run

# 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]
pull_request:
branches: [main]
name: R-CMD-check
permissions: read-all
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: macos-14, r: 'release', name: "macOS 14"}
- {os: macos-13, r: 'release', name: "macOS 13"}
- {os: windows-latest, r: 'release', name: "Windows latest"}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release', name: "Ubuntu latest (R devel)"}
- {os: ubuntu-latest, r: 'release', custom: 'no-cpp11armadillotest', name: "Ubuntu latest"}
- {os: ubuntu-latest, r: 'release', custom: 'no-cpp11armadillotest', name: "Ubuntu latest (no cpp11armadillotest)"}
- {os: ubuntu-latest, r: 'release', custom: 'cpp15', name: "Ubuntu latest (GCC15)"} # CRAN email Dec 7, 2024
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- 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
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
- name: Install cpp11armadillotest
if: matrix.config.custom != 'no-cpp11armadillotest'
run: |
options(warn = 2)
pak::local_install_dev_deps("cpp11armadillotest", dependencies = TRUE)
install.packages(".", repos = NULL, type = "source")
install.packages("cpp11armadillotest", repos = NULL, INSTALL_opts = "--install-tests", type = "source")
shell: Rscript {0}
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
- name: Run cpp11armadillotest tests
if: matrix.config.custom != 'no-cpp11armadillotest' && matrix.config.custom != 'cpp15'
run: |
setwd("cpp11armadillotest/tests")
library(testthat)
library(cpp11armadillotest)
test_check("cpp11armadillotest", reporter = "progress")
shell: Rscript {0}
- name: Run cpp11armadillotest tests (C++15)
if: matrix.config.custom == 'cpp15'
run: |
Sys.setenv(CXXFLAGS = "-std=c++15")
install.packages(".", repos = NULL, type = "source")
install.packages("cpp11armadillotest", repos = NULL, INSTALL_opts = "--install-tests", type = "source")
setwd("cpp11armadillotest/tests")
library(testthat)
library(cpp11armadillotest)
test_check("cpp11armadillotest", reporter = "progress")
shell: Rscript {0}