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

Feat/optional arch specific binaries #605

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented Jan 22, 2025

The following PR will

support libpact_ffi & pact-js-core node bindings to be published in seperate npm packages.

these are segmented by ${os}-{arch}-{libc}

users should not need to require these automatically, npm should determine the required
optional dependency to download at install time.

supported_platforms

"@pact-foundation/pact-core-darwin-arm64": "16.0.0",
"@pact-foundation/pact-core-darwin-x64": "16.0.0",
"@pact-foundation/pact-core-linux-arm64-glibc": "16.0.0",
"@pact-foundation/pact-core-linux-arm64-musl": "16.0.0",
"@pact-foundation/pact-core-linux-x64-glibc": "16.0.0",
"@pact-foundation/pact-core-linux-x64-musl": "16.0.0",
"@pact-foundation/pact-core-windows-x64": "16.0.0"

CI Improvements

Significant build time reductions, by reducing the times when prebuilds are created.

  • libpact_ffi node bindings as prebuilds will only be created on master
  • test suite will download the latest release prebuilds via gh cli, if not on a master branch

This could be further improved to

  • build node bindings & prebuilds, on pull requests, where
    • the libpact_ffi version has changed
    • the code in native or the bindings.gyp changes
  • allow top level job conditional skipping.
    • it appears you cannot skip an entire job based on a condition, which is a pre-requisite for another job, so you have to nested the condition at each step level.

Testing

Consumed in pact-js, via scoped publish, shown tested in following forked PR

Has been tested with yarn and npm, but ideally wants testing with pnpm as well prior to release

@YOU54F YOU54F force-pushed the feat/optional_arch_specific_binaries branch 2 times, most recently from dbaf798 to 2e4ceee Compare January 23, 2025 18:37
support libpact_ffi & pact-js-core node bindings to be published in seperate npm packages.

these are segmented by os-arch-libc

users should not need to require these automatically, npm should determine the required
optional dependency to download at install time.

supported_platforms

    "@pact-foundation/pact-core-darwin-arm64": "16.0.0",
    "@pact-foundation/pact-core-darwin-x64": "16.0.0",
    "@pact-foundation/pact-core-linux-arm64-glibc": "16.0.0",
    "@pact-foundation/pact-core-linux-arm64-musl": "16.0.0",
    "@pact-foundation/pact-core-linux-x64-glibc": "16.0.0",
    "@pact-foundation/pact-core-linux-x64-musl": "16.0.0",
    "@pact-foundation/pact-core-windows-x64": "16.0.0"
@YOU54F YOU54F force-pushed the feat/optional_arch_specific_binaries branch from 10e0f03 to 2ccfe78 Compare January 24, 2025 16:15
@YOU54F YOU54F marked this pull request as ready for review January 24, 2025 22:19
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