Skip to content

ci(development): update workflow path filters for detecting changes#9

Closed
coreyhn wants to merge 2 commits into
mainfrom
ci/update-workflow-path-filters-for-force-rebuilds
Closed

ci(development): update workflow path filters for detecting changes#9
coreyhn wants to merge 2 commits into
mainfrom
ci/update-workflow-path-filters-for-force-rebuilds

Conversation

@coreyhn
Copy link
Copy Markdown
Collaborator

@coreyhn coreyhn commented Jun 27, 2025

Add platform native library files to Rust change detection. This allows force rebuilds by deleting libraries when a clean rebuild of all platforms is needed. This approach integrates cleanly with the existing PR workflow without requiring manual workflow triggers or version bumps.

The library commit in PR #8 failed to update all platforms, maybe due to a transient issue with the commit action. A validation step may be needed if this rebuild resolves the issue.

coreyhn and others added 2 commits June 27, 2025 17:09
Add platform native library files to Rust change detection. This allows
force rebuilds by deleting libraries when a clean rebuild of all
platforms is needed. This approach integrates cleanly with the existing
PR workflow without requiring manual workflow triggers or version bumps.

The library commit in PR #8 failed to update all platforms, maybe due
to a transient issue with the commit action. A validation step may be
needed if this rebuild resolves the issue.
@coreyhn coreyhn marked this pull request as draft June 27, 2025 23:26
@coreyhn
Copy link
Copy Markdown
Collaborator Author

coreyhn commented Jun 28, 2025

There is still an issue with the committed libraries. This is due to the use of the getsentry/action-github-commit action:

- name: Commit all native libraries
uses: getsentry/action-github-commit@v2.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
message: |
build(platforms): update all native libraries
Source: ${{ steps.source-commit.outputs.sha }}

The .gitattributes file should prevent this, but this action bypasses git's normal text/binary detection and reads all files as buffers and then converts them to UTF-8 strings with Buffer.toString(), causing binary data to be corrupted with UTF-8 replacement characters:

# Working library from build job before commit
platforms/darwin-x64/libprotect_ffi.dylib: Mach-O 64-bit dynamically linked shared library x86_64

# Corrupted library in branch after commit
platforms/darwin-x64/libprotect_ffi.dylib: data
# File size comparison
Working:    2861156 bytes
Corrupted:  4781434 bytes
# Hex dump comparison (first 32 bytes)
Working:
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  |................|
Corrupted:
00000000  ef bf bd ef bf bd ef bf  bd ef bf bd 07 00 00 01  |................|
00000010  03 00 00 00 06 00 00 00  10 00 00 00 ef bf bd 08  |................|

I added this action right before PR #1 to get verified commits by github-actions[bot] by using the GitHub API instead of using normal git operations (and having to manage GPG keys). The commits are "verified," but the libraries are definitely not.

coreyhn added a commit that referenced this pull request Jun 28, 2025
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.
@coreyhn coreyhn closed this Jun 28, 2025
@coreyhn coreyhn deleted the ci/update-workflow-path-filters-for-force-rebuilds branch June 28, 2025 18:17
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.

1 participant