This repository was archived by the owner on Jan 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.gitlab-ci.stable.yml
More file actions
41 lines (35 loc) · 1.62 KB
/
.gitlab-ci.stable.yml
File metadata and controls
41 lines (35 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This file is a template, and might need editing before it works on your project.
# Read more about this script on this blog post https://about.gitlab.com/2016/11/30/setting-up-gitlab-ci-for-android-projects/, by Greyson Parrelli
image: mingc/android-build-box:latest
variables:
ANDROID_COMPILE_SDK: "29"
GRADLE_OPTS: '-XX:+UseG1GC -XX:MaxGCPauseMillis=1000 -Dorg.gradle.jvmargs="-Xmx1536m -XX:MaxPermSize=1024m -XX:ReservedCodeCacheSize=440m -XX:+UseCompressedOops -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" -Dorg.gradle.parallel=false -Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true'
before_script:
- chmod +x ./gradlew
# Fix gradle 3.0 problem
- touch /root/.android/repositories.cfg
stages:
- build
- test
build:
stage: build
script:
- ./gradlew assemble
artifacts:
paths:
- app/build/outputs/
unitTests:
stage: test
script:
- ./gradlew test
#functionalTests:
# stage: test
# script:
# - wget --quiet --output-document=android-wait-for-emulator https://raw.githubusercontent.com/travis-ci/travis-cookbooks/0f497eb71291b52a703143c5cd63a217c8766dc9/community-cookbooks/android-sdk/files/default/android-wait-for-emulator
# - chmod +x android-wait-for-emulator
# - echo y | $ANDROID_HOME/tools/android --silent update sdk --no-ui --all --filter sys-img-x86-google_apis-${ANDROID_COMPILE_SDK}
# - echo no | $ANDROID_HOME/tools/android create avd -n test -t android-${ANDROID_COMPILE_SDK} --abi google_apis/x86
# - $ANDROID_HOME/tools/emulator64-x86 -avd test -no-window -no-audio &
# - ./android-wait-for-emulator
# - adb shell input keyevent 82
# - ./gradlew cAT