From 388de924d1efe9d408564a2d0b302680c38e7762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sat, 19 Oct 2024 18:03:53 +0200 Subject: [PATCH] feat: Download duckdb library from GitHub --- .Rbuildignore | 1 + configure | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.Rbuildignore b/.Rbuildignore index 0870c7841..bd21ce9db 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -42,3 +42,4 @@ _files$ ^src/librstrtmgr\.a$ ^compile_commands\.json$ ^\.cache$ +^src/duckdb$ diff --git a/configure b/configure index 2d00e6308..1fbc099cb 100755 --- a/configure +++ b/configure @@ -4,6 +4,16 @@ set -ex cd $(dirname $0)/src +# Download duckdb from GitHub if missing +if ! [ -d duckdb ]; then + version=$(egrep '^Version:' ../DESCRIPTION | sed -r 's/^Version: ([0-9]+[.][0-9]+[.][0-9]+)([.][0-9]+)?$/\1/') + # Download tagged version + curl -OL https://github.com/duckdb/duckdb-r/archive/refs/tags/v${version}.tar.gz + tar -xzf v${version}.tar.gz + mv duckdb-r-${version}/src/duckdb . + rm -rf duckdb-r-${version} v${version}.tar.gz +fi + # The purpose of this is to avoid rebuilding duckdb in every CI/CD run. # We set the DUCKDB_R_PREBUILT_ARCHIVE environment variable to a file path # that contains a .tar of all object files.