mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-15 10:26:26 +01:00
141 lines
4.2 KiB
YAML
141 lines
4.2 KiB
YAML
version: 2
|
|
|
|
jobs:
|
|
test-debug:
|
|
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" }}
|
|
- v1-android-
|
|
- run:
|
|
name: Build debug
|
|
command: ./gradlew assembleDebug -PdisablePreDex
|
|
- run:
|
|
name: Execute debug unit tests
|
|
command: ./gradlew :core:testPlayDebugUnitTest -PdisablePreDex
|
|
- save_cache:
|
|
paths:
|
|
- ~/.android
|
|
- ~/.gradle
|
|
- ~/android
|
|
key: v1-android-{{ checksum "build.gradle" }}
|
|
|
|
test-release:
|
|
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" }}
|
|
- 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 release
|
|
command: ./gradlew assembleRelease -PdisablePreDex
|
|
- run:
|
|
name: Execute release unit tests
|
|
command: ./gradlew :core:testPlayReleaseUnitTest -PdisablePreDex
|
|
- save_cache:
|
|
paths:
|
|
- ~/.android
|
|
- ~/.gradle
|
|
- ~/android
|
|
key: v1-android-{{ checksum "build.gradle" }}
|
|
|
|
build-androidtest:
|
|
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" }}
|
|
- v1-android-
|
|
- run:
|
|
name: Build integration tests
|
|
command: ./gradlew :app:assemblePlayDebugAndroidTest -PdisablePreDex
|
|
- save_cache:
|
|
paths:
|
|
- ~/.android
|
|
- ~/.gradle
|
|
- ~/android
|
|
key: v1-android-{{ checksum "build.gradle" }}
|
|
|
|
build-free:
|
|
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" }}
|
|
- 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 free (for F-Droid)
|
|
command: ./gradlew assembleFreeRelease -PdisablePreDex -PfreeBuild
|
|
- save_cache:
|
|
paths:
|
|
- ~/.android
|
|
- ~/.gradle
|
|
- ~/android
|
|
key: v1-android-{{ checksum "build.gradle" }}
|
|
|
|
checkstyle:
|
|
docker:
|
|
- image: circleci/android:api-28
|
|
working_directory: ~/AntennaPod
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- v1-android-{{ checksum "build.gradle" }}
|
|
- v1-android-
|
|
- run:
|
|
name: Checkstyle
|
|
command: ./gradlew checkstyle
|
|
- save_cache:
|
|
paths:
|
|
- ~/.android
|
|
- ~/.gradle
|
|
- ~/android
|
|
key: v1-android-{{ checksum "build.gradle" }}
|
|
|
|
workflows:
|
|
version: 2
|
|
|
|
unit-tests:
|
|
jobs:
|
|
- test-debug
|
|
- test-release
|
|
- build-androidtest
|
|
- build-free
|
|
|
|
static-analysis:
|
|
jobs:
|
|
- checkstyle
|