-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Build and Publish refactor #8
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors how the C++ Linux bindings are built and published to JSR, moving to a reusable artifact-based pipeline and a new JSR package layout. It also adds CI workflows for C++ and Deno integration tests.
Changes:
- Introduced a new JSR package structure under
jsr/with a TypeScript entrypoint (src/bin/index.ts) and explicitjsr.jsonmanifest. - Replaced the previous in-place “embed binary” script with dedicated shell scripts for copying the built
.so, converting it to JSON/base64, and stamping the JSR version. - Added/updated GitHub Actions workflows to build the shared library once, publish a serialized binary to JSR via a reusable workflow, and run C++ and Deno integration tests.
Reviewed changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| jsr/src/bin/index.ts | Adds a TypeScript module that re-exports the serialized x86_64 binary JSON for consumers of @serial/cpp-bindings-linux/bin. |
| jsr/scripts/set_version.sh | Adds a helper script to inject the computed version into jsr/jsr.json before publishing. |
| jsr/scripts/copy_binary.sh | Adds a script to copy the built shared library into the JSR package’s bin/ directory. |
| jsr/scripts/binary_to_json.sh | Adds a script to convert the shared library into a base64-encoded JSON blob with metadata for JSR. |
| jsr/package/jsr.json.in | Removes the old CMake-templated JSR manifest used under the previous jsr/package structure. |
| jsr/package/README.md | Removes the legacy README associated with the old jsr/package layout. |
| jsr/package/.gitignore | Removes legacy ignore rules for the old jsr/package/jsr.json. |
| jsr/jsr.json | Introduces a new, version-stamped JSR manifest at the jsr/ root, exporting ./bin via src/bin/index.ts and defining publish include patterns. |
| jsr/README.md | Adds an updated README for the JSR package, including usage and CI badges. |
| jsr/LICENSE | Adds an LGPLv3 license file scoped to the JSR package. |
| jsr/.gitignore | Ignores generated binary artifacts under jsr/bin/ while allowing tracked sources under jsr/src/bin/. |
| CMakeLists.txt | Updates cmake_git_versioning to v1.1.0 and writes env.sh with PACKAGE_VERSION for use by CI workflows. |
| .github/workflows/publish_jsr.yml | Adds a reusable workflow that prepares artifacts (copy & JSON-encode the binary, set manifest version) and publishes or dry-runs deno publish. |
| .github/workflows/publish-jsr.yml | Removes the old, monolithic “build and publish to JSR” workflow in favor of the new artifact-based pipeline. |
| .github/workflows/deno_tests.yml | Adds a Deno-based integration test workflow that builds the project in a container and runs tests against a virtual serial port. |
| .github/workflows/cpp_tests.yml | Adds a Fedora-based C++ test workflow that builds the project and runs the cpp_bindings_linux_tests suite. |
| .github/workflows/build_binary.yml | Adds a dedicated workflow to build the shared library, capture PACKAGE_VERSION from env.sh, upload the .so artifact, and call the reusable publish_jsr workflow. |
| .github/workflows/build-deno-so.yml | Removes the old workflow that built and uploaded a Deno-targeted .so artifact, superseded by the new build-and-publish pipeline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
shfiles