Skip to content

Commit bfbc376

Browse files
rafielantiga
authored andcommitted
ARM support + os-arch-variant build architecture (#191)
* ARM support and bin/os-arch-variant scheme * Build: fixes #1 * Build: fixes #2 * Build: fixes #3 * Build: fixes #4 * Build fixes #5 * CircleCI config.yml refectoring * Build fixes #6 * Build fixes #7 * Build fixes #8 * Build fixes #9 * Build fixes #10 * Build fixes #11 * Build fixes #12 * Build fixes #13 * Build fixes #14 * Build fixes #15 * Build fixes #16 * Build fixes #17 * Build fixes #18 * Build fixes #19 * Build fixes #20 * Build fixes #21 * Build fixes #22 * Build fixes #23 * Build fixes #24 * Build fixes #25 * Build fixes #26 * Filesystem restructuring * Pack fixes + docker goal in makefile
1 parent c77f7c5 commit bfbc376

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2722
-487
lines changed

.circleci/config.yml

Lines changed: 66 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,91 @@
11
version: 2.1
2-
jobs:
3-
build:
4-
docker:
5-
- image: circleci/python:3.7.4-buster
62

3+
commands:
4+
ci_steps:
5+
parameters:
6+
platform:
7+
type: string
78
steps:
89
- checkout
9-
10-
# Download and cache dependencies
1110
- restore_cache:
1211
keys:
1312
- v1-dependencies-{{ checksum "get_deps.sh" }}
1413
# fallback to using the latest cache if no exact match is found
1514
# - v1-dependencies-
16-
1715
- run:
18-
name: install dependencies
16+
name: Install dependencies
1917
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)
2222
./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-
2623
- save_cache:
2724
paths:
2825
- deps
29-
key: v2-dependencies-{{ checksum "get_deps.sh" }}
30-
26+
key: v1-dependencies-{{ checksum "get_deps.sh" }}
3127
- run:
3228
name: Build
33-
command: |
34-
make -C automation all
35-
make -C automation pack
36-
29+
command: make -C opt all SHOW=1
3730
- run:
3831
name: Test
39-
command: make -C automation test
40-
41-
- run:
42-
name: Persist Artifacts
4332
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
6036
- run:
6137
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
6839
- persist_to_workspace:
69-
root: /workspace
40+
root: ~/workspace
7041
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
7752
steps:
78-
- attach_workspace:
79-
at: /workspace
8053
- 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
9055
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"
9658
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:
10461
docker:
105-
- image: 'redislabsmodules/rmbuilder:latest'
62+
- image: circleci/python:3.7.4-buster
63+
environment:
64+
DEPS: ""
10665
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
11579
docker:
11680
- image: 'redislabsmodules/rmbuilder:latest'
11781
steps:
11882
- 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+
12589
deploy_docs:
12690
docker:
12791
- image: 'redislabsmodules/rmbuilder:latest'
@@ -133,8 +97,8 @@ jobs:
13397
- run:
13498
name: Deploy Docs to S3
13599
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+
138102
workflows:
139103
version: 2
140104
build_and_package:
@@ -143,29 +107,28 @@ workflows:
143107
filters:
144108
tags:
145109
only: /.*/
146-
- package_branch:
110+
# - build-macos:
111+
# filters:
112+
# tags:
113+
# only: /.*/
114+
- deploy_package:
115+
name: deploy_branch
116+
package: branch
147117
requires:
148118
- build
149119
filters:
150120
branches:
151121
only: master
152-
- package_release:
122+
- deploy_package:
123+
name: deploy_release
124+
package: release
153125
requires:
154126
- build
155127
filters:
156128
branches:
157129
ignore: /.*/
158130
tags:
159131
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
169132
- deploy_docs:
170133
filters:
171134
branches:

.dockerignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
/bin/
12
/deps/
3+
/install*
24
/build/
3-
/install*/
4-
**/*.o
5-
**/*.so
65
.venv/
76
venv*/
7+
/[0-9]*/
8+
*.zip
9+
*.tgz
10+
*.tar.gz

.gitignore

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/bin/
2+
/deps/
3+
/build/
4+
/install*
5+
/test/venv/
6+
/test/logs/
7+
.venv/
8+
venv*/
9+
/install
10+
/[0-9]*/
11+
*.zip
12+
*.tgz
13+
*.tar.gz
14+
115
# Misc
216
.DS_Store
317
*.swp
@@ -6,18 +20,6 @@
620
__pycache__
721
*.pyc
822

9-
# Dirs
10-
/install*/
11-
/deps/*
12-
/build/
13-
examples/js/node_modules/
14-
examples/js/package-lock.json
15-
/test/venv/
16-
/test/logs/
17-
/1/
18-
/venv/
19-
/.venv/
20-
2123
# Eclipse (if that's your jam...)
2224
.project
2325
.cproject

0 commit comments

Comments
 (0)