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

feat: xz-compress duckdb sources in the tarball #530

Merged
merged 9 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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$
Comment on lines +46 to +47
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it correct that these are here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, the tarball has the .xz file and doesn't need this procedure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cleanup is run as part of R CMD build . in the right location at the right time. Seems legit, but 🤷 .

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
8 changes: 8 additions & 0 deletions configure.win
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,11 @@ 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
find duckdb -type f | xargs unix2dos
fi
Loading