summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2019-09-24 18:07:43 +0200
committerByteHamster <info@bytehamster.com>2019-09-24 18:07:43 +0200
commit667be71e0f34c4c93ccb5a7559d7026b1e5b0fe5 (patch)
tree90a46f877eaead639978eca0a0def8d61b745e0e
parenta92123340da7a3f7286adfd8510c868fec030d4e (diff)
downloadAntennaPod-667be71e0f34c4c93ccb5a7559d7026b1e5b0fe5.zip
Speed up circleci by allowing different flavours to build in parallel
-rw-r--r--.circleci/config.yml74
1 files changed, 51 insertions, 23 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index a4db1befd..b6a6ba78e 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,49 +1,77 @@
version: 2
jobs:
- test:
+ 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" }}
- # 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: 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 unit tests
+ 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
-
- - store_artifacts:
- path: app/build/outputs/apk
- destination: apks
-
- save_cache:
paths:
- ~/.android
@@ -55,10 +83,8 @@ jobs:
docker:
- image: circleci/android:api-28
working_directory: ~/AntennaPod
-
steps:
- checkout
-
- run:
name: Checkstyle
command: ./gradlew checkstyle
@@ -66,10 +92,12 @@ jobs:
workflows:
version: 2
- test:
+ unit-tests:
jobs:
- - test
+ - test-debug
+ - test-release
+ - build-androidtest
- checkstyle:
+ static-analysis:
jobs:
- checkstyle