From 3aee16042838b75c3f56a6a753bb66c95d03ec37 Mon Sep 17 00:00:00 2001 From: Riccardo Porreca Date: Mon, 29 Jan 2024 11:14:36 +0100 Subject: [PATCH] Update Actions status badges * We are still using legacy inclusion code and URLs, the new one are based on "Create status badge" in GitHub, equivalent to `usethis::use_github_actions_badge()` (besides the alt text). * `remotes::install_local(build_vignettes = TRUE)` + `rmarkdown::render("README.Rmd")` --- README.Rmd | 5 ++--- README.md | 31 +++++++++++++++---------------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/README.Rmd b/README.Rmd index 2587787..df2cdd2 100644 --- a/README.Rmd +++ b/README.Rmd @@ -23,7 +23,7 @@ knitr::opts_chunk$set( ``` ```{r, check-vignette, include = FALSE} # make sure a vignette with a given name exists, you may have to run -# devtools::install(build_vignettes = TRUE) in case of errors +# remotes::install_local(build_vignettes = TRUE) in case of errors stop_if_no_vignette <- function(topic, package = "rTRNG") { invisible( # prevents opening the vignette withCallingHandlers( @@ -40,8 +40,7 @@ stop_if_no_vignette <- function(topic, package = "rTRNG") { [![CRAN status](http://www.r-pkg.org/badges/version/rTRNG)](https://cran.r-project.org/package=rTRNG) -[![R-CMD-check](https://github.com/miraisolutions/rTRNG/workflows/R-CMD-check/badge.svg)](https://github.com/miraisolutions/rTRNG/actions?query=workflow%3AR-CMD-check) - [![valgrind](https://github.com/miraisolutions/rTRNG/workflows/valgrind/badge.svg)](https://github.com/miraisolutions/rTRNG/actions?query=workflow%3Avalgrind) +[![R-CMD-check](https://github.com/miraisolutions/rTRNG/actions/workflows/ci.yaml/badge.svg)](https://github.com/miraisolutions/rTRNG/actions/workflows/ci.yaml) [![valgrind](https://github.com/miraisolutions/rTRNG/actions/workflows/valgrind.yaml/badge.svg)](https://github.com/miraisolutions/rTRNG/actions/workflows/valgrind.yaml) [![Codecov coverage](https://codecov.io/gh/miraisolutions/rTRNG/branch/master/graph/badge.svg)](https://app.codecov.io/gh/miraisolutions/rTRNG/branch/master) diff --git a/README.md b/README.md index 0e3b379..7893d94 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ [![CRAN status](http://www.r-pkg.org/badges/version/rTRNG)](https://cran.r-project.org/package=rTRNG) -[![R-CMD-check](https://github.com/miraisolutions/rTRNG/workflows/R-CMD-check/badge.svg)](https://github.com/miraisolutions/rTRNG/actions?query=workflow%3AR-CMD-check) -[![valgrind](https://github.com/miraisolutions/rTRNG/workflows/valgrind/badge.svg)](https://github.com/miraisolutions/rTRNG/actions?query=workflow%3Avalgrind) +[![R-CMD-check](https://github.com/miraisolutions/rTRNG/actions/workflows/ci.yaml/badge.svg)](https://github.com/miraisolutions/rTRNG/actions/workflows/ci.yaml) +[![valgrind](https://github.com/miraisolutions/rTRNG/actions/workflows/valgrind.yaml/badge.svg)](https://github.com/miraisolutions/rTRNG/actions/workflows/valgrind.yaml) [![Codecov coverage](https://codecov.io/gh/miraisolutions/rTRNG/branch/master/graph/badge.svg)](https://app.codecov.io/gh/miraisolutions/rTRNG/branch/master) @@ -82,7 +82,7 @@ remotes::install_github("miraisolutions/rTRNG", build_vignettes = TRUE) If you try to build the package yourself from source and run `Rcpp::compileAttributes()` during the process, you need to use a -version of **Rcpp >= 0.12.11.2**. Earlier versions like 0.12.11 will +version of **Rcpp \>= 0.12.11.2**. Earlier versions like 0.12.11 will not generate the desired `_rcpp_module_boot_trng` symbol in *RcppExports.cpp*. @@ -146,7 +146,7 @@ identical(x_serial, x_parallel) The TRNG C++ library is made available by **rTRNG** to standalone C++ code compiled with `Rcpp::sourceCpp` thanks to the `Rcpp::depends` attribute, with `Rcpp::plugins(cpp11)` enforcing the C++11 standard -required by TRNG >= 4.22: +required by TRNG \>= 4.22: ``` cpp // [[Rcpp::depends(rTRNG)]] @@ -179,18 +179,17 @@ exampleCpp() Creating an R package with C++ code using the TRNG library and headers through **rTRNG** is achieved by -- adding `Imports: rTRNG` and `LinkingTo: rTRNG` to the DESCRIPTION - file -- importing one symbol in the NAMESPACE: - `importFrom(rTRNG, TRNG.Version)` -- enforcing compilation using C++11 in Makevars\[.win\] via - `CXX_STD = CXX11` -- setting the relevant linker flags in Makevars\[.win\] via - `rTRNG::LdFlags()` - - Makevars: - `PKG_LIBS += $(shell ${R_HOME}/bin/Rscript -e "rTRNG::LdFlags()")` - - Makevars.win: - `PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "rTRNG::LdFlags()")` +- adding `Imports: rTRNG` and `LinkingTo: rTRNG` to the DESCRIPTION file +- importing one symbol in the NAMESPACE: + `importFrom(rTRNG, TRNG.Version)` +- enforcing compilation using C++11 in Makevars\[.win\] via + `CXX_STD = CXX11` +- setting the relevant linker flags in Makevars\[.win\] via + `rTRNG::LdFlags()` + - Makevars: + `PKG_LIBS += $(shell ${R_HOME}/bin/Rscript -e "rTRNG::LdFlags()")` + - Makevars.win: + `PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "rTRNG::LdFlags()")` ### Note about C++ code on macOS