forked from AnySoftKeyboard/LanguagePack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
139 lines (111 loc) · 3.12 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
version: 2.0
references:
workspace_root: &workspace_root
/opt/workspace/
container_config: &container_config
docker:
- image: menny/android:1.12.1
working_directory: *workspace_root
environment:
TERM: dumb
EXTRA_GRADLE_ARGS: "--no-daemon --max-workers=2 --stacktrace"
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 "settings.gradle" }}-{{ 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/add_ons_apks/debug/
destination: debug-apks/
- persist_to_workspace:
root: *workspace_root
paths:
- .
- save_cache:
<<: *general_cache_key
paths:
- "~/.gradle"
- "~/.m2"
- "~/.android"
- "/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/lint/*-lint-results.html
destination: lint_reports/
deploy:
<<: *container_config
steps:
- *attach_workspace
- restore_cache:
<<: *general_cache_key
- run:
name: Deploy to Play Store
command: |
./scripts/ci_deploy.sh ${PACKS_ALL_KEY_STORE_FILE_URL} ${PUBLISH_CERT_FILE_URL}
- store_artifacts:
path: /opt/workspace/add_ons_apks/release/
destination: release-apks/
deploy_maven:
<<: *container_config
steps:
- *attach_workspace
- restore_cache:
<<: *general_cache_key
- run:
name: Deploy to Bintray
command: |
./scripts/ci_deploy_maven.sh
tag_at_repo:
<<: *container_config
steps:
- *attach_workspace
- run:
name: Tagging successful build
command: |
git config --global user.email "[email protected]"
git config --global user.name "Circle CI"
git tag -a `cat .generated_pack_version` -m "Deployed"
git push --tags origin
workflows:
version: 2
build_check_deploy:
jobs:
- build
- check:
requires:
- build
- deploy:
filters:
branches:
only:
- master
requires:
- check
- deploy_maven:
filters:
branches:
only:
- master
requires:
- check