1313 - ' *'
1414
1515pool :
16- vmImage : ' windows-2019 '
16+ vmImage : ' windows-2022 '
1717
1818strategy :
1919 matrix :
@@ -132,11 +132,35 @@ steps:
132132 displayName : ' install openssl'
133133
134134- powershell : |
135+ choco install --confirm --limitoutput --no-progress openssl --version=3.1.1
136+ choco install --confirm --limitoutput --no-progress 7zip
137+ displayName : ' Install dependencies'
138+
139+ - powershell : |
140+ $boostVersion = "1.88.0"
141+ $boostDirName = "boost_1_88_0"
142+ $boostArchive = "$env:TEMP\$boostDirName.7z"
143+ $boostUrl = "https://archives.boost.io/release/$boostVersion/source/$boostDirName.7z"
144+ $installPrefix = "C:\hostedtoolcache\windows\boost-src"
145+
146+ Write-Host "Downloading boost via curl..."
147+ curl.exe -L -o $boostArchive $boostUrl
148+
149+ Write-Host "Extracting boost..."
150+ & 7z x $boostArchive "-o$env:TEMP\$boostDirName" -y
135151
136- $Url = "https://sourceforge.net/projects/boost/files/boost-binaries/1.78.0/boost_1_78_0-msvc-14.2-64.exe"
137- (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
138- Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\hostedtoolcache\windows\Boost\1.78.0\x86_64"
139- displayName : ' install boost'
152+ cd "$env:TEMP\$boostDirName"
153+ .\bootstrap.bat
154+ .\b2 toolset=msvc link=static,shared install `
155+ -j2 `
156+ --prefix=$installPrefix `
157+ --with-container `
158+ --with-filesystem `
159+ --with-log `
160+ --with-program_options `
161+ --with-system `
162+ --with-test
163+ displayName : ' Build boost from source with curl'
140164
141165- powershell : |
142166 git submodule update --init --recursive
@@ -146,10 +170,10 @@ steps:
146170 mkdir build
147171 cd build
148172 $env:CL="/D_WIN32_WINNT#0x0601 /DBOOST_THREAD_VERSION#3 /DBOOST_ALLOW_DEPRECATED_HEADERS /DBOOST_ASIO_NO_DEPRECATED"
149- $env:BOOST_ROOT="C:\hostedtoolcache\windows\Boost\1.78 .0\x86_64"
173+ $env:BOOST_ROOT="C:\hostedtoolcache\windows\Boost\1.88 .0\x86_64"
150174 $env:PATH="$env:BOOST_ROOT\lib64-msvc-14.2;"+$env:PATH
151175
152- cmake -A x64 -DMQTT_USE_TLS=$(MQTT_USE_TLS) -DMQTT_USE_WS=$(MQTT_USE_WS) -DMQTT_USE_STR_CHECK=$(MQTT_USE_STR_CHECK) -DMQTT_TEST_1=$(MQTT_TEST_1) -DMQTT_TEST_2=$(MQTT_TEST_2) -DMQTT_TEST_3=$(MQTT_TEST_3) -DMQTT_TEST_4=$(MQTT_TEST_4) -DMQTT_TEST_5=$(MQTT_TEST_5) -DMQTT_TEST_6=$(MQTT_TEST_6) -DMQTT_TEST_7=$(MQTT_TEST_7) -DMQTT_BUILD_EXAMPLES=$(MQTT_BUILD_EXAMPLES) ..
176+ cmake -A x64 -G "Visual Studio 17 2022" - DMQTT_USE_TLS=$(MQTT_USE_TLS) -DMQTT_USE_WS=$(MQTT_USE_WS) -DMQTT_USE_STR_CHECK=$(MQTT_USE_STR_CHECK) -DMQTT_TEST_1=$(MQTT_TEST_1) -DMQTT_TEST_2=$(MQTT_TEST_2) -DMQTT_TEST_3=$(MQTT_TEST_3) -DMQTT_TEST_4=$(MQTT_TEST_4) -DMQTT_TEST_5=$(MQTT_TEST_5) -DMQTT_TEST_6=$(MQTT_TEST_6) -DMQTT_TEST_7=$(MQTT_TEST_7) -DMQTT_BUILD_EXAMPLES=$(MQTT_BUILD_EXAMPLES) ..
153177 if (!$?) {
154178 return Write-Error "cmake failed"
155179 }
0 commit comments