2018-05-17 08:42:07 +02:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
jobs:
|
2019-09-24 10:50:51 +02:00
|
|
|
test:
|
2018-05-17 08:42:07 +02:00
|
|
|
docker:
|
2019-07-22 18:46:55 +02:00
|
|
|
- image: circleci/android:api-28
|
2018-05-17 08:42:07 +02:00
|
|
|
|
|
|
|
working_directory: ~/AntennaPod
|
|
|
|
|
|
|
|
environment:
|
|
|
|
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx1536m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError"'
|
2018-05-17 09:13:08 +02:00
|
|
|
_JAVA_OPTIONS: "-Xms256m -Xmx1280m"
|
2018-05-17 08:42:07 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
2019-07-24 23:47:59 +02:00
|
|
|
|
2018-05-17 08:42:07 +02:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v1-android-{{ checksum "build.gradle" }}
|
|
|
|
# fallback to using the latest cache if no exact match is found
|
|
|
|
- v1-android-
|
|
|
|
|
2018-05-17 08:43:46 +02:00
|
|
|
- run:
|
2019-09-24 10:50:51 +02:00
|
|
|
name: Create temporary release keystore
|
|
|
|
command: keytool -noprompt -genkey -v -keystore "app/keystore" -alias alias -storepass password -keypass password -keyalg RSA -validity 10 -dname "CN=antennapod.org, OU=dummy, O=dummy, L=dummy, S=dummy, C=US"
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build debug
|
|
|
|
command: ./gradlew assembleDebug -PdisablePreDex
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build release
|
|
|
|
command: ./gradlew assembleRelease -PdisablePreDex
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Execute unit tests
|
|
|
|
command: ./gradlew :core:testPlayReleaseUnitTest -PdisablePreDex
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build integration tests
|
|
|
|
command: ./gradlew :app:assemblePlayDebugAndroidTest -PdisablePreDex
|
2018-05-17 08:42:07 +02:00
|
|
|
|
|
|
|
- store_artifacts:
|
2018-05-17 08:45:57 +02:00
|
|
|
path: app/build/outputs/apk
|
2018-05-17 09:11:10 +02:00
|
|
|
destination: apks
|
2018-05-17 08:42:07 +02:00
|
|
|
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- ~/.android
|
2018-05-17 09:06:42 +02:00
|
|
|
- ~/.gradle
|
2018-05-17 08:42:07 +02:00
|
|
|
- ~/android
|
|
|
|
key: v1-android-{{ checksum "build.gradle" }}
|
2019-09-24 10:50:51 +02:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
|
|
|
|
test:
|
|
|
|
jobs:
|
|
|
|
- test
|