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: alpine support #507

Merged
merged 7 commits into from
Jun 20, 2024
Merged

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented May 13, 2024

fixes #490

@mefellows
Copy link
Member

Amazing - will try and look today Yousaf! 👏

@YOU54F
Copy link
Member Author

YOU54F commented May 13, 2024

No rush at all dude!

@YOU54F
Copy link
Member Author

YOU54F commented May 28, 2024

switching this to a draft, as there are a couple of additional things I want to do

  • switch to musl *.so (smaller)

but few changes I want to make in pact-ref with regards to some linker errors and content-type issues

pact-foundation/pact-reference#416 (comment)

YOU54F/pact-reference#3

src/ffi/index.ts Outdated Show resolved Hide resolved
script/lib/download-ffi.sh Outdated Show resolved Hide resolved

. "${SCRIPT_DIR}/lib/export-binary-versions.sh"
"${SCRIPT_DIR}/install-plugin-cli.sh"
$HOME/.pact/bin/pact-plugin-cli install -y https://github.com/mefellows/pact-matt-plugin/releases/tag/$PACT_PLUGIN_MATT_VERSION
Copy link
Member Author

Choose a reason for hiding this comment

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

should we add matt plugin the pact plugin index to save having to install it manually here and in the pact-go test suite?

Copy link
Member Author

Choose a reason for hiding this comment

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

builds and tests amd64/arm64 linux versions of glibc + musl variants of vanilla node images (-slim / -alpine respectively)

"libraries": [
"<(module_root_dir)/ffi/pact_ffi.dll.lib"
"variables": {
"is_alpine": "<!(grep -q Alpine /etc/os-release && echo true || echo false)"
Copy link
Member Author

Choose a reason for hiding this comment

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

This file is essentially the same despite the white space changes.

We check if the os is alpine and then build the musl bindings.

node-gyp-build detects musl at runtime when loading the libraries, so will correctly pick between musl/glibc as required

script/ci/prebuild-alpine.sh Outdated Show resolved Hide resolved
script/ci/build-and-test.sh Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
src/ffi/internals/index.ts Outdated Show resolved Hide resolved
@YOU54F YOU54F merged commit 791ed5e into pact-foundation:master Jun 20, 2024
34 checks passed
@YOU54F YOU54F deleted the feat/alpine_support branch June 26, 2024 01:02
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.

RFC: Support Alpine
2 participants