1
1
version : 2.1
2
- jobs :
3
- build :
4
- docker :
5
- - image : circleci/python:3.7.4-buster
6
2
3
+ commands :
4
+ ci_steps :
5
+ parameters :
6
+ platform :
7
+ type : string
7
8
steps :
8
9
- checkout
9
-
10
- # Download and cache dependencies
11
10
- restore_cache :
12
11
keys :
13
12
- v1-dependencies-{{ checksum "get_deps.sh" }}
14
13
# fallback to using the latest cache if no exact match is found
15
14
# - v1-dependencies-
16
-
17
15
- run :
18
- name : install dependencies
16
+ name : Install dependencies
19
17
command : |
20
- sudo ./automation/readies/bin/getpy
21
- sudo ./automation/system-setup.py
18
+ sudo ./opt/readies/bin/getpy
19
+ sudo ./opt/system-setup.py
20
+ git clone git://github.com/antirez/redis.git --branch 5.0.5
21
+ (cd redis && make malloc=libc -j $(nproc) && sudo make install)
22
22
./get_deps.sh cpu
23
- git clone git://github.com/antirez/redis.git --branch 5.0.3
24
- (cd redis && make malloc=libc -j4 && sudo make install)
25
-
26
23
- save_cache :
27
24
paths :
28
25
- deps
29
- key : v2-dependencies-{{ checksum "get_deps.sh" }}
30
-
26
+ key : v1-dependencies-{{ checksum "get_deps.sh" }}
31
27
- run :
32
28
name : Build
33
- command : |
34
- make -C automation all
35
- make -C automation pack
36
-
29
+ command : make -C opt all SHOW=1
37
30
- run :
38
31
name : Test
39
- command : make -C automation test
40
-
41
- - run :
42
- name : Persist Artifacts
43
32
command : |
44
- mkdir -p ~/workspace/build
45
- cp install-cpu/$MODULE_ARTIFACT ~/workspace/
46
- cp -r install-cpu/backends ~/workspace/
47
- cp ramp.yml ~/workspace/
48
- - persist_to_workspace :
49
- root : ~/workspace
50
- paths :
51
- - ' *.so*'
52
- - ' *.yml'
53
- - build
54
- package_branch :
55
- docker :
56
- - image : ' redislabsmodules/rmbuilder:latest'
57
- steps :
58
- - attach_workspace :
59
- at : /workspace
33
+ mkdir -p ~/workspace/tests
34
+ make -C opt test SHOW=1
35
+ cp test/logs/* ~/workspace/tests
60
36
- run :
61
37
name : Package
62
- command : >-
63
- ramp pack -m /workspace/ramp.yml -o
64
- /workspace/build/$PACKAGE_NAME.{os}-{architecture}.$CIRCLE_BRANCH.zip
65
- /workspace/$MODULE_ARTIFACT
66
- environment :
67
- LD_LIBRARY_PATH : /workspace
38
+ command : make -C opt pack BRANCH="${CIRCLE_BRANCH//[^A-Za-z0-9._-]/_}" INTO=~/workspace/packages SHOW=1
68
39
- persist_to_workspace :
69
- root : /workspace
40
+ root : ~ /workspace
70
41
paths :
71
- - build
72
- - store_artifacts :
73
- path : /workspace/build
74
- package_release :
75
- docker :
76
- - image : ' redislabsmodules/rmbuilder:latest'
42
+ - ' packages/release/*.zip'
43
+ - ' packages/release/*.tgz'
44
+ - ' packages/branch/*.zip'
45
+ - ' packages/branch/*.tgz'
46
+ - store_test_results :
47
+ path : ~/workspace/tests
48
+ deploy :
49
+ parameters :
50
+ from :
51
+ type : string
77
52
steps :
78
- - attach_workspace :
79
- at : /workspace
80
53
- run :
81
- name : Package
82
- command : >-
83
- ramp pack -m /workspace/ramp.yml -o
84
- /workspace/build/$PACKAGE_NAME.{os}-{architecture}.{semantic_version}.zip
85
- /workspace/$MODULE_ARTIFACT
86
- environment :
87
- LD_LIBRARY_PATH : /workspace
88
- - run :
89
- name : Package
54
+ name : Deploy to S3
90
55
command : >-
91
- ramp pack -m /workspace/ramp.yml -o
92
- /workspace/build/$PACKAGE_NAME.{os}-{architecture}.latest.zip
93
- /workspace/$MODULE_ARTIFACT
94
- environment :
95
- LD_LIBRARY_PATH : /workspace
56
+ aws s3 cp <<parameters.from>>/ s3://redismodules/$PACKAGE_NAME/
57
+ --acl public-read --recursive --exclude "*" --include "*.zip" --include "*.tgz"
96
58
97
- - persist_to_workspace :
98
- root : /workspace
99
- paths :
100
- - build
101
- - store_artifacts :
102
- path : /workspace/build
103
- deploy_branch :
59
+ jobs :
60
+ build :
104
61
docker :
105
- - image : ' redislabsmodules/rmbuilder:latest'
62
+ - image : circleci/python:3.7.4-buster
63
+ environment :
64
+ DEPS : " "
106
65
steps :
107
- - attach_workspace :
108
- at : /workspace
109
- - run :
110
- name : Deploy to S3
111
- command : >-
112
- aws s3 cp /workspace/build/ s3://redismodules/$PACKAGE_NAME/ --acl
113
- public-read --recursive --exclude "*" --include "*.zip"
114
- deploy_release :
66
+ - ci_steps :
67
+ platform : debian
68
+ build-macos :
69
+ macos :
70
+ xcode : 10.2.1
71
+ steps :
72
+ - ci_steps :
73
+ platform : macosx
74
+
75
+ deploy_package :
76
+ parameters :
77
+ package :
78
+ type : string
115
79
docker :
116
80
- image : ' redislabsmodules/rmbuilder:latest'
117
81
steps :
118
82
- attach_workspace :
119
- at : /workspace
120
- - run :
121
- name : Deploy to S3
122
- command : >-
123
- aws s3 cp /workspace/build/ s3://redismodules/$PACKAGE_NAME/ --acl
124
- public-read --recursive --exclude "*" --include "*.zip"
83
+ at : ~ /workspace
84
+ - deploy :
85
+ from : ~/workspace/packages/<<parameters.package>>
86
+ - store_artifacts :
87
+ path : ~ /workspace/packages/<<parameters.package>>
88
+
125
89
deploy_docs :
126
90
docker :
127
91
- image : ' redislabsmodules/rmbuilder:latest'
133
97
- run :
134
98
name : Deploy Docs to S3
135
99
command : >-
136
- aws s3 cp site s3://oss.redislabs.com/$WEBSITE_FOLDER/ --acl
137
- public-read --recursive
100
+ aws s3 cp site s3://oss.redislabs.com/$WEBSITE_FOLDER/ --acl public-read --recursive
101
+
138
102
workflows :
139
103
version : 2
140
104
build_and_package :
@@ -143,29 +107,28 @@ workflows:
143
107
filters :
144
108
tags :
145
109
only : /.*/
146
- - package_branch :
110
+ # - build-macos:
111
+ # filters:
112
+ # tags:
113
+ # only: /.*/
114
+ - deploy_package :
115
+ name : deploy_branch
116
+ package : branch
147
117
requires :
148
118
- build
149
119
filters :
150
120
branches :
151
121
only : master
152
- - package_release :
122
+ - deploy_package :
123
+ name : deploy_release
124
+ package : release
153
125
requires :
154
126
- build
155
127
filters :
156
128
branches :
157
129
ignore : /.*/
158
130
tags :
159
131
only : ' /^v[0-9].*/'
160
- - deploy_branch :
161
- requires :
162
- - package_branch
163
- - deploy_release :
164
- filters :
165
- tags :
166
- only : ' /^v[0-9].*/'
167
- requires :
168
- - package_release
169
132
- deploy_docs :
170
133
filters :
171
134
branches :
0 commit comments