1
- # -------------------------
2
- # DEFAULTS
3
- # -------------------------
4
- defaults : &defaults
5
- working_directory : ~/react-native-progress-bar-android
6
- environment :
7
- - GIT_COMMIT_DESC : git log --format=oneline -n 1 $CIRCLE_SHA1
8
-
9
- # LINUX
10
- linux_defaults : &linux_defaults
11
- << : *defaults
12
- docker :
13
- - image : circleci/node:8
14
- environment :
15
- - PATH : " /opt/yarn/yarn-v1.5.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
16
-
17
- # ANDROID
18
- android_defaults : &android_defaults
19
- << : *defaults
20
- docker :
21
- - image : circleci/android:api-27-node8-alpha
22
- resource_class : " medium"
23
- environment :
24
- - TERM : " dumb"
25
- - ADB_INSTALL_TIMEOUT : 10
26
- - _JAVA_OPTIONS : " -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
27
- - GRADLE_OPTS : ' -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+HeapDumpOnOutOfMemoryError"'
28
- - BUILD_THREADS : 2
29
-
30
- # MACOS
31
- macos_defaults : &macos_defaults
32
- << : *defaults
33
- resource_class : " medium"
34
- macos :
35
- xcode : " 10.1.0"
36
-
37
1
# -------------------------
38
2
# ALIASES
39
3
# -------------------------
40
4
41
5
aliases :
42
6
# CACHE
43
- - &restore-yarn-cache
44
- keys :
45
- - yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
46
- - yarn-cache-{{ arch }}
47
- - &save-yarn-cache
48
- paths :
49
- - ~/.cache/yarn
50
- - ~/Library/Detox/ios
51
- key : yarn-cache-{{ arch }}-{{ checksum "package.json" }}-{{ checksum "yarn.lock" }}
52
-
53
7
- &restore-gradle-cache
54
8
keys :
55
9
- gradle-cache-{{ checksum "android/build.gradle" }}-{{ checksum "example/android/build.gradle" }}-{{ checksum "example/android/app/build.gradle" }}
@@ -58,12 +12,6 @@ aliases:
58
12
- ~/.gradle
59
13
key : gradle-cache-{{ checksum "android/build.gradle" }}-{{ checksum "example/android/build.gradle" }}-{{ checksum "example/android/app/build.gradle" }}
60
14
61
- # INSTALLATION
62
- - &yarn
63
- name : Yarn Install
64
- command : |
65
- yarn install --network-concurrency 1 --non-interactive --cache-folder ~/.cache/yarn & wait
66
-
67
15
# ANALYSE
68
16
- &eslint
69
17
name : ESLint Checks
@@ -80,49 +28,50 @@ aliases:
80
28
# -------------------------
81
29
# JOBS
82
30
# -------------------------
83
- version : 2
31
+ version : 2.1
32
+ orbs :
33
+ rn :
react-native-community/[email protected]
34
+
84
35
jobs :
85
36
# Set up a Linux environment for downstream jobs
86
37
linux-checkout :
87
- << : *linux_defaults
38
+ executor : rn/linux_js
88
39
steps :
40
+ - attach_workspace :
41
+ at : .
89
42
- checkout
90
- - restore-cache : *restore-yarn-cache
91
- - run : rm -rf node_modules
92
- - run : yarn cache clean
93
- - run : *yarn
94
- - save-cache : *save-yarn-cache
43
+ - rn/yarn_install
95
44
- persist_to_workspace :
96
45
root : .
97
46
paths : .
98
47
99
48
eslint :
100
- << : *linux_defaults
49
+ executor : rn/linux_js
101
50
steps :
102
51
- attach_workspace :
103
- at : ~/react-native-progress-bar-android
52
+ at : .
104
53
- run : *eslint
105
54
106
55
# type-check:
107
56
# <<: *linux_defaults
108
57
# steps:
109
58
# - attach_workspace:
110
- # at: ~/react-native-progress-bar-android
59
+ # at: .
111
60
# - run: *type-check
112
61
113
62
jest :
114
- << : *linux_defaults
63
+ executor : rn/linux_js
115
64
steps :
116
65
- attach_workspace :
117
- at : ~/react-native-progress-bar-android
66
+ at : .
118
67
- run : *jest
119
68
120
69
android-compile :
121
- << : *android_defaults
70
+ executor : rn/linux_android
122
71
steps :
123
72
- attach_workspace :
124
- at : ~/react-native-progress-bar-android
125
- - restore-cache : *restore-gradle-cache
73
+ at : .
74
+ - restore_cache : *restore-gradle-cache
126
75
- run :
127
76
name : Accept Android licences
128
77
command : |-
@@ -135,26 +84,22 @@ jobs:
135
84
yarn install
136
85
cd android
137
86
./gradlew clean assembleDebug
138
- - save-cache : *save-gradle-cache
87
+ - save_cache : *save-gradle-cache
139
88
140
89
ios-checkout :
141
- << : *macos_defaults
90
+ executor : rn/macos
142
91
steps :
143
92
- checkout
144
- - restore-cache : *restore-yarn-cache
145
- - run : rm -rf node_modules
146
- - run : yarn cache clean
147
- - run : *yarn
148
- - save-cache : *save-yarn-cache
93
+ - rn/yarn_install
149
94
- persist_to_workspace :
150
95
root : .
151
96
paths : .
152
97
153
98
ios-compile :
154
- << : *macos_defaults
99
+ executor : rn/macos
155
100
steps :
156
101
- attach_workspace :
157
- at : ~/react-native-progress-bar-android
102
+ at : .
158
103
- run :
159
104
name : Build example app
160
105
command : |-
0 commit comments