forked from mongodb/libbson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.mci.yml
259 lines (221 loc) · 6.27 KB
/
.mci.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
#######################################
# libbson config for MCI #
#######################################
#######################################
# Options #
#######################################
stepback: true
#######################################
# Functions #
#######################################
functions:
fetch_source:
command: git.get_project
params:
directory: libbson
libbson_variables:
## Tests run on most buildvariants
std_test_def: &std_tests
- name: compile
- name: make check
## Architectures
default_expansions_def: &default_expansions
env_vars: CFLAGS=""
i386_expansions_def: &i386_expansions
env_vars: CFLAGS="-m32 -march=i386"
i686_expansions_def: &i686_expansions
env_vars: CFLAGS="-m32 -march=i686"
x86_64_expansions_def: &x86_64_expansions
env_vars: CFLAGS="-m64 -march=x86-64"
## "Platforms" or whatever
linux_expansions_def: &linux_expansions
j_flag: -j$(grep -c ^processor /proc/cpuinfo)
osx_expansions_def: &osx_expansions
j_flag: -j$(sysctl -n hw.logicalcpu)
solaris_expansions_def: &solaris_expansions
j_flag: -j$(kstat cpu_info|grep core_id|sort -u|wc -l)
mingw_expansions_def: &mingw_expansions
j_flag: -j$(grep -c ^processor /proc/cpuinfo)
#######################################
# Pre Task #
#######################################
pre:
- command: expansions.fetch
params:
keys:
- local_key: aws_key
remote_key: project_aws_key
- local_key: aws_secret
remote_key: project_aws_secret
- command: shell.exec
params:
script: |
set -o verbose
rm -rf libbson
#######################################
# Tasks #
#######################################
tasks:
- name: compile
commands:
- command: git.get_project
params:
directory: libbson
- command: git.apply_patch
params:
directory: libbson
- command: shell.exec
params:
working_dir: libbson
script: |
set -o verbose
set -o errexit
export PATH=${path}:$PATH
${env_vars} ./autogen.sh
make ${j_flag}
- command: shell.exec
params:
working_dir: libbson
script: |
set -o verbose
tar -czvf ../libbson.tar.gz .
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
remote_file: libbson/${build_variant}/${revision}/artifacts/${build_id}.tar.gz
bucket: mciuploads
local_file: libbson.tar.gz
permissions: public-read
content_type: ${content_type|application/x-gzip}
- name: make check
depends_on:
- name: compile
commands:
- command: shell.exec
params:
script: |
mkdir libbson
- command: shell.exec
params:
working_dir: libbson
script: |
set -o verbose
set -o errexit
# MCI's S3 mechanism doesn't support symlinks
curl http://s3.amazonaws.com/mciuploads/libbson/${build_variant}/${revision}/artifacts/${build_id}.tar.gz -o ${build_id}.tar.gz --silent
tar -xzf ${build_id}.tar.gz
export PATH=${path}:$PATH
make check
#######################################
# Buildvariants #
#######################################
buildvariants:
################ 32-bit ###############
- name: rhel55-32
display_name: RHEL 5.5 32-bit
expansions:
<<: *default_expansions
<<: *linux_expansions
run_on:
- rhel55-32
tasks: *std_tests
- name: windows-32
display_name: Windows 32-bit
expansions:
<<: *default_expansions
<<: *linux_expansions
run_on:
- windows-32
tasks: *std_tests
########## i386 cross-compile #########
- name: ubuntu-1204-i386
display_name: Ubuntu 12.04 i386
expansions:
<<: *i386_expansions
<<: *linux_expansions
run_on:
- ubuntu1204-test
tasks: *std_tests
- name: ubuntu-1404-i386
display_name: Ubuntu 14.04 i386
expansions:
<<: *i386_expansions
<<: *linux_expansions
run_on:
- ubuntu1404-test
tasks: *std_tests
- name: os-x-108-i386
display_name: OS X 10.8 i386
expansions:
<<: *osx_expansions
env_vars: CC="clang -m32 -march=i386"
run_on:
- osx-108
tasks: *std_tests
########## i686 cross-compile #########
- name: ubuntu-1204-i686
display_name: Ubuntu 12.04 i686
expansions:
<<: *i686_expansions
<<: *linux_expansions
run_on:
- ubuntu1204-test
tasks: *std_tests
- name: ubuntu-1404-i686
display_name: Ubuntu 14.04 i686
expansions:
<<: *i686_expansions
<<: *linux_expansions
run_on:
- ubuntu1404-test
tasks: *std_tests
- name: os-x-108-i686
display_name: OS X 10.8 i686
expansions:
<<: *osx_expansions
env_vars: CC="clang -m32 -march=i686"
run_on:
- osx-108
tasks: *std_tests
############## x86_64 #################
- name: ubuntu-1204-64
display_name: Ubuntu 12.04 64-bit
expansions:
<<: *x86_64_expansions
<<: *linux_expansions
run_on:
- ubuntu1204-test
tasks: *std_tests
- name: ubuntu-1404-64
display_name: Ubuntu 14.04 64-bit
expansions:
<<: *x86_64_expansions
<<: *linux_expansions
run_on:
- ubuntu1404-test
tasks: *std_tests
- name: os-x-108-64
display_name: OS X 10.8 64-bit
expansions:
<<: *osx_expansions
run_on:
- osx-108
tasks: *std_tests
- name: solaris-64-bit
display_name: Solaris 64-bit
expansions:
<<: *x86_64_expansions
<<: *solaris_expansions
path: "/opt/mongodbtoolchain/bin/"
run_on:
- solaris
tasks: *std_tests
- name: windows-64-mingw64
display_name: Windows 64-bit MinGW-64
expansions:
<<: *default_expansions
path: "/cygdrive/c/mingw-w64/x86_64-4.9.1-posix-seh-rt_v3-rev1/mingw64/bin:/cygdrive/c/sasl/"
run_on:
- windows-64-vs2013-test
tasks: *std_tests