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

POC: Tar ball compressed bindings #245

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,12 @@ jobs:
ln --force -s "$(ls -1 ./bindings-${x}-*.rs | grep -v devel | sort | tail -1)" ./bindings-${x}.rs
done
cd ..
- name: Compress bindings tar ball
run: |
tar cJfh bindings.tar.xz bindings/
- name: Add generated bindings
run: |
git add bindings/
git add bindings.tar.xz
git config --local user.name "${GITHUB_ACTOR}"
git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git commit -m "Update bindings [skip ci]"
Expand Down Expand Up @@ -339,9 +342,10 @@ jobs:
cd ..

# detect changes (the code is derived from https://stackoverflow.com/a/3879077)
git add bindings/
tar cJfh bindings.tar.xz bindings/
git add bindings.tar.xz
git update-index --refresh
if ! git diff-index --quiet HEAD -- bindings/; then
if ! git diff-index --quiet HEAD -- bindings.tar.xz; then
Comment on lines -344 to +348
Copy link
Member

Choose a reason for hiding this comment

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

This should still be a diff on the text files and then just push the tar-file if needed.

I also think the tar-file should be pushed using git lfs right?

git config --local user.name "${GITHUB_ACTOR}"
git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git commit -m "Update bindings [skip ci]"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ Cargo.lock

# Windows users need to add some settings to let rust-analyzer work.
/.vscode/settings.json

/bindings/
Binary file added bindings.tar.xz
Binary file not shown.
Loading