Skip to content

Commit

Permalink
chore: Add aarch64 (ARM64) binaries to the release build #50
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Oct 24, 2022
1 parent 40c20ff commit c2be7b1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/release-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ docker build -f Dockerfile.linux-build -t linux-build .
mkdir -p target/artifacts
docker run -t --rm --user "$(id -u)":"$(id -g)" -v "$(pwd):/workspace" -w /workspace linux-build -c 'cargo build --release'
gzip -c target/release/pact-stub-server > target/artifacts/pact-stub-server-linux-x86_64.gz
openssl dgst -sha256 -r target/artifacts/pact-stub-server-linux-x86_64.gz > target/artifacts/pact-stub-server-linux-x86_64.gz.sha256

echo -- Build the aarch64 release artifacts --
cargo install cross
cross build --target aarch64-unknown-linux-gnu --release
gzip -c target/aarch64-unknown-linux-gnu/release/pact-stub-server > target/artifacts/pact-stub-server-linux-aarch64.gz
openssl dgst -sha256 -r target/artifacts/pact-stub-server-linux-aarch64.gz > target/artifacts/pact-stub-server-linux-aarch64.gz.sha256
8 changes: 8 additions & 0 deletions scripts/release-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,11 @@ set -e
mkdir -p target/artifacts
cargo build --release
gzip -c target/release/pact-stub-server > target/artifacts/pact-stub-server-osx-x86_64.gz
openssl dgst -sha256 -r target/artifacts/pact-stub-server-osx-x86_64.gz > target/artifacts/pact-stub-server-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_verifier_cli > target/artifacts/pact-stub-server-osx-aarch64.gz
openssl dgst -sha256 -r target/artifacts/pact-stub-server-osx-aarch64.gz > target/artifacts/pact-stub-server-osx-aarch64.gz.sha256

0 comments on commit c2be7b1

Please sign in to comment.