-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #407 from Antonov548/main
- Loading branch information
Showing
6 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,6 @@ windows | |
^autobrew$ | ||
^cleanup$ | ||
^CRAN-SUBMISSION$ | ||
^\.gitpod\.yml$ | ||
^\.gitpod\.Dockerfile$ | ||
^CMakeLists\.txt$ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ cleanup | |
.vscode | ||
.Renviron | ||
CRAN-SUBMISSION | ||
/build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# You can find the new timestamped tags here: https://hub.docker.com/r/gitpod/workspace-base/tags | ||
FROM gitpod/workspace-base:2022-05-08-14-31-53 | ||
|
||
# Install R and ccache | ||
RUN sudo apt update | ||
RUN sudo apt install -y \ | ||
r-base \ | ||
ccache \ | ||
cmake \ | ||
# Install dependencies for rlang packet | ||
libharfbuzz-dev libfribidi-dev |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
image: | ||
file: .gitpod.Dockerfile | ||
tasks: | ||
- name: dependencies | ||
init: | | ||
# Scriptlets, with custom Git config | ||
mv ~/.gitconfig ~/.gitconfig.gitpod | ||
curl -s https://raw.githubusercontent.com/krlmlr/scriptlets/master/bootstrap | sh | ||
echo -e "[credential]\n\thelper = /usr/bin/gp credential-helper" >> ~/.gitconfig | ||
# .editorconfig | ||
ln -s ~/.editorconfig .. | ||
# Set up ccache | ||
ln -s /usr/lib/ccache/* ~/bin/ | ||
# Set up Makevars | ||
mkdir -p ~/.R | ||
echo -e "MAKEFLAGS = -j8\nCXXFLAGS = -O0 -g" > ~/.R/Makevars | ||
# Install R packages | ||
echo 'options(repos = "https://packagemanager.rstudio.com/all/__linux__/'$(cat /etc/lsb-release | sed -n '/DISTRIB_CODENAME=/ {s///;p}')'/latest")' > ~/.Rprofile | ||
mkdir -p ~/R/x86_64-pc-linux-gnu-library/$(Rscript -e 'writeLines(gsub("[.][^.]+$", "", as.character(getRversion())))') | ||
## Install pak in R | ||
R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))' | ||
## Install devtools and R dependencies | ||
R -q -e 'pak::pak(c("devtools", "deps::."))' | ||
vscode: | ||
extensions: | ||
- ms-vscode.cpptools-extension-pack | ||
- go2sh.cmake-integration-vscode | ||
- EditorConfig.EditorConfig |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cmake_minimum_required(VERSION 3.0.0) | ||
project(RPostgres VERSION 0.1.0) | ||
|
||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
include(CTest) | ||
enable_testing() | ||
|
||
add_subdirectory(src) | ||
|
||
set(CPACK_PROJECT_NAME ${PROJECT_NAME}) | ||
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) | ||
include(CPack) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
add_library(RPostgres | ||
connection.cpp | ||
DbColumn.cpp | ||
DbColumnDataSource.cpp | ||
DbColumnDataSourceFactory.cpp | ||
DbColumnStorage.cpp | ||
DbConnection.cpp | ||
DbDataFrame.cpp | ||
DbResult.cpp | ||
encode.cpp | ||
encrypt.cpp | ||
logging.cpp | ||
PqColumnDataSource.cpp | ||
PqColumnDataSourceFactory.cpp | ||
PqDataFrame.cpp | ||
PqResult.cpp | ||
PqResultImpl.cpp | ||
PqResultSource.cpp | ||
PqUtils.cpp | ||
RcppExports.cpp | ||
result.cpp | ||
DbColumnDataSourceFactory.h | ||
DbColumnDataSource.h | ||
DbColumnDataType.h | ||
DbColumn.h | ||
DbColumnStorage.h | ||
DbConnection.h | ||
DbDataFrame.h | ||
DbResult.h | ||
DbResultImplDecl.h | ||
DbResultImpl.h | ||
encode.h | ||
integer64.h | ||
pch.h | ||
PqColumnDataSourceFactory.h | ||
PqColumnDataSource.h | ||
PqDataFrame.h | ||
PqResult.h | ||
PqResultImpl.h | ||
PqResultSource.h | ||
PqUtils.h | ||
RPostgres-init.c | ||
RPostgres_types.h | ||
) | ||
|
||
target_include_directories(RPostgres PUBLIC | ||
"/usr/share/R/include" | ||
"/home/gitpod/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include/" | ||
"/home/gitpod/R/x86_64-pc-linux-gnu-library/3.6/plogr/include/" | ||
"/usr/include/postgresql" | ||
"vendor" | ||
) | ||
|
||
target_compile_definitions(RPostgres PUBLIC | ||
"RCPP_DEFAULT_INCLUDE_CALL=false" | ||
"RCPP_USING_UTF8_ERROR_STRING" | ||
"BOOST_NO_AUTO_PTR" | ||
) |