|
| 1 | +####################################### |
| 2 | +# libmongoc config for MCI # |
| 3 | +####################################### |
| 4 | + |
| 5 | +####################################### |
| 6 | +# Options # |
| 7 | +####################################### |
| 8 | + |
1 | 9 | stepback: true
|
| 10 | + |
| 11 | +####################################### |
| 12 | +# Functions # |
| 13 | +####################################### |
| 14 | + |
| 15 | +functions: |
| 16 | + fetch_source: |
| 17 | + command: git.get_project |
| 18 | + params: |
| 19 | + directory: libmongoc |
| 20 | + |
| 21 | +libmongoc_variables: |
| 22 | + ## Tests run on most buildvariants |
| 23 | + |
| 24 | + std_test_def: &std_tests |
| 25 | + - name: compile |
| 26 | + - name: make check |
| 27 | + |
| 28 | + ## Architectures |
| 29 | + |
| 30 | + default_expansions_def: &default_expansions |
| 31 | + env_vars: CFLAGS="" |
| 32 | + mongodb_args: "--fork --logpath=/data/log --dbpath=/data/db --pidfilepath=/data/pid" |
| 33 | + |
| 34 | + i386_expansions_def: &i386_expansions |
| 35 | + env_vars: CFLAGS="-m32 -march=i386" |
| 36 | + |
| 37 | + i686_expansions_def: &i686_expansions |
| 38 | + env_vars: CFLAGS="-m32 -march=i686" |
| 39 | + |
| 40 | + x86_64_expansions_def: &x86_64_expansions |
| 41 | + env_vars: CFLAGS="-m64 -march=x86-64" |
| 42 | + |
| 43 | + ## "Platforms" or whatever |
| 44 | + |
| 45 | + linux_expansions_def: &linux_expansions |
| 46 | + j_flag: -j$(grep -c ^processor /proc/cpuinfo) |
| 47 | + mongo_url: "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-latest.tgz" |
| 48 | + |
| 49 | + osx_expansions_def: &osx_expansions |
| 50 | + j_flag: -j$(sysctl -n hw.logicalcpu) |
| 51 | + mongo_url: "https://fastdl.mongodb.org/osx/mongodb-osx-x86_64-latest.tgz" |
| 52 | + |
| 53 | + solaris_expansions_def: &solaris_expansions |
| 54 | + j_flag: -j$(kstat cpu_info|grep core_id|sort -u|wc -l) |
| 55 | + mongo_url: "https://fastdl.mongodb.org/sunos5/mongodb-sunos5-x86_64-latest.tgz" |
| 56 | + |
| 57 | + mingw_expansions_def: &mingw_expansions |
| 58 | + j_flag: -j$(grep -c ^processor /proc/cpuinfo) |
| 59 | + mongo_url: "https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-latest.zip" |
| 60 | + ext: ".zip" |
| 61 | + |
| 62 | +####################################### |
| 63 | +# Pre Task # |
| 64 | +####################################### |
| 65 | + |
2 | 66 | pre:
|
3 |
| - - command: expansions.fetch |
4 |
| - params: |
5 |
| - keys: |
6 |
| - - local_key: "aws_key" |
7 |
| - remote_key: "project_aws_key" |
8 |
| - - local_key: "aws_secret" |
9 |
| - remote_key: "project_aws_secret" |
10 |
| - - command: shell.exec |
11 |
| - params: |
12 |
| - script: | |
13 |
| - set -o verbose |
14 |
| - rm -rf "c-driver" |
15 |
| - rm -rf /data/db |
16 |
| - mkdir -p /data/db |
17 |
| -post: |
18 |
| - - command: shell.exec |
19 |
| - params: |
20 |
| - script: | |
21 |
| - set -o verbose |
22 |
| - ${killall_mci|pkill -9 mongod; pkill -9 mongos} |
23 |
| -
|
24 |
| -## tasks |
25 |
| -tasks: |
26 |
| -- name: compile |
27 |
| - commands: |
28 |
| - - command: git.get_project |
29 |
| - params: |
30 |
| - directory: "c-driver" |
31 |
| - - command: git.apply_patch |
| 67 | + - command: expansions.fetch |
32 | 68 | params:
|
33 |
| - directory: "c-driver" |
| 69 | + keys: |
| 70 | + - local_key: aws_key |
| 71 | + remote_key: project_aws_key |
| 72 | + - local_key: aws_secret |
| 73 | + remote_key: project_aws_secret |
| 74 | + |
34 | 75 | - command: shell.exec
|
35 | 76 | params:
|
36 |
| - working_dir: "c-driver" |
37 |
| - script: | |
38 |
| - set -o verbose |
39 |
| - set -o errexit |
40 |
| - ./autogen.sh |
41 |
| - make ${compile_flags} |
42 |
| - tar -czvf ../mongo-c-driver.tar.gz . |
43 |
| - - command: s3.put |
| 77 | + script: | |
| 78 | + set -o verbose |
| 79 | + rm -rf libmongoc |
| 80 | + rm -rf /data/db |
| 81 | + mkdir -p /data/db |
| 82 | +
|
| 83 | +post: |
| 84 | + - command: shell.exec |
44 | 85 | params:
|
45 |
| - aws_key: ${aws_key} |
46 |
| - aws_secret: ${aws_secret} |
47 |
| - remote_file: mongo-c-driver/${build_variant}/${revision}/artifacts/${build_id}.tar.gz |
48 |
| - bucket: mciuploads |
49 |
| - local_file: mongo-c-driver.tar.gz |
50 |
| - permissions: public-read |
51 |
| - content_type: ${content_type|application/x-gzip} |
52 |
| - |
53 |
| -- name: "make check" |
| 86 | + script: | |
| 87 | + set -o verbose |
| 88 | + ${killall_mci|pkill -9 mongod; pkill -9 mongos} |
| 89 | +
|
| 90 | +
|
| 91 | +####################################### |
| 92 | +# Tasks # |
| 93 | +####################################### |
| 94 | + |
| 95 | +tasks: |
| 96 | +- name: compile |
| 97 | + commands: |
| 98 | + - command: git.get_project |
| 99 | + params: |
| 100 | + directory: libmongoc |
| 101 | + - command: git.apply_patch |
| 102 | + params: |
| 103 | + directory: libmongoc |
| 104 | + - command: shell.exec |
| 105 | + params: |
| 106 | + working_dir: libmongoc |
| 107 | + script: | |
| 108 | + set -o verbose |
| 109 | + set -o errexit |
| 110 | + export PATH=${path}:$PATH |
| 111 | + ${env_vars} ./autogen.sh |
| 112 | + make ${j_flag} |
| 113 | + - command: shell.exec |
| 114 | + params: |
| 115 | + working_dir: libmongoc |
| 116 | + script: | |
| 117 | + set -o verbose |
| 118 | + tar -czvf ../libmongoc.tar.gz . |
| 119 | + - command: s3.put |
| 120 | + params: |
| 121 | + aws_key: ${aws_key} |
| 122 | + aws_secret: ${aws_secret} |
| 123 | + remote_file: libmongoc/${build_variant}/${revision}/artifacts/${build_id}.tar.gz |
| 124 | + bucket: mciuploads |
| 125 | + local_file: libmongoc.tar.gz |
| 126 | + permissions: public-read |
| 127 | + content_type: ${content_type|application/x-gzip} |
| 128 | + |
| 129 | +- name: make check |
54 | 130 | depends_on:
|
55 |
| - - name: "compile" |
| 131 | + - name: compile |
56 | 132 | commands:
|
57 |
| - - command: shell.exec |
58 |
| - params: |
59 |
| - script: | |
60 |
| - mkdir c-driver |
61 |
| - - command: shell.exec |
62 |
| - params: |
63 |
| - working_dir: "c-driver" |
64 |
| - script: | |
65 |
| - set -o verbose |
66 |
| - set -o errexit |
67 |
| - trap 'set +o errexit; pkill -9 mongod; pkill -9 mongos}' EXIT |
68 |
| - # MCI's S3 mechanism doesn't support symlinks |
69 |
| - curl http://s3.amazonaws.com/mciuploads/mongo-c-driver/${build_variant}/${revision}/artifacts/${build_id}.tar.gz -o ${build_id}.tar.gz --silent |
70 |
| - tar -xzf ${build_id}.tar.gz |
71 |
| - curl -s ${mongo_url} --output mongo_enterprise.${ext|tgz} |
72 |
| - ${decompress} mongo_enterprise.${ext|tgz} |
73 |
| - cp mongodb*/bin/mongod${extension} ./mongod${extension} |
74 |
| - chmod +x ./mongod${extension} |
75 |
| - ./mongod${extension} ${mongodb_args} |
76 |
| - sleep 30 |
77 |
| - make check |
| 133 | + - command: shell.exec |
| 134 | + params: |
| 135 | + script: | |
| 136 | + mkdir libmongoc |
| 137 | + - command: shell.exec |
| 138 | + params: |
| 139 | + working_dir: libmongoc |
| 140 | + script: | |
| 141 | + set -o verbose |
| 142 | + set -o errexit |
| 143 | + trap 'set +o errexit; pkill -9 mongod; pkill -9 mongos}' EXIT |
| 144 | + # MCI's S3 mechanism doesn't support symlinks |
| 145 | + curl http://s3.amazonaws.com/mciuploads/libmongoc/${build_variant}/${revision}/artifacts/${build_id}.tar.gz -o ${build_id}.tar.gz --silent |
| 146 | + tar -xzf ${build_id}.tar.gz |
| 147 | + curl -s ${mongo_url} --output mongo_enterprise.${ext|tgz} |
| 148 | + ${decompress} mongo_enterprise.${ext|tgz} |
| 149 | + cp mongodb*/bin/mongod${extension} ./mongod${extension} |
| 150 | + chmod +x ./mongod${extension} |
| 151 | + ./mongod${extension} ${mongodb_args} |
| 152 | + sleep 30 |
| 153 | + make check |
| 154 | +
|
| 155 | +####################################### |
| 156 | +# Buildvariants # |
| 157 | +####################################### |
78 | 158 |
|
79 | 159 | buildvariants:
|
80 |
| -- name: ubuntu-1404 |
81 |
| - display_name: "Ubuntu-1404" |
82 |
| - expansions: |
83 |
| - compile_flags: -j$(grep -c ^processor /proc/cpuinfo) |
84 |
| - mongo_url: "http://downloads.mongodb.com/linux/mongodb-linux-x86_64-enterprise-ubuntu1404-latest.tgz" |
85 |
| - mongodb_args: "--dbpath /data/db --nopreallocj --setParameter=enableTestCommands=1 &" |
86 |
| - run_on: |
87 |
| - - ubuntu1404-test |
88 |
| - tasks: |
89 |
| - - name: compile |
90 |
| - - name: "make check" |
| 160 | + |
| 161 | +################ 32-bit ############### |
| 162 | + |
| 163 | +- name: rhel55-32 |
| 164 | + display_name: RHEL 5.5 32-bit |
| 165 | + expansions: |
| 166 | + <<: *default_expansions |
| 167 | + <<: *linux_expansions |
| 168 | + run_on: |
| 169 | + - rhel55-32 |
| 170 | + tasks: *std_tests |
| 171 | + |
| 172 | +- name: windows-32 |
| 173 | + display_name: Windows 32-bit |
| 174 | + expansions: |
| 175 | + <<: *default_expansions |
| 176 | + <<: *mingw_expansions |
| 177 | + # TODO: stuck on 2.6? |
| 178 | + mongo_url: "https://fastdl.mongodb.org/win32/mongodb-win32-i386-2.6.9.zip" |
| 179 | + run_on: |
| 180 | + - windows-32 |
| 181 | + tasks: *std_tests |
| 182 | + |
| 183 | +########## i386 cross-compile ######### |
| 184 | + |
| 185 | +- name: ubuntu-1204-i386 |
| 186 | + display_name: Ubuntu 12.04 i386 |
| 187 | + expansions: |
| 188 | + <<: *i386_expansions |
| 189 | + <<: *linux_expansions |
| 190 | + run_on: |
| 191 | + - ubuntu1204-test |
| 192 | + tasks: *std_tests |
| 193 | + |
| 194 | +- name: ubuntu-1404-i386 |
| 195 | + display_name: Ubuntu 14.04 i386 |
| 196 | + expansions: |
| 197 | + <<: *i386_expansions |
| 198 | + <<: *linux_expansions |
| 199 | + run_on: |
| 200 | + - ubuntu1404-test |
| 201 | + tasks: *std_tests |
| 202 | + |
| 203 | +- name: os-x-108-i386 |
| 204 | + display_name: OS X 10.8 i386 |
| 205 | + expansions: |
| 206 | + <<: *osx_expansions |
| 207 | + env_vars: CC="clang -m32 -march=i386" |
| 208 | + run_on: |
| 209 | + - osx-108 |
| 210 | + tasks: *std_tests |
| 211 | + |
| 212 | +########## i686 cross-compile ######### |
| 213 | + |
| 214 | +- name: ubuntu-1204-i686 |
| 215 | + display_name: Ubuntu 12.04 i686 |
| 216 | + expansions: |
| 217 | + <<: *i686_expansions |
| 218 | + <<: *linux_expansions |
| 219 | + run_on: |
| 220 | + - ubuntu1204-test |
| 221 | + tasks: *std_tests |
| 222 | + |
| 223 | +- name: ubuntu-1404-i686 |
| 224 | + display_name: Ubuntu 14.04 i686 |
| 225 | + expansions: |
| 226 | + <<: *i686_expansions |
| 227 | + <<: *linux_expansions |
| 228 | + run_on: |
| 229 | + - ubuntu1404-test |
| 230 | + tasks: *std_tests |
| 231 | + |
| 232 | +- name: os-x-108-i686 |
| 233 | + display_name: OS X 10.8 i686 |
| 234 | + expansions: |
| 235 | + <<: *osx_expansions |
| 236 | + env_vars: CC="clang -m32 -march=i686" |
| 237 | + run_on: |
| 238 | + - osx-108 |
| 239 | + tasks: *std_tests |
| 240 | + |
| 241 | +############## x86_64 ################# |
| 242 | + |
| 243 | +- name: ubuntu-1204-64 |
| 244 | + display_name: Ubuntu 12.04 64-bit |
| 245 | + expansions: |
| 246 | + <<: *x86_64_expansions |
| 247 | + <<: *linux_expansions |
| 248 | + run_on: |
| 249 | + - ubuntu1204-test |
| 250 | + tasks: *std_tests |
| 251 | + |
| 252 | +- name: ubuntu-1404-64 |
| 253 | + display_name: Ubuntu 14.04 64-bit |
| 254 | + expansions: |
| 255 | + <<: *x86_64_expansions |
| 256 | + <<: *linux_expansions |
| 257 | + run_on: |
| 258 | + - ubuntu1404-test |
| 259 | + tasks: *std_tests |
| 260 | + |
| 261 | +- name: os-x-108-64 |
| 262 | + display_name: OS X 10.8 64-bit |
| 263 | + expansions: |
| 264 | + <<: *osx_expansions |
| 265 | + run_on: |
| 266 | + - osx-108 |
| 267 | + tasks: *std_tests |
| 268 | + |
| 269 | +- name: solaris-64-bit |
| 270 | + display_name: Solaris 64-bit |
| 271 | + expansions: |
| 272 | + <<: *x86_64_expansions |
| 273 | + <<: *solaris_expansions |
| 274 | + path: "/opt/mongodbtoolchain/bin/" |
| 275 | + run_on: |
| 276 | + - solaris |
| 277 | + tasks: *std_tests |
| 278 | + |
| 279 | +- name: windows-64-mingw64 |
| 280 | + display_name: Windows 64-bit MinGW-64 |
| 281 | + expansions: |
| 282 | + <<: *default_expansions |
| 283 | + path: "/cygdrive/c/mingw-w64/x86_64-4.9.1-posix-seh-rt_v3-rev1/mingw64/bin:/cygdrive/c/sasl/" |
| 284 | + run_on: |
| 285 | + - windows-64-vs2013-test |
| 286 | + tasks: *std_tests |
0 commit comments