forked from pact-foundation/pact-reference
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
4 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 |
---|---|---|
|
@@ -30,18 +30,42 @@ rustup run nightly cbindgen \ | |
cp include/*.h ../release_artifacts | ||
|
||
echo -- Build the musl release artifacts -- | ||
sudo apt install musl-tools | ||
rustup target add x86_64-unknown-linux-musl | ||
cargo build --release --target=x86_64-unknown-linux-musl | ||
cargo install [email protected] | ||
cross build --release --target=x86_64-unknown-linux-musl | ||
gzip -c ../target/x86_64-unknown-linux-musl/release/libpact_ffi.a > ../release_artifacts/libpact_ffi-linux-x86_64-musl.a.gz | ||
openssl dgst -sha256 -r ../release_artifacts/libpact_ffi-linux-x86_64-musl.a.gz > ../release_artifacts/libpact_ffi-linux-x86_64-musl.a.gz.sha256 | ||
|
||
cargo install [email protected] | ||
mkdir tmp | ||
cp ../target/x86_64-unknown-linux-musl/release/libpact_ffi.a tmp/ | ||
docker run --platform=linux/amd64 --rm -it -v $PWD/tmp:/scratch alpine /bin/sh -c 'apk add --no-cache musl-dev gcc && \ | ||
cd /scratch && \ | ||
ar -x libpact_ffi.a && \ | ||
gcc -shared *.o -o libpact_ffi.so && \ | ||
rm -f *.o' | ||
|
||
gzip -c tmp/libpact_ffi.so > ../release_artifacts/libpact_ffi-linux-x86_64-musl.so.gz | ||
openssl dgst -sha256 -r ../release_artifacts/libpact_ffi-linux-x86_64-musl.so.gz > ../release_artifacts/libpact_ffi-linux-x86_64-musl.so.gz.sha256 | ||
rm -rf tmp | ||
|
||
|
||
echo -- Build the musl aarch64 release artifacts -- | ||
cargo clean | ||
cross build --release --target=aarch64-unknown-linux-musl | ||
gzip -c ../target/aarch64-unknown-linux-musl/release/libpact_ffi.a > ../release_artifacts/libpact_ffi-linux-aarch64-musl.a.gz | ||
openssl dgst -sha256 -r ../release_artifacts/libpact_ffi-linux-aarch64-musl.a.gz > ../release_artifacts/libpact_ffi-linux-aarch64-musl.a.gz.sha256 | ||
|
||
mkdir tmp | ||
cp ../target/aarch64-unknown-linux-musl/release/libpact_ffi.a tmp/ | ||
docker run --platform=linux/arm64 --rm -it -v $PWD/tmp:/scratch alpine /bin/sh -c 'apk add --no-cache musl-dev gcc && \ | ||
cd /scratch && \ | ||
ar -x libpact_ffi.a && \ | ||
gcc -shared *.o -o libpact_ffi.so && \ | ||
rm -f *.o' | ||
|
||
gzip -c tmp/libpact_ffi.so > ../release_artifacts/libpact_ffi-linux-aarch64-musl.so.gz | ||
openssl dgst -sha256 -r ../release_artifacts/libpact_ffi-linux-aarch64-musl.so.gz > ../release_artifacts/libpact_ffi-linux-aarch64-musl.so.gz.sha256 | ||
rm -rf tmp | ||
|
||
echo -- Build the aarch64 release artifacts -- | ||
cargo clean | ||
cross build --target aarch64-unknown-linux-gnu --release | ||
|