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: pact_mock_server_cli osx aarch64 #266

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions .cirrus.yml
@@ -0,0 +1,31 @@
BUILD_TEST_TASK_TEMPLATE: &BUILD_TEST_TASK_TEMPLATE
test_pact_mock_server_cli_script: |
cd rust/pact_mock_server_cli
cargo build --target ${BUILD_TARGET} --release
../target/${BUILD_TARGET}/release/pact_mock_server_cli --help
rm -rf ../target/
test_pact_verifier_cli_script: |
cd rust/pact_verifier_cli
cargo build --target ${BUILD_TARGET} --release
../target/${BUILD_TARGET}/release/pact_verifier_cli --help


linux_arm64_task:
arm_container:
image: rustlang/rust:nightly
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to need nightly here, I would prefer to run on stable and/or beta

Copy link
Member Author

@YOU54F YOU54F Apr 13, 2023

Choose a reason for hiding this comment

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

Yeah I would have thought that too, I chose it as it was from the release flow where these get built

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly

Although that only appears before the FFI run (which is maybe more suspect) especially in a release run

kicked off a run against stable tag now - https://cirrus-ci.com/build/4982626734309376

cpu: 4
memory: 12G
env:
BUILD_TARGET: aarch64-unknown-linux-gnu
<< : *BUILD_TEST_TASK_TEMPLATE

macosx_arm64_task:
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-base:latest
setup_script: brew install rust
env:
BUILD_TARGET: aarch64-apple-darwin
<< : *BUILD_TEST_TASK_TEMPLATE



11 changes: 10 additions & 1 deletion rust/pact_mock_server_cli/release-osx.sh
Expand Up @@ -7,4 +7,13 @@ cargo build --release
gzip -c ../target/release/pact_mock_server_cli > ../target/artifacts/pact_mock_server_cli-osx-x86_64.gz
#cargo build --release --target x86_64-apple-ios
#gzip -c ../target/x86_64-apple-ios/release/pact_mock_server_cli > ../target/artifacts/pact_mock_server_cli-ios-x86_64.gz
openssl dgst -sha256 -r ../target/artifacts/pact_mock_server_cli-osx-x86_64.gz > ../target/artifacts/pact_mock_server_cli-osx-x86_64.gz.sha256
openssl dgst -sha256 -r ../target/artifacts/pact_mock_server_cli-osx-x86_64.gz > ../target/artifacts/pact_mock_server_cli-osx-x86_64.gz.sha256


# M1
export SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path)
export MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version)
cargo build --target aarch64-apple-darwin --release

gzip -c ../target/aarch64-apple-darwin/release/pact_mock_server_cli > ../target/artifacts/pact_mock_server_cli-osx-aarch64.gz
openssl dgst -sha256 -r ../target/artifacts/pact_mock_server_cli-osx-aarch64.gz > ../target/artifacts/pact_mock_server_cli-osx-aarch64.gz.sha256