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

update R CMD workflow to apply patches in .github/patches/duckdb-r #9412

Merged
merged 3 commits into from Oct 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/R_CMD_CHECK.yml
Expand Up @@ -79,6 +79,13 @@ jobs:
extra-packages: any::rcmdcheck
needs: check

- name: Apply duckdb-r patches
shell: bash
run: |
for filename in $GITHUB_WORKSPACE/$DUCKDB_SRC/.github/patches/duckdb-r/*.patch; do
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
for filename in $GITHUB_WORKSPACE/$DUCKDB_SRC/.github/patches/duckdb-r/*.patch; do
for filename in ${{ env.DUCKDB_SRC }}/.github/patches/duckdb-r/*.patch; do

(not that I am completely sure, but this seems to make more sense)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

$GITHUB_WORKSPACE is just the absolute path. we also use $GITHUB_WORKSPACE/$DUCKDB_SRC/ here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nvm, also realized that this was executing in the wrong directory

Copy link
Contributor

Choose a reason for hiding this comment

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

I got a bit lost with the directories, unsure.

Actually one thing you need to add, to handle the case of no files being there, is:

shopt -s nullglob

See for example this part of the Nightly workflow: https://github.com/duckdb/duckdb/blob/main/.github/workflows/NightlyTests.yml#L630

git apply $filename
done

# needed so we can run git commit in vendor.sh
- name: setup github and create parallel builds
shell: bash
Expand Down