mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-01-31 17:34:48 +01:00
e7f8fa21cb
Squashed commit of the following: commit 4491c65b1bfa8f507e9c998878254d61bc52f962 Merge: 51ff716f 77865a14 Author: tzugen <67737443+tzugen@users.noreply.github.com> Date: Tue Jun 21 20:50:05 2022 +0200 Merge branch 'develop' into gradle-update commit 51ff716ff5fc8aeb29bc557844747c0127ab1f78 Author: Holger Müller <github@euhm.de> Date: Tue Jun 21 20:38:52 2022 +0200 fixed lint warning commit 18c31a5704e7d92a04009e2f3ed8f8b9ca28b577 Author: Holger Müller <github@euhm.de> Date: Tue Jun 21 20:38:35 2022 +0200 fixed lint warning commit 603654c262ed86a66b4127513764cd252cdedfff Author: Holger Müller <github@euhm.de> Date: Tue Jun 21 20:37:51 2022 +0200 API is > lollipop ... target removed commit b38a7211de0f206465640d39f8f3189695afbd38 Author: Holger Müller <github@euhm.de> Date: Tue Jun 21 20:37:07 2022 +0200 new created after fixes commit 4929a526f7e9154755cae2c16fdf431550ae2c2a Author: tzugen <tzugen@riseup.net> Date: Tue Jun 21 10:43:16 2022 +0200 Disable ObsoleteLintCustomCheck commit d0c30f0b6b1d4de2f3c46a166a4f1058223ad3a8 Author: tzugen <tzugen@riseup.net> Date: Tue Jun 21 10:14:06 2022 +0200 Update more libs commit e2fa447bbfbd19119393297c19de0f3237e1ccd3 Merge: d4ead495 ff9c7b24 Author: tzugen <67737443+tzugen@users.noreply.github.com> Date: Tue Jun 21 09:47:03 2022 +0200 Merge branch 'develop' into gradle-update commit d4ead49548d11f51dd9c29478972dcd4553d352a Merge: 2dac6a7e 9a73d72f Author: Holger Müller <github@euhm.de> Date: Tue Jun 21 08:50:42 2022 +0200 merged with develop branch commit 2dac6a7e01e4ce5dc619426553ea08743bd9524e Author: Holger Müller <github@euhm.de> Date: Mon Jun 20 21:45:22 2022 +0200 update to android image tag 2022.06.1 commit f3dc259c390c256a66f96c3f003e34daf0fdea14 Author: Holger Müller <github@euhm.de> Date: Mon Jun 20 20:56:37 2022 +0200 rebuild lint-baseline.xml commit c71bc1212a8570f8ee99a80926c7b3b6036c672f Author: Holger Müller <github@euhm.de> Date: Mon Jun 20 20:55:00 2022 +0200 removed unneeded cast commit eca136dabedab838e8a02be1a6fd740c4d0934ec Author: Holger Müller <github@euhm.de> Date: Fri Jun 17 23:58:37 2022 +0200 commit signed commit 540f47633485cddeb4e68626532e54707a66bab8 Author: Holger Müller <github@euhm.de> Date: Fri Jun 17 23:40:59 2022 +0200 commit signed Signed-off-by: Holger Müller <github@euhm.de> commit 986bd013a49afc56ff8992634f2ce126339eecfc Author: Holger Müller <github@euhm.de> Date: Fri Jun 17 23:27:20 2022 +0200 push to latest gradle version, set targetSdk to 33 Signed-off-by: tzugen <tzugen@riseup.net>
155 lines
5.3 KiB
YAML
155 lines
5.3 KiB
YAML
version: 2.1
|
|
parameters:
|
|
memory-config:
|
|
type: string
|
|
default: "-Xmx3200m -Xms256m -XX:MaxMetaspaceSize=1g"
|
|
memory-config-debug:
|
|
type: string
|
|
default: "-Xmx3200m -Xms256m -XX:MaxMetaspaceSize=1g -verbose:gc -Xlog:gc*"
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: cimg/android:2022.06.1
|
|
working_directory: ~/ultrasonic
|
|
environment:
|
|
JVM_OPTS: << pipeline.parameters.memory-config >>
|
|
JAVA_TOOL_OPTIONS: << pipeline.parameters.memory-config >>
|
|
GRADLE_OPTS: << pipeline.parameters.memory-config >>
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- v2-ultrasonic-{{ .Branch }}-{{ checksum "gradle/libs.versions.toml" }}
|
|
- v2-ultrasonic-{{ .Branch }}
|
|
- v2-ultrasonic
|
|
- run:
|
|
name: configure gradle.properties for CI building
|
|
command: |
|
|
sed -i '/^org.gradle.jvmargs/d' gradle.properties
|
|
sed -i 's/^org.gradle.daemon=true/org.gradle.daemon=false/g' gradle.properties
|
|
cat gradle.properties
|
|
- run:
|
|
name: checkstyle
|
|
command: ./gradlew -Pqc ktlintCheck
|
|
- run:
|
|
name: static analysis
|
|
command: ./gradlew -Pqc detekt
|
|
- run:
|
|
name: build debug
|
|
command: ./gradlew assembleDebug
|
|
- run:
|
|
name: unit-tests
|
|
command: |
|
|
./gradlew ciTest testDebugUnitTest
|
|
- run:
|
|
name: lint
|
|
command: ./gradlew :ultrasonic:lintRelease
|
|
- run:
|
|
name: build
|
|
command: ./gradlew buildRelease
|
|
- run:
|
|
name: assemble release
|
|
command: ./gradlew assembleRelease
|
|
- save_cache:
|
|
paths:
|
|
- ~/.gradle
|
|
key: v2-ultrasonic-{{ .Branch }}-{{ checksum "gradle/libs.versions.toml" }}
|
|
- store_artifacts:
|
|
path: ultrasonic/build/reports
|
|
destination: reports
|
|
- store_artifacts:
|
|
path: subsonic-api/build/reports
|
|
destination: reports
|
|
push_translations:
|
|
docker:
|
|
- image: cimg/python:3.6
|
|
working_directory: ~/ultrasonic
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: install transifex client
|
|
command: |
|
|
python -m venv ~/venv
|
|
. ~/venv/bin/activate
|
|
pip install transifex-client
|
|
- run:
|
|
name: configure transifex client
|
|
command: echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = api\npassword = '"${TRANSIFEX_PASSWORD}"$'\n' > ~/.transifexrc
|
|
- run:
|
|
name: push changes in translation files
|
|
command: |
|
|
. ~/venv/bin/activate
|
|
tx push -s
|
|
generate_signed_apk:
|
|
docker:
|
|
- image: cimg/android:2022.06.1
|
|
working_directory: ~/ultrasonic
|
|
environment:
|
|
JVM_OPTS: << pipeline.parameters.memory-config >>
|
|
JAVA_TOOL_OPTIONS: << pipeline.parameters.memory-config >>
|
|
GRADLE_OPTS: << pipeline.parameters.memory-config >>
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- v2-ultrasonic-{{ .Branch }}-{{ checksum "gradle/libs.versions.toml" }}
|
|
- v2-ultrasonic-{{ .Branch }}
|
|
- v2-ultrasonic
|
|
- run:
|
|
name: decrypt ultrasonic-keystore
|
|
command: openssl aes-256-cbc -K ${ULTRASONIC_KEYSTORE_KEY} -iv ${ULTRASONIC_KEYSTORE_IV} -in ultrasonic-keystore.enc -out ultrasonic-keystore -d
|
|
- run:
|
|
name: build release apk
|
|
command: ./gradlew build assembleRelease
|
|
- run:
|
|
name: sign release apk
|
|
command: |
|
|
export PATH="${JAVA_HOME}/bin:${PATH}"
|
|
mkdir -p /tmp/ultrasonic-release
|
|
${ANDROID_HOME}/build-tools/32.0.0/zipalign -v 4 ultrasonic/build/outputs/apk/release/ultrasonic-release-unsigned.apk /tmp/ultrasonic-release/ultrasonic-${CIRCLE_TAG}.apk
|
|
${ANDROID_HOME}/build-tools/32.0.0/apksigner sign --verbose --ks ~/ultrasonic/ultrasonic-keystore --ks-pass pass:${ULTRASONIC_KEYSTORE_STOREPASS} --key-pass pass:${ULTRASONIC_KEYSTORE_KEYPASS} /tmp/ultrasonic-release/ultrasonic-${CIRCLE_TAG}.apk
|
|
${ANDROID_HOME}/build-tools/32.0.0/apksigner verify --verbose /tmp/ultrasonic-release/ultrasonic-${CIRCLE_TAG}.apk
|
|
- persist_to_workspace:
|
|
root: /tmp/ultrasonic-release
|
|
paths:
|
|
- ultrasonic-*.apk*
|
|
publish_github_signed_apk:
|
|
docker:
|
|
- image: cimg/go:1.18
|
|
steps:
|
|
- attach_workspace:
|
|
at: /tmp/ultrasonic-release
|
|
- run:
|
|
name: install ghr
|
|
command: go install -v github.com/tcnksm/ghr@latest
|
|
- run:
|
|
name: publish release on github tag
|
|
command: ghr -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} ${CIRCLE_TAG} /tmp/ultrasonic-release
|
|
workflows:
|
|
version: 2
|
|
build_and_push_translations:
|
|
jobs:
|
|
- build
|
|
- push_translations:
|
|
requires:
|
|
- build
|
|
filters:
|
|
branches:
|
|
only:
|
|
- develop
|
|
- generate_signed_apk:
|
|
filters:
|
|
tags:
|
|
only: /^[0-9]+(\.[0-9]+)*(-beta\.[0-9]+)?/
|
|
branches:
|
|
ignore: /.*/
|
|
- publish_github_signed_apk:
|
|
requires:
|
|
- generate_signed_apk
|
|
filters:
|
|
tags:
|
|
only: /^[0-9]+(\.[0-9]+)*(-beta\.[0-9]+)?/
|
|
branches:
|
|
ignore: /.*/
|
|
|