Skip to content

fix(ci): fix native library commit workflow#10

Merged
coreyhn merged 5 commits into
mainfrom
fix/ci-native-library-commit-workflow
Jun 30, 2025
Merged

fix(ci): fix native library commit workflow#10
coreyhn merged 5 commits into
mainfrom
fix/ci-native-library-commit-workflow

Conversation

@coreyhn
Copy link
Copy Markdown
Collaborator

@coreyhn coreyhn commented Jun 28, 2025

This PR fixes the native library commit workflow by replacing the current commit action with actions/github-script for proper Base64 encoding while maintaining verified commits from the bot. This fixes binary corruption issues in the previous commit workflow as discussed in PR #9.

Additionally, this PR removes the .gitattributes file (from PR #8) since this is no longer needed due to the GitHub API bypassing git's text transformation logic.

It also updates artifact uploads when building native libraries to no longer include the READMEs, which will reduce upload size (albeit small) and keep the focus on what's required.

Lastly, it removes an unnecessary exclude rule from Cargo.toml for native library files that aren't present in the crates/protect-ffi directory.

coreyhn and others added 5 commits June 28, 2025 12:10
Replace incompatible commit action with GitHub API using
`actions/github-script` for proper Base64 encoding while
maintaining verified commits from the bot.

Fixes binary corruption issues in the previous commit workflow as
discussed in PR #9.
Remove `.gitattributes` file (from PR #8) which is no longer needed since
the GitHub API bypasses git's text transformation logic.
Update artifact uploads when building native libraries to only include
native libraries, reducing upload size and focusing on only
what's required.
Remove unused exclude rule for native library files that aren't present
in the `crates/protect-ffi` directory.
@coreyhn
Copy link
Copy Markdown
Collaborator Author

coreyhn commented Jun 28, 2025

Unlike as shown in PR #9, the built and committed libraries are now identical:

Before commit: platforms/darwin-x64/libprotect_ffi.dylib: Mach-O 64-bit dynamically linked shared library x86_64
After commit:  platforms/darwin-x64/libprotect_ffi.dylib: Mach-O 64-bit dynamically linked shared library x86_64
Before commit: 2861156 bytes
After commit:  2861156 bytes
# Before:
00000000  cf fa ed fe 07 00 00 01  03 00 00 00 06 00 00 00  |................|
00000010  10 00 00 00 88 08 00 00  85 00 90 00 00 00 00 00  |................|

# After
00000000  cf fa ed fe 07 00 00 01  03 00 00 00 06 00 00 00  |................|
00000010  10 00 00 00 88 08 00 00  85 00 90 00 00 00 00 00  |................|

Prebuilt libraries are, well as you'd expect, working now.

@coreyhn coreyhn requested a review from calvinbrewer June 30, 2025 14:11
@coreyhn coreyhn merged commit e75036d into main Jun 30, 2025
@coreyhn coreyhn deleted the fix/ci-native-library-commit-workflow branch June 30, 2025 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants