forked from mongodb/mongo-cxx-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mci.yml
111 lines (97 loc) · 3.32 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
#######################################
# CXX Driver Config for MCI #
#######################################
#######################################
# Functions #
#######################################
functions:
"fetch_source":
command: git.get_project
params:
directory: "mongo-cxx-driver"
"start_mongod":
command: shell.exec
params:
working_dir: "."
script: |
wget -O mongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-latest.tgz
tar --extract --file mongodb.tgz --strip-components=2 --wildcards --no-anchored "*/bin/mongod"
mkdir -p /data/tmp/db
./mongod --fork --logpath=/data/tmp/log --dbpath=/data/tmp/db --pidfilepath=/data/tmp/pid
"install_c_driver":
command: shell.exec
params:
working_dir: "."
script: |
git clone -b master https://github.com/mongodb/mongo-c-driver.git
cd mongo-c-driver
rm -rf /data/tmp/c-driver-install
./autogen.sh --prefix="/data/tmp/c-driver-install" --enable-tests=no --enable-examples=no
make
make install
"stop_mongod":
command: shell.exec
params:
working_dir: "."
script:
kill -TERM $(cat /data/tmp/pid)
#######################################
# 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: |
rm -rf "mongo-cxx-driver"
rm -fr "mongo-c-driver"
rm -fr mongod
#######################################
# Tasks #
#######################################
tasks:
- name: compile_and_test
commands:
- func: "fetch_source"
- command: git.apply_patch
params:
directory: "mongo-cxx-driver"
- func: "install_c_driver"
- func: "start_mongod"
- command: shell.exec
params:
working_dir: "mongo-cxx-driver/build"
script: |
PKG_CONFIG_PATH="/data/tmp/c-driver-install/lib/pkgconfig" /opt/cmake/bin/cmake -DBUILD_UNIT_TESTS=true -DBUILD_EXAMPLES=true -DCMAKE_BUILD_TYPE=${build_type} CMAKE_INSTALL_PREFIX=/data/tmp/cxx-driver-install ..
make
make test
- func: "stop_mongod"
#######################################
# Buildvariants #
#######################################
buildvariants:
#######################################
# Linux Buildvariants #
#######################################
- name: ubuntu1404-release
display_name: "Ubuntu 14.04 Release"
expansions:
build_type: "Release"
run_on:
- ubuntu1404-test
tasks:
- name: compile_and_test
- name: ubuntu1404-debug
display_name: "Ubuntu 14.04 Debug"
expansions:
build_type: "Debug"
run_on:
- ubuntu1404-test
tasks:
- name: compile_and_test