Using workflows to build on circleci

This commit is contained in:
ByteHamster 2019-09-24 10:50:51 +02:00
parent 2dce723a8d
commit c16fe7a7c9
1 changed files with 26 additions and 6 deletions

View File

@ -1,7 +1,7 @@
version: 2
jobs:
build:
test:
docker:
- image: circleci/android:api-28
@ -21,11 +21,24 @@ jobs:
- v1-android-
- run:
# To build release, we need to create a temporary keystore that can be used to sign the app
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"
./gradlew assembleRelease :core:testPlayReleaseUnitTest :app:assemblePlayDebugAndroidTest -PdisablePreDex
no_output_timeout: 1800
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
@ -37,3 +50,10 @@ jobs:
- ~/.gradle
- ~/android
key: v1-android-{{ checksum "build.gradle" }}
workflows:
version: 2
test:
jobs:
- test