Skip to content

Commit 1f1134b

Browse files
committed
Fixed CI.
1 parent 70bba0b commit 1f1134b

File tree

3 files changed

+38
-14
lines changed

3 files changed

+38
-14
lines changed

.github/depends/boost.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ while getopts "b:t:" c; do
3232
;;
3333
esac
3434
done
35-
wget https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.tar.bz2
36-
tar xf boost_1_78_0.tar.bz2
37-
cd boost_1_78_0
35+
wget https://archives.boost.io/release/1.88.0/source/boost_1_88_0.tar.bz2
36+
tar xf boost_1_88_0.tar.bz2
37+
cd boost_1_88_0
3838
./bootstrap.sh
3939

4040
build()

.github/workflows/gha.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- '-DMQTT_TEST_1=OFF -DMQTT_TEST_2=OFF -DMQTT_TEST_3=OFF -DMQTT_TEST_4=OFF -DMQTT_TEST_5=OFF -DMQTT_TEST_6=OFF -DMQTT_TEST_7=ON -DMQTT_USE_TLS=ON -DMQTT_BUILD_EXAMPLES=OFF -DMQTT_USE_WS=OFF -DMQTT_USE_STR_CHECK=ON -DMQTT_USE_LOG=OFF'
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2626
- name: Install Dependencies
2727
run: |
2828
brew install boost openssl
@@ -50,13 +50,13 @@ jobs:
5050
pattern: [0, 1, 2, 3, 4, 5, 6, 7]
5151
steps:
5252
- name: Checkout
53-
uses: actions/checkout@v2
53+
uses: actions/checkout@v4
5454
- name: Cache boost
5555
id: cache-boost
56-
uses: actions/cache@v1
56+
uses: actions/cache@v4
5757
with:
5858
path: usr
59-
key: ${{ runner.os }}-boost-20220116
59+
key: ${{ runner.os }}-boost-20250721
6060
- name: Build boost
6161
if: steps.cache-boost.outputs.cache-hit != 'true'
6262
run: ./.github/depends/boost.sh -b 64 -t gcc

azure-pipelines.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pr:
1313
- '*'
1414

1515
pool:
16-
vmImage: 'windows-2019'
16+
vmImage: 'windows-2022'
1717

1818
strategy:
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

Comments
 (0)