Skip to content

Commit

Permalink
feat: xz-compress duckdb sources in the tarball (#530)
Browse files Browse the repository at this point in the history
* ci: Check tarball size

* feat: xz-compress duckdb sources in the tarball

* Remove objects
  • Loading branch information
krlmlr authored Oct 28, 2024
1 parent 7c8f306 commit 8b15d0a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ _files$
^compile_commands\.json$
^\.cache$
^tests/testthat/helper-rethrow\.R$
^cleanup$
2 changes: 2 additions & 0 deletions .github/workflows/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ runs:
echo "_R_CHECK_UNDOC_USE_ALL_NAMES_=true" | tee -a $GITHUB_ENV
echo "_R_CHECK_URLS_SHOW_301_STATUS_=true" | tee -a $GITHUB_ENV
echo "_R_CXX_USE_NO_REMAP_=true" | tee -a $GITHUB_ENV
echo "_R_CHECK_CRAN_INCOMING_=true" | tee -a $GITHUB_ENV
echo "_R_CHECK_CRAN_INCOMING_SKIP_LARGE_VERSION_=true" | tee -a $GITHUB_ENV
shell: bash

- name: Set environment variables (non-Windows only)
Expand Down
8 changes: 8 additions & 0 deletions cleanup
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

set -ex

git clean -fdx src
cd src
tar cvJf duckdb.tar.xz duckdb
rm -rf duckdb
7 changes: 7 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ if [ -f "${DUCKDB_R_PREBUILT_ARCHIVE}" ] && tar -xm -f ${DUCKDB_R_PREBUILT_ARCHI
else
cp include/to-tar.mk Makevars.duckdb
fi

# The duckdb sources are xz-compressed in the tarball to keep it under 5000000 bytes.
# This happens in the cleanup script.

if [ -f duckdb.tar.xz ]; then
tar xJf duckdb.tar.xz
fi
7 changes: 7 additions & 0 deletions configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ if [ -f "${DUCKDB_R_PREBUILT_ARCHIVE}" ] && tar -xm --force-local -f ${DUCKDB_R_
else
cp include/to-tar-win.mk Makevars.duckdb
fi

# The duckdb sources are xz-compressed in the tarball to keep it under 5000000 bytes.
# This happens in the cleanup script.

if [ -f duckdb.tar.xz ]; then
tar xJf duckdb.tar.xz
fi

0 comments on commit 8b15d0a

Please sign in to comment.