76 lines
1.8 KiB
YAML
76 lines
1.8 KiB
YAML
version: 2
|
|
|
|
jobs:
|
|
test:
|
|
docker:
|
|
- image: circleci/android:api-28
|
|
|
|
working_directory: ~/AntennaPod
|
|
|
|
environment:
|
|
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx1536m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError"'
|
|
_JAVA_OPTIONS: "-Xms256m -Xmx1280m"
|
|
|
|
steps:
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
keys:
|
|
- v1-android-{{ checksum "build.gradle" }}
|
|
# fallback to using the latest cache if no exact match is found
|
|
- v1-android-
|
|
|
|
- run:
|
|
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
|
|
|
|
- store_artifacts:
|
|
path: app/build/outputs/apk
|
|
destination: apks
|
|
|
|
- save_cache:
|
|
paths:
|
|
- ~/.android
|
|
- ~/.gradle
|
|
- ~/android
|
|
key: v1-android-{{ checksum "build.gradle" }}
|
|
|
|
checkstyle:
|
|
docker:
|
|
- image: circleci/android:api-28
|
|
working_directory: ~/AntennaPod
|
|
|
|
steps:
|
|
- checkout
|
|
|
|
- run:
|
|
name: Checkstyle
|
|
command: ./gradlew checkstyle
|
|
|
|
workflows:
|
|
version: 2
|
|
|
|
test:
|
|
jobs:
|
|
- test
|
|
|
|
checkstyle:
|
|
jobs:
|
|
- checkstyle
|