-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,35 @@ | ||
version: 2 | ||
version: 2.1 | ||
orbs: | ||
android: circleci/[email protected] | ||
jobs: | ||
build: | ||
working_directory: ~/code | ||
docker: | ||
- image: circleci/android:api-28-alpha | ||
executor: android/android-machine | ||
environment: | ||
JVM_OPTS: -Xmx3200m | ||
ADB_INSTALL_TIMEOUT: 10 | ||
TERM: dumb | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} | ||
- run: | ||
name: Accept Android Licenses | ||
command: yes | sdkmanager --licenses && yes | sdkmanager --update || exit 0 | ||
- run: | ||
name: Download Dependencies | ||
command: ./gradlew clean androidDependencies | ||
- save_cache: | ||
paths: | ||
- ~/.gradle | ||
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }} | ||
- run: | ||
name: Install Android dependencies | ||
command: | | ||
sdkmanager "platform-tools" | ||
sdkmanager "platforms;android-15" | ||
sdkmanager "platforms;android-21" | ||
sdkmanager "platforms;android-22" | ||
sdkmanager "platforms;android-25" | ||
sdkmanager "build-tools;24.0.3" | ||
sdkmanager "extras;android;m2repository" | ||
sdkmanager "extras;google;m2repository" | ||
sdkmanager "extras;google;google_play_services" | ||
sdkmanager "system-images;android-21;default;armeabi-v7a" | ||
- run: | ||
name: Setup emulator | ||
command: echo "no" | avdmanager create avd -n test -k "system-images;android-21;default;armeabi-v7a" | ||
- run: | ||
name: Launch emulator | ||
command: export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib && emulator -avd test -noaudio -no-boot-anim -no-window -accel on | ||
background: true | ||
- run: | ||
name: Wait for emulator | ||
command: circle-android wait-for-boot | ||
- run: | ||
name: Run UI tests | ||
command: ./gradlew connectedAndroidTest | ||
- android/change-java-version: | ||
java-version: 17 | ||
- android/accept-licenses | ||
- run: ./gradlew androidDependencies | ||
- android/create-avd: | ||
avd-name: test | ||
install: true | ||
system-image: system-images;android-32;default;x86_64 | ||
- android/start-emulator: | ||
avd-name: test | ||
no-window: true | ||
restore-gradle-cache-prefix: v1a | ||
- android/run-tests: | ||
test-command: ./gradlew connectedAndroidTest --stacktrace | ||
- android/save-gradle-cache: | ||
cache-prefix: v1a | ||
- run: | ||
name: Build and check | ||
command: ./gradlew testDebug jacocoTestReport coveralls lintDebug buildDashboard crashlyticsUploadDistributionDebug -PversionCode=$CIRCLE_BUILD_NUM -PfabricApiKey=$FABRIC_API_KEY -PfabricApiSecret=$FABRIC_API_SECRET | ||
command: ./gradlew testDebug jacocoTestReport lintDebug buildDashboard | ||
- store_artifacts: | ||
path: app/build/outputs | ||
destination: outputs | ||
|