forked from AnySoftKeyboard/AnySoftKeyboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
99 lines (81 loc) · 3.4 KB
/
circle.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: 2
jobs:
build:
docker:
- image: menny/android_ndk:1.6.1a
working_directory: /opt/workspace/
environment:
CODECOV_TOKEN: 1a4cd171-2784-4f48-8a62-0b7ec31e6d7e
COV_REPORT_LOCATION: app/build/reports/jacoco/testDebugUnitTestCoverage/testDebugUnitTestCoverage.xml
TERM: dumb
_JAVA_OPTIONS: "-Xmx1400m -XX:ParallelGCThreads=2 -XX:ConcGCThreads=2 -XX:ParallelGCThreads=2 -Djava.util.concurrent.ForkJoinPool.common.parallelism=2"
steps:
- checkout
- restore_cache:
key: anysoftkeyboard-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}-{{ checksum "circle.yml" }}-{{ checksum "gradle.properties" }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
- run:
name: Setup environment
command: scripts/ci_setup.sh
- run:
name: Run Checks
command: |
if [ "${CIRCLE_NODE_INDEX}" == "0" ]; then
./scripts/ci_check.sh
fi
- store_artifacts:
path: app/build/reports/
destination: lint_reports/app/
- store_artifacts:
path: base/build/reports/
destination: lint_reports/base/
- store_artifacts:
path: jnidictionaryv1/build/reports/
destination: lint_reports/jnidictionaryv1/
- store_artifacts:
path: jnidictionaryv2/build/reports/
destination: lint_reports/jnidictionaryv2/
- store_artifacts:
path: nextword/build/reports/
destination: lint_reports/nextword/
- run:
name: Run Tests
command: |
if [ "${CIRCLE_NODE_INDEX}" != "0" ]; then
export TEST_GROUP_INDEX=$(( ${CIRCLE_NODE_INDEX} - 1 ))
export TEST_GROUPS_COUNT=$(( ${CIRCLE_NODE_TOTAL} - 1 ))
echo "Running test group ${TEST_GROUP_INDEX} out of ${TEST_GROUPS_COUNT}..."
./scripts/ci_test.sh
if [[ -f $COV_REPORT_LOCATION ]]; then
./scripts/ci_binaries/codecov.sh -X gcov -X coveragepy -f ${COV_REPORT_LOCATION}
fi
fi
- store_artifacts:
path: app/build/reports/tests/
destination: tests_reports/
- store_test_results:
path: "app/build/test-results/testDebugUnitTest/"
- deploy:
name: Deploy to Play Store
command: |
echo "Branch ${CIRCLE_BRANCH}"
echo "Tag ${CIRCLE_TAG}"
echo "Username ${CIRCLE_PROJECT_USERNAME}"
if [ "${CIRCLE_BRANCH}" == "master" ] && [ "${CIRCLE_PROJECT_USERNAME}" == "AnySoftKeyboard" ]; then
./scripts/ci_deploy.sh $KEYSTORE_FILE_URL $PUBLISH_CERT_FILE_URL
fi
- store_artifacts:
path: app/build/outputs/apk/
destination: apks/
- store_artifacts:
path: app/build/outputs/mapping/
destination: mapping/
- save_cache:
key: anysoftkeyboard-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}-{{ checksum "circle.yml" }}-{{ checksum "gradle.properties" }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
paths:
- "~/.gradle/wrapper/dists/gradle-3.5-all/"
- "~/.gradle/caches/modules-2/"
- "~/.gradle/caches/3.5/"
- "~/.gradle/caches/build-cache-1/"
- "./.gradle/buildOutputCleanup"
- "./.gradle/3.5/"
- "~/.m2"