mirror of
https://gitlab.com/signald/libraries/libsignal-client.git
synced 2024-12-04 19:46:37 +00:00
cleanup multi-arch darwin build
This commit is contained in:
parent
a5cd0eea35
commit
7eb2f5ba43
1 changed files with 15 additions and 30 deletions
|
@ -22,6 +22,13 @@ variables:
|
|||
rules:
|
||||
- when: on_success
|
||||
|
||||
.multitarget-darwin:
|
||||
parallel:
|
||||
matrix:
|
||||
- TARGET:
|
||||
- x86_64-apple-darwin
|
||||
- aarch64-apple-darwin
|
||||
|
||||
compile:
|
||||
extends: .multitarget
|
||||
image: rust:slim-buster
|
||||
|
@ -38,39 +45,18 @@ compile:
|
|||
paths:
|
||||
- libsignal_jni-$TARGET.so
|
||||
|
||||
compile x86_64-apple-darwin:
|
||||
compile darwin:
|
||||
extends: .multitarget-darwin
|
||||
stage: native library
|
||||
tags: [darwin-builder]
|
||||
script:
|
||||
- git clone https://github.com/signalapp/libsignal-client
|
||||
- cd libsignal-client && git checkout "$libsignal_version"
|
||||
- RUSTFLAGS='-C link-arg=-s' cargo build -p libsignal-jni --release --verbose
|
||||
- cp -v target/release/libsignal_jni.dylib ../libsignal_jni-x86_64-apple-darwin.dylib
|
||||
- RUSTFLAGS='-C link-arg=-s' cargo build -p libsignal-jni --target "${TARGET}" --release --verbose
|
||||
- cp -v target/${TARGET}/release/libsignal_jni.dylib ../libsignal_jni-${TARGET}.dylib
|
||||
artifacts:
|
||||
paths:
|
||||
- libsignal_jni-x86_64-apple-darwin.dylib
|
||||
variables:
|
||||
TARGET: x86_64-apple-darwin
|
||||
rules:
|
||||
- if: '$CI_PROJECT_ROOT_NAMESPACE == "signald"'
|
||||
when: on_success
|
||||
- when: manual
|
||||
allow_failure: true
|
||||
|
||||
compile aarch64-apple-darwin:
|
||||
stage: native library
|
||||
tags: [darwin-builder]
|
||||
script:
|
||||
- git clone https://github.com/signalapp/libsignal-client
|
||||
- cd libsignal-client && git checkout "$libsignal_version"
|
||||
- rustup target add aarch64-apple-darwin
|
||||
- RUSTFLAGS='-C link-arg=-s' cargo build -p libsignal-jni --target aarch64-apple-darwin --release --verbose
|
||||
- cp -v target/aarch64-apple-darwin/release/libsignal_jni.dylib ../libsignal_jni-aarch64-apple-darwin.dylib
|
||||
artifacts:
|
||||
paths:
|
||||
- libsignal_jni-aarch64-apple-darwin.dylib
|
||||
variables:
|
||||
TARGET: aarch64-apple-darwin
|
||||
- libsignal_jni-$TARGET.dylib
|
||||
rules:
|
||||
- if: '$CI_PROJECT_ROOT_NAMESPACE == "signald"'
|
||||
when: on_success
|
||||
|
@ -92,11 +78,12 @@ jar:
|
|||
- cd java
|
||||
- gradle assemble publish
|
||||
|
||||
jar x86_64-apple-darwin:
|
||||
jar darwin:
|
||||
extends: .multitarget-darwin
|
||||
image: gradle:7
|
||||
stage: bindings
|
||||
tags: [darwin-builder]
|
||||
needs: ["compile x86_64-apple-darwin"]
|
||||
needs: ["compile darwin"]
|
||||
script:
|
||||
- git clone https://github.com/signalapp/libsignal-client
|
||||
- cd libsignal-client && git checkout "$libsignal_version"
|
||||
|
@ -106,8 +93,6 @@ jar x86_64-apple-darwin:
|
|||
- cp "../libsignal_jni-${TARGET}.dylib" java/shared/resources/libsignal_jni.dylib
|
||||
- cd java
|
||||
- gradle assemble publish
|
||||
variables:
|
||||
TARGET: x86_64-apple-darwin
|
||||
rules:
|
||||
- if: '$CI_PROJECT_ROOT_NAMESPACE == "signald"'
|
||||
when: on_success
|
||||
|
|
Loading…
Reference in a new issue