Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
asardaes committed Dec 30, 2024
1 parent e48240c commit 366d2b7
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 61 deletions.
35 changes: 11 additions & 24 deletions .github/workflows/check-non-master.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches-ignore:
- master
- docs
pull_request:
branches:
- master

name: R-CMD-check non-master
permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -25,44 +20,36 @@ jobs:
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2
if: runner.os != 'Windows'

- uses: r-lib/actions/setup-r@v1
- 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@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
needs: check
extra-packages: |
any::rcmdcheck
- uses: r-lib/actions/check-r-package@v1
- uses: r-lib/actions/check-r-package@v2
continue-on-error: ${{ matrix.config.r == 'devel' }}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Test coverage
if: runner.os == 'Linux' && matrix.config.r == 'release'
run: |
Rscript -e 'install.packages("covr")'
Rscript codecov.R
continue-on-error: true

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
14 changes: 8 additions & 6 deletions .github/workflows/check-sanitizers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
name: Check hash of src files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- id: cache_hit
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
src
key: san-0-${{ hashFiles('src/**') }}
key: san-${{ hashFiles('src/**') }}
outputs:
run_check: ${{ steps.cache_hit.outputs.cache-hit }}
R-CMD-check:
Expand All @@ -40,15 +40,17 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
/usr/local/lib/R/site-library
key: ${{ matrix.config.img }}

- name: Install dependencies
env:
ASAN_OPTIONS: "detect_odr_violation=0"
shell: Rscriptdevel {0}
run: |
install.packages("remotes")
Expand All @@ -59,7 +61,7 @@ jobs:
- name: Check with sanitizers
env:
NOT_CRAN: false
ASAN_OPTIONS: "detect_leaks=0"
ASAN_OPTIONS: "detect_leaks=0:detect_odr_violation=0"
run: |
Rdevel CMD build --no-build-vignettes --no-manual .
Rdevel --vanilla CMD check *.tar.gz --as-cran --no-manual
Expand Down
32 changes: 12 additions & 20 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
workflow_dispatch:
push:
branches:
- master
schedule:
- cron: "0 0 1 * ?"

name: R-CMD-check
permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -23,44 +23,36 @@ jobs:
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2
if: runner.os != 'Windows'

- uses: r-lib/actions/setup-r@v1
- 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@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck
needs: check
extra-packages: |
any::rcmdcheck
- uses: r-lib/actions/check-r-package@v1
- uses: r-lib/actions/check-r-package@v2
continue-on-error: ${{ matrix.config.r == 'devel' }}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Test coverage
if: runner.os == 'Linux' && matrix.config.r == 'release'
run: |
Rscript -e 'install.packages("covr")'
Rscript codecov.R
continue-on-error: true

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
9 changes: 5 additions & 4 deletions .github/workflows/check-valgrind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,22 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install valgrind
run: |
/usr/bin/sudo DEBIAN_FRONTEND=noninteractive apt-get update -y -qq
/usr/bin/sudo DEBIAN_FRONTEND=noninteractive apt-get install -y valgrind
- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v1
- 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@v1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck

Expand Down
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Description: Fast row-oriented operations implemented in C++, all of which are m
promotion according to R rules (like transforming logicals to integers to allow summation).
Version: 0.1.1.9000
Depends:
R (>= 3.1.0)
R
Imports:
methods,
glue,
Expand All @@ -24,16 +24,16 @@ LinkingTo:
Suggests:
rlang,
testthat
Date: 2021-04-23
Date: 2024-12-30
Authors@R: c(
person("Alexis", "Sarda-Espinosa", role=c("cre", "aut"), email="[email protected]")
)
BugReports: https://github.com/asardaes/wiserow/issues
License: GPL (>= 3)
URL: https://asardaes.github.io/wiserow/, https://github.com/asardaes/wiserow
NeedsCompilation: yes
SystemRequirements: C++11, GNU make
SystemRequirements: GNU make
Language: en-US
Encoding: UTF-8
RoxygenNote: 7.1.1
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
2 changes: 1 addition & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CXX_STD = CXX11
PKG_CXXFLAGS += -DRCPP_USE_UNWIND_PROTECT
PKG_CXXFLAGS += $(shell ${R_HOME}/bin/Rscript -e "RcppParallel::CxxFlags()")

# Needed due to RcppParallel
PKG_LIBS += $(shell ${R_HOME}/bin/Rscript -e "RcppParallel::RcppParallelLibs()")
Expand Down
3 changes: 1 addition & 2 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CXX_STD = CXX11
PKG_CXXFLAGS += -DRCPP_PARALLEL_USE_TBB=1 -DRCPP_USE_UNWIND_PROTECT
PKG_CXXFLAGS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppParallel::CxxFlags()")

# Needed due to RcppParallel
PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppParallel::RcppParallelLibs()")
Expand Down
1 change: 1 addition & 0 deletions wiserow.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: d726f26a-2acd-4345-8b7d-d5dcd1598f5a

RestoreWorkspace: Default
SaveWorkspace: No
Expand Down

0 comments on commit 366d2b7

Please sign in to comment.