-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change pre-builds the pact node bindings with prebuildify Supported node versions are node LTS versions 16, 18, 20. Supported Platforms + Arches are now * Linux ARM64/X64 * MacOS ARM64/X64 * Windows X64 For the Pact FFI. This change additional includes the Pact-Ruby-Standalone updated to v2.x This brings is support for * Linux/MacOS ARM64 for the pact cli and api ## Requirements Users are no longer required to * Install a node-gyp build chain - Not limited to - Python - MSVS for Windows * Ensure `--ignore-scripts` is not set to true - This is because pact-js-core and the npm package pact-core will now come batteries included, which means the ffi and standalone come packaged in the npm package. This increases size, however all files have to be downloaded currently even if all are not used, so we might as well do this once for the user, rather than every user needing to, and possibly struggling due to various build system reasons related to node-gyp.
- Loading branch information
Showing
28 changed files
with
911 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,49 @@ | ||
env: | ||
PACT_BROKER_FEATURES: publish_pacts_using_old_api | ||
|
||
BUILD_TEST_TASK_TEMPLATE: &BUILD_TEST_TASK_TEMPLATE | ||
arch_check_script: | ||
- uname -am | ||
test_script: | ||
- node --version | ||
- script/ci/build-and-test.sh | ||
INSTALL_GH_CLI: &INSTALL_GH_CLI | ||
install_gh_cli_script: | | ||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ | ||
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ | ||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | ||
&& apt update \ | ||
&& apt install gh -y | ||
linux_arm64_task: | ||
RELEASE: &RELEASE | ||
release_script: ./script/ci/release.sh | ||
env: | ||
matrix: | ||
- IMAGE: node:16-slim | ||
- IMAGE: node:18-slim | ||
- IMAGE: node:20-slim | ||
arm_container: | ||
image: $IMAGE | ||
install_script: | ||
- apt update --yes && apt install --yes curl python3 make build-essential g++ unzip zip | ||
<< : *BUILD_TEST_TASK_TEMPLATE | ||
GITHUB_TOKEN: ENCRYPTED[636f316600928de28b5c36027cc39d9796bc0d0eca2a181368f255ad61540f13bb38cdce09b6428774f315bbf45e0ada] | ||
GH_PRE_RELEASE_UPLOAD: true | ||
|
||
linux_amd64_task: | ||
env: | ||
matrix: | ||
- IMAGE: node:16-slim | ||
- IMAGE: node:18-slim | ||
- IMAGE: node:20-slim | ||
container: | ||
image: $IMAGE | ||
install_script: | ||
- apt update --yes && apt install --yes curl python3 make build-essential g++ unzip zip | ||
<< : *BUILD_TEST_TASK_TEMPLATE | ||
PREBUILD_AND_TEST: &PREBUILD_AND_TEST | ||
prebuild_script: NODE_VERSION=20 script/ci/prebuild.sh | ||
<<: *RELEASE | ||
test_20_script: NODE_VERSION=20 script/ci/build-and-test.sh && script/ci/clean.sh | ||
test_18_script: NODE_VERSION=18 script/ci/build-and-test.sh && script/ci/clean.sh | ||
test_16_script: NODE_VERSION=16 script/ci/build-and-test.sh && script/ci/clean.sh | ||
|
||
mac_arm64_task: | ||
macos_instance: | ||
image: ghcr.io/cirruslabs/macos-ventura-base:latest | ||
linux_arm_task: | ||
env: | ||
PACT_BROKER_FEATURES: publish_pacts_using_old_api | ||
NVS_HOME: ${HOME}/.nvs | ||
PATH: ${NVS_HOME}:${PATH} | ||
matrix: | ||
- NODE_VERSION: 16 | ||
- NODE_VERSION: 18 | ||
- NODE_VERSION: 20 | ||
install_script: | ||
- brew install nvm | ||
- source $(brew --prefix nvm)/nvm.sh | ||
- nvm install $NODE_VERSION | ||
- nvm use $NODE_VERSION | ||
<< : *BUILD_TEST_TASK_TEMPLATE | ||
SET_NVM: "true" | ||
arm_container: | ||
# container: | ||
image: node:20-slim | ||
cirrus_setup_script: chmod +x script/**/* && chmod +x script/** | ||
setup_script: apt update --yes && apt install --yes curl python3 make build-essential g++ unzip zip libyaml-dev git | ||
dry_run_check_script: npx --yes commit-and-tag-version --dry-run && git remote -v | ||
pre_req_script: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash | ||
<<: *INSTALL_GH_CLI | ||
<<: *PREBUILD_AND_TEST | ||
artifacts: | ||
path: prebuilds/*.tar.gz | ||
|
||
mac_rosetta_task: | ||
macos_arm_task: | ||
macos_instance: | ||
image: ghcr.io/cirruslabs/macos-ventura-base:latest | ||
env: | ||
NVS_HOME: ${HOME}/.nvs | ||
PATH: ${NVS_HOME}:${PATH} | ||
matrix: | ||
- NODE_VERSION: 16 | ||
- NODE_VERSION: 18 | ||
- NODE_VERSION: 20 | ||
install nvs_script: | | ||
git clone https://github.com/jasongin/nvs "$NVS_HOME" | ||
. "$NVS_HOME/nvs.sh" install | ||
install_rosetta_script: softwareupdate --install-rosetta --agree-to-license | ||
install_x64_script: | | ||
. "$NVS_HOME/nvs.sh" | ||
nvs add $NODE_VERSION/x64 | ||
nvs use $NODE_VERSION/x64 | ||
file $(which node) | grep -e 'x64' | ||
node --version | ||
<< : *BUILD_TEST_TASK_TEMPLATE | ||
SET_NVM: "true" | ||
cirrus_setup_script: chmod +x script/**/* && chmod +x script/** | ||
dry_run_check_script: | | ||
npx --yes commit-and-tag-version --dry-run && git remote -v | ||
pre_req_script: brew install nvm | ||
<<: *PREBUILD_AND_TEST | ||
artifacts: | ||
path: prebuilds/*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.