mirror of
https://gitlab.com/signald/libraries/libsignal-client.git
synced 2024-12-04 19:46:37 +00:00
79 lines
No EOL
2.4 KiB
YAML
79 lines
No EOL
2.4 KiB
YAML
stages:
|
|
- native library
|
|
- bindings
|
|
|
|
variables:
|
|
version: "v0.9.7"
|
|
GRADLE_OPTS: -Dorg.gradle.daemon=false
|
|
|
|
.multitarget:
|
|
parallel:
|
|
matrix:
|
|
- TARGET:
|
|
- aarch64-unknown-linux-gnu
|
|
- arm-unknown-linux-gnueabi
|
|
- arm-unknown-linux-gnueabihf
|
|
- armv7-unknown-linux-gnueabihf
|
|
- x86_64-unknown-linux-gnu
|
|
|
|
compile:
|
|
extends: .multitarget
|
|
image: rust:slim-bullseye
|
|
stage: native library
|
|
before_script:
|
|
- ./prepare-env.sh
|
|
script:
|
|
- git clone https://github.com/signalapp/libsignal-client
|
|
- cd libsignal-client && git checkout "$version"
|
|
- rustup target add "${TARGET}"
|
|
- RUSTFLAGS='-C link-arg=-s' cargo build -p libsignal-jni --target "${TARGET}" --release --verbose
|
|
- cp -v target/${TARGET}/release/libsignal_jni.so ../libsignal_jni-${TARGET}.so
|
|
artifacts:
|
|
paths:
|
|
- libsignal_jni-$TARGET.so
|
|
|
|
compile x86_64-apple-darwin:
|
|
stage: native library
|
|
tags: [darwin-builder]
|
|
script:
|
|
- git clone https://github.com/signalapp/libsignal-client
|
|
- cd libsignal-client && git checkout "$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
|
|
artifacts:
|
|
paths:
|
|
- libsignal_jni-x86_64-apple-darwin.dylib
|
|
variables:
|
|
TARGET: x86_64-apple-darwin
|
|
|
|
jar:
|
|
extends: .multitarget
|
|
image: gradle:7
|
|
stage: bindings
|
|
needs: ["compile"]
|
|
script:
|
|
- git clone https://github.com/signalapp/libsignal-client
|
|
- cd libsignal-client && git checkout "$version"
|
|
- git config user.email nobody@signald.org && git config user.name signald
|
|
- git am ../libsignal.patch
|
|
- mkdir -p java/java/src/main/resources
|
|
- cp "../libsignal_jni-${TARGET}.so" java/java/src/main/resources/libsignal_jni.so
|
|
- cd java
|
|
- gradle assemble publish
|
|
|
|
jar x86_64-apple-darwin:
|
|
image: gradle:7
|
|
stage: bindings
|
|
tags: [darwin-builder]
|
|
needs: ["compile x86_64-apple-darwin"]
|
|
script:
|
|
- git clone https://github.com/signalapp/libsignal-client
|
|
- cd libsignal-client && git checkout "$version"
|
|
- git config user.email nobody@signald.org && git config user.name signald
|
|
- git am ../libsignal.patch
|
|
- mkdir -p java/java/src/main/resources
|
|
- cp "../libsignal_jni-${TARGET}.dylib" java/java/src/main/resources/libsignal_jni.dylib
|
|
- cd java
|
|
- gradle assemble publish
|
|
variables:
|
|
TARGET: x86_64-apple-darwin |