forked from AnySoftKeyboard/LanguagePack
-
Notifications
You must be signed in to change notification settings - Fork 2
/
circle.yml
101 lines (77 loc) · 2.15 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
100
101
version: 2.0
references:
workspace_root: &workspace_root
/opt/workspace/
container_config: &container_config
docker:
- image: menny/android:1.7.1
working_directory: *workspace_root
environment:
TERM: dumb
attach_workspace: &attach_workspace
attach_workspace:
at: *workspace_root
general_cache_key: &general_cache_key
key: anysoftkeyboard-{{ checksum "build.gradle" }}-{{ checksum "circle.yml" }}-{{ checksum "gradle.properties" }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
jobs:
build:
<<: *container_config
steps:
- checkout
- restore_cache:
<<: *general_cache_key
- run:
name: Setup environment
command: scripts/ci_setup.sh
- run:
name: Initial build
command: scripts/ci_assemble.sh
- store_artifacts:
path: /opt/workspace/build/outputs/apk/
destination: apks/
- persist_to_workspace:
root: *workspace_root
paths:
- .
- save_cache:
<<: *general_cache_key
paths:
- "~/.gradle"
- "~/.m2"
- "/opt/android-sdk-linux/licenses/"
check:
<<: *container_config
steps:
- *attach_workspace
- restore_cache:
<<: *general_cache_key
- run:
name: Run Checks
command: ./scripts/ci_check.sh
- store_artifacts:
path: /opt/workspace/build/reports/
destination: lint_reports/app/
deploy:
<<: *container_config
steps:
- *attach_workspace
- restore_cache:
<<: *general_cache_key
- run:
name: Deploy to Play Store
command: |
./scripts/ci_deploy.sh ${LANGUAGE_PACK_KEYSTORE_FILE_URL} ${PUBLISH_CERT_FILE_URL} ${CIRCLE_PROJECT_USERNAME} ${CIRCLE_BRANCH} ${CIRCLE_PULL_REQUEST}
- store_artifacts:
path: /opt/workspace/build/outputs/apk/
destination: apks/
workflows:
version: 2
build_check_tests_deploy:
jobs:
- build
- check:
requires:
- build
- deploy:
requires:
- check