Skip to content

Commit 3e6ee9a

Browse files
committed
CDRIVER-2894 use Windows server 2016 variants
1 parent 6f5f7fe commit 3e6ee9a

File tree

9 files changed

+130
-122
lines changed

9 files changed

+130
-122
lines changed

.evergreen/compile-windows.sh

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -96,34 +96,15 @@ case "$CC" in
9696
fi
9797
exit 0
9898
;;
99-
# Resolve the compiler name to correct MSBuild location
100-
"Visual Studio 10 2010")
101-
BUILD="/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe"
102-
;;
103-
"Visual Studio 10 2010 Win64")
104-
BUILD="/cygdrive/c/Windows/Microsoft.NET/Framework64/v4.0.30319/MSBuild.exe"
105-
;;
106-
"Visual Studio 12 2013")
107-
BUILD="/cygdrive/c/Program Files (x86)/MSBuild/12.0/Bin/MSBuild.exe"
108-
;;
109-
"Visual Studio 12 2013 Win64")
110-
BUILD="/cygdrive/c/Program Files (x86)/MSBuild/12.0/Bin/MSBuild.exe"
111-
;;
112-
"Visual Studio 14 2015")
113-
BUILD="/cygdrive/c/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe"
114-
;;
115-
"Visual Studio 14 2015 Win64")
116-
BUILD="/cygdrive/c/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe"
117-
;;
11899
esac
119100

120101
if [ "$RELEASE" ]; then
121-
BUILD_FLAGS="$BUILD_FLAGS /p:Configuration=RelWithDebInfo"
102+
BUILD_CONFIG="RelWithDebInfo"
122103
TEST_PATH="./src/libmongoc/RelWithDebInfo/test-libmongoc.exe"
123104
export PATH=$PATH:`pwd`/src/libbson/RelWithDebInfo:`pwd`/src/libmongoc/RelWithDebInfo:`pwd`/install-dir/bin
124105
else
125106
CONFIGURE_FLAGS="$CONFIGURE_FLAGS"
126-
BUILD_FLAGS="$BUILD_FLAGS /p:Configuration=Debug"
107+
BUILD_CONFIG="Debug"
127108
TEST_PATH="./src/libmongoc/Debug/test-libmongoc.exe"
128109
export PATH=$PATH:`pwd`/src/libbson/Debug:`pwd`/src/libmongoc/Debug:`pwd`/install-dir/bin
129110
fi
@@ -134,13 +115,13 @@ if [ "$COMPILE_LIBMONGOCRYPT" = "ON" ]; then
134115
mkdir libmongocrypt/cmake-build
135116
cd libmongocrypt/cmake-build
136117
"$CMAKE" -G "$CC" "-DCMAKE_PREFIX_PATH=${INSTALL_DIR}/lib/cmake" -DENABLE_SHARED_BSON=ON -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" ../
137-
"$BUILD" $BUILD_FLAGS INSTALL.vcxproj
118+
"$CMAKE" --build . --target INSTALL --config $BUILD_CONFIG -- $BUILD_FLAGS
138119
cd ../../
139120
fi
140121

141122
"$CMAKE" -G "$CC" "-DCMAKE_PREFIX_PATH=${INSTALL_DIR}/lib/cmake" $CONFIGURE_FLAGS
142-
"$BUILD" $BUILD_FLAGS ALL_BUILD.vcxproj
143-
"$BUILD" $BUILD_FLAGS INSTALL.vcxproj
123+
"$CMAKE" --build . --target ALL_BUILD --config $BUILD_CONFIG -- $BUILD_FLAGS
124+
"$CMAKE" --build . --target INSTALL --config $BUILD_CONFIG -- $BUILD_FLAGS
144125

145126
export MONGOC_TEST_FUTURE_TIMEOUT_MS=30000
146127
export MONGOC_TEST_SKIP_LIVE=on

.evergreen/config.yml

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,7 @@ tasks:
17251725
export EXTRA_CONFIGURE_FLAGS="-DENABLE_MONGOC=OFF"
17261726
export SASL="AUTO"
17271727
export SKIP_MOCK_TESTS="ON"
1728-
export SSL="WINSSL"
1728+
export SSL="WINDOWS"
17291729
CC='${CC}' MARCH='${MARCH}' sh .evergreen/compile.sh
17301730
rm CMakeCache.txt
17311731
set -o errexit
@@ -1735,7 +1735,7 @@ tasks:
17351735
export DEBUG="ON"
17361736
export EXTRA_CONFIGURE_FLAGS="-DENABLE_CLIENT_SIDE_ENCRYPTION=ON"
17371737
export SASL="AUTO"
1738-
export SSL="WINSSL"
1738+
export SSL="WINDOWS"
17391739
CC='${CC}' MARCH='${MARCH}' sh .evergreen/compile.sh
17401740
- func: upload build
17411741
- name: debug-compile-asan-openssl-cse
@@ -12368,16 +12368,16 @@ buildvariants:
1236812368
- macos-1014
1236912369
- name: link-with-cmake-windows
1237012370
distros:
12371-
- windows-64-vs2015-compile
12371+
- windows-64-vs2017-compile
1237212372
- name: link-with-cmake-windows-ssl
1237312373
distros:
12374-
- windows-64-vs2015-compile
12374+
- windows-64-vs2017-compile
1237512375
- name: link-with-cmake-windows-snappy
1237612376
distros:
12377-
- windows-64-vs2015-compile
12377+
- windows-64-vs2017-compile
1237812378
- name: link-with-cmake-mingw
1237912379
distros:
12380-
- windows-64-vs2013-compile
12380+
- windows-64-vs2017-compile
1238112381
- name: link-with-pkg-config
1238212382
distros:
1238312383
- ubuntu1604-test
@@ -12388,7 +12388,7 @@ buildvariants:
1238812388
- link-with-bson
1238912389
- name: link-with-bson-windows
1239012390
distros:
12391-
- windows-64-vs2015-compile
12391+
- windows-64-vs2017-compile
1239212392
- name: link-with-bson-mac
1239312393
distros:
1239412394
- macos-1014
@@ -12399,10 +12399,10 @@ buildvariants:
1239912399
- install-uninstall-check
1240012400
- name: install-uninstall-check-mingw
1240112401
distros:
12402-
- windows-64-vs2015-compile
12402+
- windows-64-vs2017-compile
1240312403
- name: install-uninstall-check-msvc
1240412404
distros:
12405-
- windows-64-vs2015-compile
12405+
- windows-64-vs2017-compile
1240612406
- debug-compile-with-warnings
1240712407
- name: clang34ubuntu
1240812408
display_name: clang 3.4 (Ubuntu 14.04)
@@ -12695,13 +12695,43 @@ buildvariants:
1269512695
- test-dns-auth-darwinssl
1269612696
- debug-compile-lto
1269712697
- debug-compile-lto-thin
12698+
- name: windows-2017-32
12699+
display_name: Windows (i386) (VS 2017)
12700+
expansions:
12701+
CC: Visual Studio 15 2017
12702+
run_on: windows-64-vs2017-compile
12703+
tasks:
12704+
- .debug-compile .winssl
12705+
- .debug-compile !.sspi .nossl
12706+
- .debug-compile .sspi !.openssl
12707+
- .server .winssl .latest
12708+
- .latest .nossl
12709+
- .nosasl .latest .nossl
12710+
- .sspi .latest
12711+
- name: windows-2017
12712+
display_name: Windows (VS 2017)
12713+
expansions:
12714+
CC: Visual Studio 15 2017 Win64
12715+
run_on: windows-64-vs2017-compile
12716+
tasks:
12717+
- .debug-compile .winssl
12718+
- .debug-compile !.sspi .openssl
12719+
- .debug-compile !.sspi .nossl
12720+
- .debug-compile .sspi
12721+
- .server .winssl .latest
12722+
- .server .openssl .latest !.nosasl
12723+
- .latest .nossl
12724+
- .nosasl .latest .nossl
12725+
- .sspi .latest
12726+
- test-dns-winssl
12727+
- test-dns-auth-winssl
1269812728
- name: windows-2015
1269912729
display_name: Windows (VS 2015)
1270012730
expansions:
1270112731
CC: Visual Studio 14 2015 Win64
1270212732
run_on: windows-64-vs2015-compile
1270312733
tasks:
12704-
- .compression !.snappy !.zstd
12734+
- .compression !.snappy !.zstd !.latest
1270512735
- release-compile
1270612736
- debug-compile-nosasl-nossl
1270712737
- debug-compile-no-align
@@ -12712,34 +12742,26 @@ buildvariants:
1271212742
- .debug-compile .sspi
1271312743
- .authentication-tests .openssl !.sasl
1271412744
- .authentication-tests .winssl
12715-
- .latest .winssl !.nosasl .server
12716-
- .latest .openssl !.nosasl .server
12717-
- .latest .nossl
1271812745
- .4.2 .winssl !.nosasl .server
1271912746
- .4.0 .winssl !.nosasl .server
1272012747
- .3.6 .winssl !.nosasl .server
1272112748
- .3.4 .winssl !.nosasl .server
1272212749
- .3.2 .winssl !.nosasl .server
1272312750
- .3.0 .nossl
12724-
- test-dns-winssl
12725-
- test-dns-auth-winssl
1272612751
- name: windows-2015-32
1272712752
display_name: Windows (i386) (VS 2015)
1272812753
expansions:
1272912754
CC: Visual Studio 14 2015
1273012755
run_on: windows-64-vs2015-compile
1273112756
tasks:
12732-
- .compression !.snappy !.zstd
12757+
- .compression !.snappy !.zstd !.latest
1273312758
- release-compile
1273412759
- debug-compile-nosasl-nossl
1273512760
- debug-compile-no-align
1273612761
- .debug-compile .sspi !.openssl
1273712762
- .debug-compile .winssl .nosasl
1273812763
- .debug-compile !.sspi .nossl .nosasl
1273912764
- .authentication-tests .winssl
12740-
- .latest .winssl .nosasl .server
12741-
- .latest .nossl .nosasl
12742-
- .latest .sspi
1274312765
- .4.2 .winssl .nosasl .server
1274412766
- .4.0 .winssl .nosasl .server
1274512767
- name: windows-2013
@@ -12748,7 +12770,7 @@ buildvariants:
1274812770
CC: Visual Studio 12 2013 Win64
1274912771
run_on: windows-64-vs2013-compile
1275012772
tasks:
12751-
- .compression !.snappy !.zstd
12773+
- .compression !.snappy !.zstd !.latest
1275212774
- release-compile
1275312775
- debug-compile-nosasl-nossl
1275412776
- .debug-compile .winssl !.client-side-encryption
@@ -12757,10 +12779,6 @@ buildvariants:
1275712779
- .debug-compile .sspi !.client-side-encryption
1275812780
- .authentication-tests .openssl !.sasl
1275912781
- .authentication-tests .winssl
12760-
- .latest .winssl !.nosasl .server !.client-side-encryption
12761-
- .latest .openssl !.nosasl .server !.client-side-encryption
12762-
- .latest .nossl
12763-
- .latest .sspi
1276412782
- .4.2 .winssl !.nosasl .server !.client-side-encryption
1276512783
- .4.0 .winssl !.nosasl .server
1276612784
- name: windows-2013-32
@@ -12776,9 +12794,6 @@ buildvariants:
1277612794
- .debug-compile .winssl .nosasl !.client-side-encryption
1277712795
- .debug-compile !.sspi .nossl .nosasl
1277812796
- .authentication-tests .winssl
12779-
- .latest .winssl .nosasl .server !.client-side-encryption
12780-
- .latest .nossl .nosasl
12781-
- .latest .sspi
1278212797
- .4.2 .winssl .nosasl .server !.client-side-encryption
1278312798
- .4.0 .winssl .nosasl .server
1278412799
- name: windows-2010
@@ -12787,7 +12802,7 @@ buildvariants:
1278712802
CC: Visual Studio 10 2010 Win64
1278812803
run_on: windows-64-vs2010-compile
1278912804
tasks:
12790-
- .compression !.snappy !.zstd
12805+
- .compression !.snappy !.zstd !.latest
1279112806
- release-compile
1279212807
- debug-compile-nosasl-nossl
1279312808
- debug-compile-rdtscp
@@ -12797,10 +12812,6 @@ buildvariants:
1279712812
- .debug-compile .sspi
1279812813
- .authentication-tests .openssl !.sasl
1279912814
- .authentication-tests .winssl
12800-
- .latest .winssl !.nosasl .server !.client-side-encryption
12801-
- .latest .openssl !.nosasl .server !.client-side-encryption
12802-
- .latest .nossl
12803-
- .latest .sspi
1280412815
- .4.2 .winssl !.nosasl .server !.client-side-encryption
1280512816
- .4.0 .winssl !.nosasl .server
1280612817
- name: windows-2010-32
@@ -12816,11 +12827,18 @@ buildvariants:
1281612827
- .debug-compile !.sspi .nossl .nosasl !.client-side-encryption
1281712828
- .debug-compile .nossl .sspi
1281812829
- .authentication-tests .winssl
12819-
- .latest .winssl .nosasl .server !.client-side-encryption
12820-
- .latest .nossl .nosasl
12821-
- .latest .sspi
1282212830
- .4.2 .winssl .nosasl .server
1282312831
- .4.0 .winssl .nosasl .server
12832+
- name: mingw-windows2016
12833+
display_name: MinGW-W64 (Windows Server 2016)
12834+
expansions:
12835+
CC: mingw
12836+
run_on: windows-64-vs2017-compile
12837+
tasks:
12838+
- debug-compile-nosasl-nossl
12839+
- .debug-compile .winssl .sspi
12840+
- .latest .nossl .nosasl .server
12841+
- .latest .winssl .sspi .server
1282412842
- name: mingw
1282512843
display_name: MinGW-W64
1282612844
expansions:
@@ -12831,8 +12849,6 @@ buildvariants:
1283112849
- debug-compile-no-align
1283212850
- .debug-compile .nossl .nosasl
1283312851
- .debug-compile .winssl .sspi
12834-
- .latest .nossl .nosasl .server
12835-
- .latest .winssl .sspi .server
1283612852
- name: power8-rhel71
1283712853
display_name: '*Power8 (ppc64le) (RHEL 7.1)'
1283812854
expansions:

.evergreen/link-sample-program-msvc-bson.cmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ set INSTALL_DIR=%CD%\install-dir
1919
rmdir /S /Q %INSTALL_DIR%
2020
mkdir %INSTALL_DIR%
2121

22-
set PATH=%PATH%;"c:\Program Files (x86)\MSBuild\14.0\Bin"
23-
set PATH=%PATH%;"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin"
2422
set PATH=%PATH%;%INSTALL_DIR%\bin
23+
rem Set path to dumpbin.exe and other VS tools.
24+
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
2525

2626
cd %BUILD_DIR%
2727
%TAR% xf ..\..\mongoc.tar.gz -C . --strip-components=1
2828

2929
if "%LINK_STATIC%"=="1" (
30-
%CMAKE% -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_TESTS=OFF -DENABLE_BSON=ON .
30+
%CMAKE% -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_TESTS=OFF -DENABLE_BSON=ON .
3131
) else (
32-
%CMAKE% -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_TESTS=OFF -DENABLE_BSON=ON -DENABLE_STATIC=OFF .
32+
%CMAKE% -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_TESTS=OFF -DENABLE_BSON=ON -DENABLE_STATIC=OFF .
3333
)
3434

35-
msbuild.exe /m ALL_BUILD.vcxproj
36-
msbuild.exe INSTALL.vcxproj
35+
%CMAKE% --build . --target ALL_BUILD --config "Debug" -- /m
36+
%CMAKE% --build . --target INSTALL --config "Debug" -- /m
3737

3838
call ..\.evergreen\check-installed-files-bson.bat
3939
if errorlevel 1 (
@@ -48,8 +48,8 @@ if "%LINK_STATIC%"=="1" (
4848
)
4949

5050
cd %EXAMPLE_DIR%
51-
%CMAKE% -G "Visual Studio 14 2015 Win64" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake .
52-
msbuild.exe ALL_BUILD.vcxproj
51+
%CMAKE% -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake .
52+
%CMAKE% --build . --target ALL_BUILD --config "Debug" -- /m
5353

5454
rem Yes, they should've named it "dependencies".
5555
dumpbin.exe /dependents Debug\hello_bson.exe

.evergreen/link-sample-program-msvc.cmd

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ set INSTALL_DIR=%CD%\install-dir
2121
rmdir /S /Q %INSTALL_DIR%
2222
mkdir %INSTALL_DIR%
2323

24-
set PATH=%PATH%;"c:\Program Files (x86)\MSBuild\14.0\Bin"
25-
set PATH=%PATH%;"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin"
2624
set PATH=%PATH%;%INSTALL_DIR%\bin
2725

26+
rem Set path to dumpbin.exe and other VS tools.
27+
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
28+
2829
cd %BUILD_DIR%
2930
%TAR% xf ..\..\mongoc.tar.gz -C . --strip-components=1
3031

@@ -33,9 +34,9 @@ if "%ENABLE_SNAPPY%"=="1" (
3334
curl -sS --retry 5 -LO https://github.com/google/snappy/archive/1.1.7.tar.gz
3435
%TAR% xzf 1.1.7.tar.gz
3536
cd snappy-1.1.7
36-
%CMAKE% -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% .
37-
msbuild.exe /m ALL_BUILD.vcxproj
38-
msbuild.exe INSTALL.vcxproj
37+
%CMAKE% -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% .
38+
%CMAKE% --build . --target ALL_BUILD --config "Debug" -- /m
39+
%CMAKE% --build . --target INSTALL --config "Debug" -- /m
3940
set SNAPPY_OPTION=-DENABLE_SNAPPY=ON
4041
) else (
4142
set SNAPPY_OPTION=-DENABLE_SNAPPY=OFF
@@ -44,13 +45,13 @@ if "%ENABLE_SNAPPY%"=="1" (
4445
cd %BUILD_DIR%
4546
rem Build libmongoc
4647
if "%ENABLE_SSL%"=="1" (
47-
%CMAKE% -G "Visual Studio 14 2015 Win64" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_BSON=ON -DENABLE_SSL=WINDOWS %ENABLE_SNAPPY_OPTION% .
48+
%CMAKE% -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_BSON=ON -DENABLE_SSL=WINDOWS %ENABLE_SNAPPY_OPTION% .
4849
) else (
49-
%CMAKE% -G "Visual Studio 14 2015 Win64" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_BSON=ON -DENABLE_SSL=OFF %ENABLE_SNAPPY_OPTION% .
50+
%CMAKE% -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_BSON=ON -DENABLE_SSL=OFF %ENABLE_SNAPPY_OPTION% .
5051
)
5152

52-
msbuild.exe /m ALL_BUILD.vcxproj
53-
msbuild.exe INSTALL.vcxproj
53+
%CMAKE% --build . --target ALL_BUILD --config "Debug" -- /m
54+
%CMAKE% --build . --target INSTALL --config "Debug" -- /m
5455

5556
call ..\.evergreen\check-installed-files.bat
5657
if errorlevel 1 (
@@ -90,8 +91,8 @@ if "%ENABLE_SSL%"=="1" (
9091
set MONGODB_EXAMPLE_URI="mongodb://localhost/?ssl=true&sslclientcertificatekeyfile=client.pem&sslcertificateauthorityfile=ca.pem&sslallowinvalidhostnames=true"
9192
)
9293

93-
%CMAKE% -G "Visual Studio 14 2015 Win64" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake .
94-
msbuild.exe ALL_BUILD.vcxproj
94+
%CMAKE% -G "Visual Studio 15 2017 Win64" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake .
95+
%CMAKE% --build . --target ALL_BUILD --config "Debug" -- /m
9596

9697
rem Yes, they should've named it "dependencies".
9798
dumpbin.exe /dependents Debug\hello_mongoc.exe

build/evergreen_config_lib/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def __init__(self, task_name, extra_commands, orchestration=True, **kwargs):
405405
CompileWithClientSideEncryption('debug-compile-sasl-darwinssl-cse', tags=[
406406
'debug-compile', 'sasl', 'darwinssl'], SASL="AUTO", SSL="DARWIN"),
407407
CompileWithClientSideEncryption('debug-compile-sasl-winssl-cse', tags=[
408-
'debug-compile', 'sasl', 'winssl'], SASL="AUTO", SSL="WINSSL"),
408+
'debug-compile', 'sasl', 'winssl'], SASL="AUTO", SSL="WINDOWS"),
409409
CompileWithClientSideEncryptionAsan('debug-compile-asan-openssl-cse', tags=[
410410
'debug-compile', 'asan-clang'], SSL="OPENSSL")
411411
]

0 commit comments

Comments
 (0)