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

* Windows too

* Some compilers

* sed

* Restrict

* gfind

* LF, not CRLF
  • Loading branch information
krlmlr authored Oct 29, 2024
1 parent 7c8f306 commit 9375cfa
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ _files$
^compile_commands\.json$
^\.cache$
^tests/testthat/helper-rethrow\.R$
^cleanup$
^cleanup\.win$
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
src/duckdb/** linguist-vendored
src/duckdb/**/*.c text eol=lf
src/duckdb/**/*.cc text eol=lf
src/duckdb/**/*.cpp text eol=lf
src/duckdb/**/*.h text eol=lf
src/duckdb/**/*.hpp text eol=lf
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ $RECYCLE.BIN/
*.tgz
src/**/*.o
src/*.so
src/*.dll
/scripts/__pycache__
/duckdb
/src/Makevars.duckdb
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
8 changes: 8 additions & 0 deletions cleanup.win
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 9375cfa

Please sign in to comment.