Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test R package in CI/CD #25

Merged
merged 12 commits into from
Feb 6, 2024
38 changes: 38 additions & 0 deletions .github/workflows/R-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: build duckdb extension
run: make
romainfrancois marked this conversation as resolved.
Show resolved Hide resolved

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
working-directory: duckdb-rfuns-r

- uses: r-lib/actions/check-r-package@v2
with:
working-directory: duckdb-rfuns-r

3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ debug:
release:
mkdir -p build/release && \
cmake $(GENERATOR) $(BUILD_FLAGS) $(CLIENT_FLAGS) -DCMAKE_BUILD_TYPE=Release -S ./duckdb/ -B build/release && \
cmake --build build/release --config Release
cmake --build build/release --config Release && \
cp build/release/extension/rfuns/rfuns.duckdb_extension duckdb-rfuns-r/inst/extension/

##### Client build
JS_BUILD_FLAGS=-DBUILD_NODE=1 -DDUCKDB_EXTENSION_${EXTENSION_NAME}_SHOULD_LINK=0
Expand Down
3 changes: 2 additions & 1 deletion duckdb-rfuns-r/.Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
^duckdbrfuns\.Rproj$
^duckdb-rfuns-r\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
helper-gen.R
^\.github$
10 changes: 5 additions & 5 deletions duckdb-rfuns-r/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ Authors@R: c(
person("Romain", "François", role = "ctb",
comment = c(ORCID = "0000-0002-2444-4226"))
)
Description: User defined functions for duckdb
Description: User defined functions for duckdb.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
Depends:
DBI
Imports:
constructive,
DBI,
duckdb
duckdb,
tibble,
withr,
DBI
6 changes: 6 additions & 0 deletions duckdb-rfuns-r/NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# Generated by roxygen2: do not edit by hand

importFrom(DBI,dbConnect)
importFrom(DBI,dbDisconnect)
importFrom(DBI,dbGetQuery)
importFrom(constructive,construct)
importFrom(tibble,tibble)
importFrom(withr,defer_parent)
7 changes: 7 additions & 0 deletions duckdb-rfuns-r/R/zzz.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# silence R CMD check
# TODO: some of these are testthat only dependencies
#' @importFrom tibble tibble
#' @importFrom constructive construct
#' @importFrom withr defer_parent
#' @importFrom DBI dbConnect dbDisconnect dbGetQuery
NULL
6 changes: 0 additions & 6 deletions duckdb-rfuns-r/configure

This file was deleted.

Loading