forked from mongodb/mongo-c-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mci.yml
1601 lines (1449 loc) · 49.6 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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#######################################
# C Driver Config for MCI #
#######################################
## Some variables for convenience:
c_driver_variables:
test_list: &std_tests
- name: "compile"
- name: "integration-test-latest"
## Note that the in 3.0, the default storage engine is MMAPv1 and
## WiredTiger is opt-in, but in latest as of MongoDB 3.1.4, the
## default is WiredTiger and MMAPv1 is opt-in.
storage_engine_test_list: &storage_engine_tests
- name: "compile"
- name: "integration-test-3.0"
- name: "integration-test-3.0-with-WiredTiger"
- name: "integration-test-latest"
- name: "integration-test-latest-with-MMAPv1"
release_archive: &release_archive_builder
- name: "releasearchive"
just_compile: &just_compile
- name: "compile"
compile_unix_variants: &compile_unix_variants
- name: "compileunixtest-c89"
- name: "compileunixtest-c99"
- name: "compileunixtest-c11"
- name: "compileunixtest-openssl-sasl"
- name: "compileunixtest-openssl-nosasl"
- name: "compileunixtest-nossl-sasl"
- name: "compileunixtest-nossl-nosasl"
topology_test_list: &topology_tests
- name: "compile"
- name: "integration-test-2.4"
- name: "integration-test-2.4-replica-set"
- name: "integration-test-2.4-sharded"
- name: "integration-test-2.6"
- name: "integration-test-2.6-replica-set"
- name: "integration-test-2.6-sharded"
- name: "integration-test-3.0"
- name: "integration-test-3.0-replica-set"
- name: "integration-test-3.0-sharded"
- name: "integration-test-latest"
- name: "integration-test-latest-replica-set"
- name: "integration-test-latest-sharded"
topology_test_no_auth_list: &topology_tests_no_auth
- name: "compile"
- name: "integration-test-2.4-no-auth"
- name: "integration-test-2.4-replica-set-no-auth"
- name: "integration-test-2.4-sharded-no-auth"
- name: "integration-test-2.6-no-auth"
- name: "integration-test-2.6-replica-set-no-auth"
- name: "integration-test-2.6-sharded-no-auth"
- name: "integration-test-3.0-no-auth"
- name: "integration-test-3.0-replica-set-no-auth"
- name: "integration-test-3.0-sharded-no-auth"
- name: "integration-test-latest-no-auth"
- name: "integration-test-latest-replica-set-no-auth"
- name: "integration-test-latest-sharded-no-auth"
topology_test_latest: &topology_tests_latest
- name: "compile"
- name: "integration-test-latest"
- name: "integration-test-latest-no-auth"
- name: "integration-test-latest-replica-set"
- name: "integration-test-latest-replica-set-no-auth"
- name: "integration-test-latest-sharded"
- name: "integration-test-latest-sharded-no-auth"
ssl_tests_test_list: &ssl_tests_latest
- name: "compile"
- name: "integration-test-latest-ssl"
- name: "integration-test-latest-ssl-no-auth"
ssl_test_list: &ssl_tests
- name: "compile"
- name: "integration-test-3.0-ssl"
- name: "integration-test-3.0-ssl-no-auth"
- name: "integration-test-latest-ssl"
- name: "integration-test-latest-ssl-no-auth"
## Common download urls (merge in as hashes)
mongo_download_url_prefixes:
linuxppc64le: &mongo_url_linuxppc64le
mongo_url_prefix: "http://downloads.10gen.com/linux/mongodb-linux-ppc64le-enterprise-"
linux64: &mongo_url_linux64
mongo_url_prefix: "http://downloads.mongodb.org/linux/mongodb-linux-x86_64-"
ubuntu1204: &mongo_url_ubuntu1204
mongo_url_platform: "ubuntu1204-"
<<: *mongo_url_linux64
ubuntu1404: &mongo_url_ubuntu1404
mongo_url_platform: "ubuntu1404-"
<<: *mongo_url_linux64
windows64ssl: &mongo_url_windows64ssl
mongo_url_prefix: "http://downloads.10gen.com/win32/mongodb-win32-x86_64-enterprise-windows-64-"
mongo_url_platform: ""
windows64: &mongo_url_windows64
mongo_url_prefix: "http://downloads.mongodb.org/win32/mongodb-win32-x86_64-"
mongo_url_platform: ""
windows32: &mongo_url_windows32
mongo_url_prefix: "http://downloads.mongodb.org/win32/mongodb-win32-i386-"
rhel70: &mongo_url_rhel70
mongo_url_platform: "rhel70-"
<<: *mongo_url_linux64
rhel62: &mongo_url_rhel62
mongo_url_platform: "rhel62-"
<<: *mongo_url_linux64
rhel55: &mongo_url_rhel55
mongo_url_platform: "rhel55-"
<<: *mongo_url_linux64
rhel55_32: &mongo_url_rhel55_32
mongo_url_prefix: "http://downloads.mongodb.org/linux/mongodb-linux-i686-"
osx-1010: &mongo_url_osx_1010
mongo_url_prefix: "http://downloads.mongodb.org/osx/mongodb-osx-x86_64-"
osx-1010: &mongo_url_osx_1010_enterprise
mongo_url_prefix: "http://downloads.mongodb.com/osx/mongodb-osx-x86_64-enterprise-"
solaris: &mongo_url_solaris
mongo_url_prefix: "http://downloads.mongodb.org/sunos5/mongodb-sunos5-x86_64-"
rhel71_ppc64le: &mongo_url_ppc64le_rhel71
mongo_url_platform: "rhel71-"
<<: *mongo_url_linuxppc64le
## Common sets of CFLAGS
cflags:
standard: &cflags_power8
cflags: "-mcpu=power8 -mtune=power8 -mcmodel=medium -Werror"
standard: &cflags_64
cflags: "-m64 -march=x86-64 -Werror"
standard_no_werror: &cflags_64_no_werror
cflags: "-m64 -march=x86-64"
standard_32: &cflags_32
cflags: "-m32 -march=i386 -Werror"
osx_1010: &cflags_osx_1010
cflags: "-m64 -march=x86-64"
solaris_64: &cflags_solaris_64
cflags: "-m64 -march=x86-64"
configure:
standard: &configure_flags_default
configure_flags: "--enable-html-docs=no --enable-man-pages=no --enable-yelp=no --enable-examples=no --enable-optimizations --enable-maintainer-flags --disable-silent-rules --with-libbson=bundled"
## Extra $PATH entries
paths:
unix_path: &unix_path
extra_path:
osx_path: &osx_path
extra_path:
windows_path: &windows_path
extra_path: /cygdrive/c/mongo-c-driver/bin:/cygdrive/c/openssl/bin
solaris_path: &solaris_path
extra_path: /opt/mongodbtoolchain/bin
## Scripts that are shared between buildvariants
scripts:
mongo_orchestration:
windows: &mongo_orchestration_windows
start_mongo_orchestration: |
echo "Starting Mongo Orchestration..."
export MONGO_ORCHESTRATION_HOME=/tmp/orchestration-home
if [ -f "/cygdrive/c/tmp/orchestration-home/server.pid" ]; then
echo "Prior Mongo Orchestration?"
mongo-orchestration stop
fi
# This seems to alleviate issues starting Orchestration on Windows.
python -m virtualenv venv
cd venv
. Scripts/activate
git clone https://github.com/10gen/mongo-orchestration.git
cd mongo-orchestration
python setup.py install
cd ../..
mkdir -p /cygdrive/c/tmp/orchestration-home
rm -f /cygdrive/c/$MONGO_ORCHESTRATION_HOME/server.pid
echo From shell `date` > /cygdrive/c/tmp/orchestration-home/server.log
echo "{ \"releases\": { \"default\": \"c:\\\\mongodb\\\\bin\" }}" > orchestration.config
mongo-orchestration -f orchestration.config -e default -s wsgiref start --socket-timeout-ms=60000 --bind=127.0.0.1 --enable-majority-read-concern
curl -s http://localhost:8889/
unix: &mongo_orchestration_unix
start_mongo_orchestration: |
echo "Starting Mongo Orchestration..."
export MONGO_ORCHESTRATION_HOME=/tmp/orchestration-home
if [ -f /tmp/orchestration-home/server.pid ]; then
echo "Prior Mongo Orchestration?"
kill `cat /tmp/orchestration-home/server.pid`
fi
mkdir -p $MONGO_ORCHESTRATION_HOME
rm -f $MONGO_ORCHESTRATION_HOME/server.pid
echo From shell `date` > $MONGO_ORCHESTRATION_HOME/server.log
echo "{ \"releases\": { \"default\": \"`pwd`/mongodb/bin\" } }" > orchestration.config
TMPDIR=/data/db mongo-orchestration -f orchestration.config -e default start --socket-timeout-ms=60000 --bind=127.0.0.1 --enable-majority-read-concern
curl -s http://localhost:8889/
start_topology_command: &start_topology_command
start_topology: |
curl -s --data @"$ORCHESTRATION_FILE" "$ORCHESTRATION_URL"
./mongodb/bin/mongo $MONGO_SHELL_CONNECTION_FLAGS --eval 'printjson(db.serverBuildInfo())' admin
./mongodb/bin/mongo $MONGO_SHELL_CONNECTION_FLAGS --eval 'printjson(db.adminCommand({getCmdLineOpts:1}))' admin
./mongodb/bin/mongo $MONGO_SHELL_CONNECTION_FLAGS --eval 'printjson(db.isMaster())' admin
compile:
osx_openssl: &compile_osx_openssl
compile_script: |
set -o errexit
set -o verbose
./autogen.sh --enable-optimizations --enable-html-docs=no --enable-man-pages=no --enable-yelp=no --enable-examples=no --enable-sasl --enable-ssl=openssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
make -j8
make abicheck
(cd src/libbson && make test TEST_ARGS="--no-fork -d")
osx_nativessl: &compile_osx_nativessl
compile_script: |
set -o errexit
set -o verbose
./autogen.sh --enable-optimizations --enable-html-docs=no --enable-man-pages=no --enable-yelp=no --enable-examples=no --enable-sasl --enable-ssl=darwin --enable-maintainer-flags --enable-debug --with-libbson=bundled
make -j8
make abicheck
(cd src/libbson && make test TEST_ARGS="--no-fork -d")
osx_nossl: &compile_osx_nossl
compile_script: |
set -o errexit
set -o verbose
./autogen.sh --enable-optimizations --enable-html-docs=no --enable-man-pages=no --enable-yelp=no --enable-examples=no --enable-sasl --enable-ssl=no --enable-maintainer-flags --enable-debug --with-libbson=bundled
make -j8
make abicheck
(cd src/libbson && make test TEST_ARGS="--no-fork -d")
unix: &compile_unix
compile_script: |
set -o errexit
set -o verbose
./autogen.sh --enable-optimizations --enable-html-docs=no --enable-man-pages=no --enable-yelp=no --enable-examples=no --enable-sasl --enable-ssl=openssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
make -j8
make abicheck
(cd src/libbson && make test TEST_ARGS="--no-fork -d")
solaris64: &compile_solaris64
compile_script: |
set -o errexit
set -o verbose
sudo /opt/csw/bin/pkgutil -y -i sasl_dev
export SASL_CFLAGS="-I/opt/csw/include/"
export SASL_LIBS="-L/opt/csw/lib/amd64/ -lsasl2"
./autogen.sh --enable-optimizations --enable-man-pages --enable-sasl --enable-ssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
make
make abicheck
(cd src/libbson && make test TEST_ARGS="--no-fork -d")
solaris: &compile_solaris
compile_script: |
set -o errexit
set -o verbose
./autogen.sh --enable-optimizations --enable-man-pages --enable-sasl --enable-ssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
make
make abicheck
(cd src/libbson && make test TEST_ARGS="--no-fork -d")
msvc: &compile_msvc
compile_script: |
set -o errexit
set -o verbose
cmake="/cygdrive/c/cmake/bin/cmake"
git submodule update --init
cd src/libbson
echo "MSBUILD: $MSBUILD, GENERATOR: $GENERATOR, CMAKE_DEFS: $CMAKE_DEFS"
"$cmake" -G "$GENERATOR" "-DCMAKE_INSTALL_PREFIX=C:/mongo-c-driver"
"$MSBUILD" /m ALL_BUILD.vcxproj
"$MSBUILD" /m INSTALL.vcxproj
cd ../..
"$cmake" -G "$GENERATOR" "-DCMAKE_INSTALL_PREFIX=C:/mongo-c-driver" "-DBSON_ROOT_DIR=C:/mongo-c-driver" $CMAKE_DEFS
"$MSBUILD" /m ALL_BUILD.vcxproj
"$MSBUILD" /m INSTALL.vcxproj
(cd src/libbson && ./Debug/test-libbson.exe --no-fork -d)
connection_flags:
ssl: &connection_flags_ssl
set_connection_flags: |
export MONGO_SHELL_CONNECTION_FLAGS="$MONGO_SHELL_CONNECTION_FLAGS --host localhost --ssl --sslCAFile=/tmp/orchestration-home/ca.pem --sslPEMKeyFile=/tmp/orchestration-home/client.pem"
export MONGOC_TEST_SSL_WEAK_CERT_VALIDATION=on
export MONGOC_TEST_SSL_PEM_FILE=/tmp/orchestration-home/client.pem
export MONGOC_TEST_SSL_CA_FILE=/tmp/orchestration-home/ca.pem
winssl: &connection_flags_winssl
set_connection_flags: |
export MONGO_SHELL_CONNECTION_FLAGS="$MONGO_SHELL_CONNECTION_FLAGS --host localhost --ssl --sslCAFile=/cygdrive/c/tmp/orchestration-home/ca.pem --sslPEMKeyFile=/cygdrive/c/tmp/orchestration-home/client.pem"
export MONGOC_TEST_SSL_WEAK_CERT_VALIDATION=on
export MONGOC_TEST_SSL_PEM_FILE=/cygdrive/c/tmp/orchestration-home/client.pem
export MONGOC_TEST_SSL_CA_FILE=/cygdrive/c/tmp/orchestration-home/ca.pem
integration_tests:
msvc: &run_integration_tests_msvc
run_integration_tests: |
export PATH=$PATH:`pwd`/tests:`pwd`/Debug:`pwd`/src/libbson/Debug
export MONGOC_TEST_FUTURE_TIMEOUT_MS=30000
export MONGOC_ENABLE_MAJORITY_READ_CONCERN=on
./Debug/test-libmongoc.exe -d -F test-results.json
solaris: &run_integration_tests_solaris
run_integration_tests: |
export MONGOC_TEST_FUTURE_TIMEOUT_MS=30000
export MONGOC_ENABLE_MAJORITY_READ_CONCERN=on
sudo /opt/csw/bin/pkgutil -y -i sasl_dev
export SASL_CFLAGS="-I/opt/csw/include/"
export SASL_LIBS="-L/opt/csw/lib/amd64/ -lsasl2"
export LD_LIBRARY_PATH="/opt/csw/lib/amd64/:.libs:src/libbson/.libs"
make TEST_ARGS="-d -F test-results.json" test
unix: &run_integration_tests_unix
run_integration_tests: |
export MONGOC_TEST_FUTURE_TIMEOUT_MS=30000
export MONGOC_ENABLE_MAJORITY_READ_CONCERN=on
export LD_LIBRARY_PATH=".libs:src/libbson/.libs"
# This libtool wrapper script was built in a unique dir like
# "/data/mci/998e754a0d1ed79b8bf733f405b87778/mongo-c-driver",
# replace its absolute path with "." so it can run in the CWD.
sed -i'' 's/\/data\/mci\/[a-z0-9]\{32\}\/mongo-c-driver/./g' test-libmongoc
make TEST_ARGS="-d -F test-results.json" test
osx: &run_integration_tests_osx
run_integration_tests: |
export MONGOC_TEST_FUTURE_TIMEOUT_MS=30000
export MONGOC_ENABLE_MAJORITY_READ_CONCERN=on
export DYLD_LIBRARY_PATH=".libs:src/libbson/.libs"
make TEST_ARGS="-d -F test-results.json" test
## Other OS-specific attributes, grouped by OS
unix_common: &unix_common
<<: *compile_unix
<<: *mongo_orchestration_unix
<<: *run_integration_tests_unix
<<: *start_topology_command
<<: *unix_path
solaris_common: &solaris_common
<<: *unix_common
<<: *compile_solaris
<<: *solaris_path
solaris64_common: &solaris64_common
<<: *compile_unix
<<: *mongo_orchestration_unix
<<: *run_integration_tests_solaris
<<: *start_topology_command
<<: *unix_path
<<: *compile_solaris64
<<: *solaris_path
ssl: &ssl
<<: *connection_flags_ssl
## Misc. for Windows builds
windows_compilers:
msvc2010_32bit: &with_msvc2010_32bit
generator: Visual Studio 10 2010
# Evergreen builders only have 64-bit SSL and SASL available.
cmake_defs: "-DENABLE_SSL:BOOL=OFF -DENABLE_SASL:BOOL=OFF"
msbuild: /cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
msvc2010: &with_msvc2010
generator: Visual Studio 10 2010 Win64
msbuild: /cygdrive/c/Windows/Microsoft.NET/Framework64/v4.0.30319/MSBuild.exe
dllpath: "c:/openssl/bin,c:/sasl/bin"
msvc2013_32bit: &with_msvc2013_32bit
generator: Visual Studio 12 2013
# Evergreen builders only have 64-bit SSL and SASL available.
cmake_defs: "-DENABLE_SSL:BOOL=OFF -DENABLE_SASL:BOOL=OFF"
msbuild: /cygdrive/c/Program Files (x86)/MSBuild/12.0/Bin/MSBuild.exe
msvc2013: &with_msvc2013
generator: Visual Studio 12 2013 Win64
msbuild: /cygdrive/c/Program Files (x86)/MSBuild/12.0/Bin/MSBuild.exe
dllpath: "c:/openssl/bin,c:/sasl/bin"
msvc2013: &with_msvc2013_nativessl
generator: Visual Studio 12 2013 Win64
msbuild: /cygdrive/c/Program Files (x86)/MSBuild/12.0/Bin/MSBuild.exe
dllpath: "c:/openssl/bin,c:/sasl/bin"
cmake_defs: "-DENABLE_SSL=WINDOWS"
msvc2015_32bit: &with_msvc2015_32bit
generator: Visual Studio 14 2015
# Evergreen builders only have 64-bit SSL and SASL available.
cmake_defs: "-DENABLE_SSL:BOOL=OFF -DENABLE_SASL:BOOL=OFF"
msbuild: /cygdrive/c/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe
msvc2015: &with_msvc2015
generator: Visual Studio 14 2015 Win64
msbuild: /cygdrive/c/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe
dllpath: "c:/openssl/bin,c:/sasl/bin"
msvc2015: &with_msvc2015_nativessl
generator: Visual Studio 14 2015 Win64
msbuild: /cygdrive/c/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe
dllpath: "c:/openssl/bin,c:/sasl/bin"
cmake_defs: "-DENABLE_SSL=WINDOWS"
## all windows buildvariants have these attributes in common
windows_common: &windows_common
mongo_url_extension: "zip"
extension: ".exe"
windows: true
<<: *windows_path
<<: *mongo_orchestration_windows
<<: *start_topology_command
msvc_common: &msvc_common
<<: *windows_common
<<: *compile_msvc
<<: *run_integration_tests_msvc
#######################################
# Functions #
#######################################
functions:
"fetch releasearchive" :
command: shell.exec
params:
script: |
set -o verbose
set -o errexit
rm -rf mongo-c-driver*
ls -la
curl -s https://s3.amazonaws.com/mciuploads/mongo-c-driver/${revision}/${version_id}/artifacts/mongo-c-driver-archive.tar.gz --output mongo-c-driver-archive.tar.gz
tar zxf mongo-c-driver-archive.tar.gz
rm mongo-c-driver-archive.tar.gz
mv mongo-c-driver* mongo-c-driver
"fetch source" :
command: git.get_project
params:
directory: mongo-c-driver
"fetch mongodb" :
command: shell.exec
params:
working_dir: "mongo-c-driver"
script: |
set -o verbose
set -o errexit
ls -la
curl -s ${mongo_url} --output mongo-archive.${ext|tgz}
${decompress} mongo-archive.${ext|tgz}
mv mongodb* mongodb
chmod +x ./mongodb/bin/mongod${extension}
if [ ${windows|false} = true ]; then
rm -rf /cygdrive/c/mongodb
cp -r mongodb /cygdrive/c/mongodb
fi
"create working directory" :
command: shell.exec
params:
script: |
rm -rf mongo-c-driver
mkdir mongo-c-driver
# MCI's S3 mechanism doesn't support symlinks, use curl instead of s3.get
"fetch artifacts" :
command: shell.exec
params:
working_dir: "mongo-c-driver"
script: |
set -o verbose
set -o errexit
ls -la
curl http://s3.amazonaws.com/mciuploads/mongo-c-driver/${build_variant}/${revision}/artifacts/mongo-${build_id}.tar.gz -o ${build_id}.tar.gz --silent --max-time 120
tar zxf ${build_id}.tar.gz
"compile function" :
command: shell.exec
params:
working_dir: "mongo-c-driver"
script: |
export PATH=${extra_path}:$PATH
export GENERATOR="${generator}" # For CMake on Windows
export MSBUILD="${msbuild}" # For CMake on Windows
export CMAKE_DEFS="${cmake_defs}" # For CMake on Windows
export CFLAGS="${cflags}"
${compile_script}
"quick unix compile function" :
command: shell.exec
params:
working_dir: "mongo-c-driver"
script: |
set -o errexit
set -o verbose
CC=${CC} CFLAGS="${CFLAGS}" ./autogen.sh ${configure_flags}
make -j8
"quick unix test function" :
command: shell.exec
params:
working_dir: "mongo-c-driver"
script: |
make abicheck
(cd src/libbson && make test TEST_ARGS="--no-fork -d")
MONGOC_TEST_SKIP_LIVE=on MONGOC_TEST_SKIP_SLOW=on make test
"set topology standalone" :
command: expansions.update
params:
updates:
- key: "orchestration_file"
value: "auth.json"
- key: "topology_type"
value: "server"
"set topology standalone ssl" :
command: expansions.update
params:
updates:
- key: "orchestration_file"
value: "auth-ssl.json"
- key: "topology_type"
value: "server"
"set topology replica set" :
command: expansions.update
params:
updates:
- key: "orchestration_file"
value: "auth.json"
- key: "topology_type"
value: "replica_set"
"set topology sharded" :
command: expansions.update
params:
updates:
- key: "orchestration_file"
value: "auth.json"
- key: "topology_type"
value: "sharded_cluster"
"set topology standalone ssl no auth" :
command: expansions.update
params:
updates:
- key: "orchestration_file"
value: "basic-ssl.json"
- key: "topology_type"
value: "server"
"set topology standalone no auth" :
command: expansions.update
params:
updates:
- key: "orchestration_file"
value: "basic.json"
- key: "topology_type"
value: "server"
"set topology replica set no auth" :
command: expansions.update
params:
updates:
- key: "orchestration_file"
value: "basic.json"
- key: "topology_type"
value: "replica_set"
"set topology sharded no auth" :
command: expansions.update
params:
updates:
- key: "orchestration_file"
value: "basic.json"
- key: "topology_type"
value: "sharded_cluster"
"use WiredTiger storage" :
command: expansions.update
params:
updates:
- key: "orchestration_file"
value: "wiredtiger.json"
- key: "topology_type"
value: "server"
"use MMAPv1 storage" :
command: expansions.update
params:
updates:
- key: "orchestration_file"
value: "mmapv1.json"
- key: "topology_type"
value: "server"
"set version 2.4" :
command: expansions.update
params:
updates:
- key: "mongo_url"
value: ${mongo_url_prefix}2.4.14.${mongo_url_extension|tgz}
"set version 2.6" :
command: expansions.update
params:
updates:
- key: "mongo_url"
value: ${mongo_url_prefix}2.6.10.${mongo_url_extension|tgz}
"set version 3.0" :
command: expansions.update
params:
updates:
- key: "mongo_url"
value: ${mongo_url_prefix}${mongo_url_platform|}3.0.5.${mongo_url_extension|tgz}
"set version latest" :
command: expansions.update
params:
updates:
- key: "mongo_url"
value: ${mongo_url_prefix}${mongo_url_platform|}latest.${mongo_url_extension|tgz}
"copy certificates" :
command: shell.exec
params:
working_dir: "mongo-c-driver"
script: |
set -o errexit
set -o verbose
if [ ${windows|false} = true ]; then
mkdir -p /cygdrive/c/tmp/orchestration-home/lib
cp -rf tests/x509gen/* /cygdrive/c/tmp/orchestration-home
cp -f /cygdrive/c/tmp/orchestration-home/client.pem /cygdrive/c/tmp/orchestration-home/lib/
else
mkdir -p /tmp/orchestration-home/lib
cp -rf tests/x509gen/* /tmp/orchestration-home
cp -f /tmp/orchestration-home/client.pem /tmp/orchestration-home/lib/
fi
"run integration tests" :
command: shell.exec
params:
working_dir: "mongo-c-driver"
script: |
set -o errexit
set -o verbose
if [ ${use_auth|false} = true ]; then
export MONGOC_TEST_USER=bob
export MONGOC_TEST_PASSWORD=pwd123
export MONGO_SHELL_CONNECTION_FLAGS="-ubob -ppwd123"
fi
export ORCHESTRATION_FILE="orchestration_configs/${topology_type}s/${orchestration_file}"
export ORCHESTRATION_URL="http://localhost:8889/v1/${topology_type}s"
export MONGO_ORCHESTRATION_HOME=/tmp/orchestration-home
# Run this function on exit.
done=false
finish () {
set +o errexit
if [ "$done" = false ]; then
# There was an error.
mongo-orchestration stop
echo "ORCHESTRATION LOG"
if [ ${windows|false} = true ]; then
cat /cygdrive/c/tmp/orchestration-home/server.log
else
cat /tmp/orchestration-home/server.log
fi
echo " END OF ORCHESTRATION LOG"
fi
}
trap finish EXIT
${set_connection_flags}
${start_mongo_orchestration}
${start_topology}
set +o errexit
${run_integration_tests}
mongo-orchestration stop
done=true
"report results" :
command: attach.results
params:
file_location: "mongo-c-driver/test-results.json"
#######################################
# Tasks #
#######################################
tasks:
- name: releasearchive
commands:
- func: "fetch source"
- command: git.apply_patch
params:
directory: "mongo-c-driver"
- command: shell.exec
params:
working_dir: "mongo-c-driver"
script: |
set -o errexit
set -o verbose
./autogen.sh --enable-man-pages --enable-html-docs --enable-sasl --enable-ssl --enable-maintainer-flags --enable-debug --with-libbson=bundled
make dist
mv mongo-c-driver*.tar.gz ../mongo-c-driver-archive.tar.gz
ls -la
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: mongo-c-driver-archive.tar.gz
remote_file: mongo-c-driver/${revision}/${version_id}/artifacts/mongo-c-driver-archive.tar.gz
bucket: mciuploads
permissions: public-read
content_type: ${content_type|application/x-gzip}
- name: compileunixtest-c11
commands:
- command: git.get_project
params:
directory: mongo-c-driver
- func: "quick unix compile function"
vars:
configure_flags: ${configure_flags}
CFLAGS: "${CFLAGS} -std=c11 -D_XOPEN_SOURCE=600"
CC: ${CC|gcc}
- func: "quick unix test function"
- name: compileunixtest-c99
commands:
- command: git.get_project
params:
directory: mongo-c-driver
- func: "quick unix compile function"
vars:
configure_flags: ${configure_flags}
CFLAGS: "${CFLAGS} -std=c99 -D_XOPEN_SOURCE=600"
CC: ${CC|gcc}
- func: "quick unix test function"
- name: compileunixtest-c89
commands:
- command: git.get_project
params:
directory: mongo-c-driver
- func: "quick unix compile function"
vars:
configure_flags: ${configure_flags}
CFLAGS: "${CFLAGS} -std=c89 -D_POSIX_C_SOURCE=200112L"
CC: ${CC|gcc}
- func: "quick unix test function"
- name: compileunixtest-openssl-sasl
commands:
- command: git.get_project
params:
directory: mongo-c-driver
- func: "quick unix compile function"
vars:
configure_flags: "${configure_flags} --enable-sasl --enable-ssl=openssl"
CFLAGS: ${CFLAGS}
CC: ${CC|gcc}
- func: "quick unix test function"
- name: compileunixtest-openssl-nosasl
commands:
- command: git.get_project
params:
directory: mongo-c-driver
- func: "quick unix compile function"
vars:
configure_flags: "${configure_flags} --enable-sasl=no --enable-ssl=openssl"
CFLAGS: ${CFLAGS}
CC: ${CC|gcc}
- func: "quick unix test function"
- name: compileunixtest-nossl-sasl
commands:
- command: git.get_project
params:
directory: mongo-c-driver
- func: "quick unix compile function"
vars:
configure_flags: "${configure_flags} --enable-sasl --enable-ssl=no"
CFLAGS: ${CFLAGS}
CC: ${CC|gcc}
- func: "quick unix test function"
- name: compileunixtest-nossl-nosasl
commands:
- command: git.get_project
params:
directory: mongo-c-driver
- func: "quick unix compile function"
vars:
configure_flags: "${configure_flags} --enable-sasl=no --enable-ssl=no"
CFLAGS: ${CFLAGS}
CC: ${CC|gcc}
- func: "quick unix test function"
- name: compile
commands:
- func: "fetch source"
- command: git.apply_patch
params:
directory: "mongo-c-driver"
- func: "compile function"
- command: shell.exec
params:
working_dir: "mongo-c-driver"
script: |
set -o errexit
set -o verbose
tar czf ../mongo-c-driver.tar.gz .
- command: s3.put
params:
aws_key: ${aws_key}
aws_secret: ${aws_secret}
local_file: mongo-c-driver.tar.gz
remote_file: mongo-c-driver/${build_variant}/${revision}/artifacts/mongo-${build_id}.tar.gz
bucket: mciuploads
permissions: public-read
content_type: ${content_type|application/x-gzip}
- name: "integration-test-2.4"
depends_on:
- name: "compile"
commands:
- func: "set topology standalone"
- func: "set version 2.4"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-2.4-replica-set"
depends_on:
- name: "compile"
commands:
- func: "set topology replica set"
- func: "set version 2.4"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-2.4-sharded"
depends_on:
- name: "compile"
commands:
- func: "set topology sharded"
- func: "set version 2.4"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-2.6"
depends_on:
- name: "compile"
commands:
- func: "set topology standalone"
- func: "set version 2.6"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-2.6-replica-set"
depends_on:
- name: "compile"
commands:
- func: "set topology replica set"
- func: "set version 2.6"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-2.6-sharded"
depends_on:
- name: "compile"
commands:
- func: "set topology sharded"
- func: "set version 2.6"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-3.0"
depends_on:
- name: "compile"
commands:
- func: "set topology standalone"
- func: "set version 3.0"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-3.0-replica-set"
depends_on:
- name: "compile"
commands:
- func: "set topology replica set"
- func: "set version 3.0"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-3.0-sharded"
depends_on:
- name: "compile"
commands:
- func: "set topology sharded"
- func: "set version 3.0"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-latest"
depends_on:
- name: "compile"
commands:
- func: "set topology standalone"
- func: "set version latest"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-latest-replica-set"
depends_on:
- name: "compile"
commands:
- func: "set topology replica set"
- func: "set version latest"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-latest-sharded"
depends_on:
- name: "compile"
commands:
- func: "set topology sharded"
- func: "set version latest"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
vars:
use_auth: true
- func: "report results"
- name: "integration-test-2.4-no-auth"
depends_on:
- name: "compile"
commands:
- func: "set topology standalone no auth"
- func: "set version 2.4"
- func: "create working directory"
- func: "fetch artifacts"
- func: "fetch mongodb"
- func: "run integration tests"
- func: "report results"