From 58d1b33de7dbcb7e12c44a6d6b0bd83a5b449ab7 Mon Sep 17 00:00:00 2001 From: ihsan Date: Fri, 24 Oct 2025 18:36:59 +0300 Subject: [PATCH 1/7] Put the test header after the boost includes. Solves windows build problem with SSL=OFF. --- .github/workflows/build-pr.yml | 1 - hazelcast/test/src/ClientTest.cpp | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 01eda4dff..34ed82b8f 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -216,7 +216,6 @@ jobs: token: ${{ secrets.GH_TOKEN }} - uses: ./.github/actions/build-test/windows - if: ${{ matrix.with_openssl.toggle == 'ON' }} with: GH_TOKEN: ${{ secrets.GH_TOKEN }} BOOST_VERSION: ${{ env.boost_version }} diff --git a/hazelcast/test/src/ClientTest.cpp b/hazelcast/test/src/ClientTest.cpp index 550658486..f3783363f 100644 --- a/hazelcast/test/src/ClientTest.cpp +++ b/hazelcast/test/src/ClientTest.cpp @@ -13,9 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -#include "ClientTest.h" - #include #include @@ -29,6 +26,8 @@ #include "remote_controller_client.h" #include "TestHelperFunctions.h" +#include "ClientTest.h" + namespace hazelcast { namespace client { namespace test { From 453aac6b46fbca4b7773bca8dafa2c66eddbd5cc Mon Sep 17 00:00:00 2001 From: ihsan Date: Fri, 24 Oct 2025 18:42:28 +0300 Subject: [PATCH 2/7] Fix --- .github/actions/build-test/windows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-test/windows/action.yml b/.github/actions/build-test/windows/action.yml index 1acf23cce..2ef4ea952 100644 --- a/.github/actions/build-test/windows/action.yml +++ b/.github/actions/build-test/windows/action.yml @@ -95,7 +95,7 @@ runs: # - Thread - https://www.boost.org/libs/thread/ # - Chrono - https://www.boost.org/libs/chrono/ # - Atomic - https://www.boost.org/libs/atomic/ - .\b2 address-model=${{ inputs.ARCH_ADDRESS_MODEL }} --with-thread --with-chrono --with-atomic install + .\b2.exe address-model=${{ inputs.ARCH_ADDRESS_MODEL }} --with-thread --with-chrono --with-atomic install cd .. Remove-Item ${{ inputs.BOOST_FOLDER_NAME }} -Recurse -Force From 41e32b58dba73975649a07e37234a83b84b85d9b Mon Sep 17 00:00:00 2001 From: ihsan Date: Sat, 25 Oct 2025 00:09:31 +0300 Subject: [PATCH 3/7] Fix for building the boost. --- .github/actions/build-test/windows/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-test/windows/action.yml b/.github/actions/build-test/windows/action.yml index 2ef4ea952..9a8f01ff4 100644 --- a/.github/actions/build-test/windows/action.yml +++ b/.github/actions/build-test/windows/action.yml @@ -90,12 +90,13 @@ runs: tar xzf ${{ inputs.BOOST_ARCHIVE_NAME }} rm ${{ inputs.BOOST_ARCHIVE_NAME }} cd ${{ inputs.BOOST_FOLDER_NAME }} - .\bootstrap.bat + cmd /c "`"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat`" x64 && .\bootstrap.bat msvc" # Build the libs for: # - Thread - https://www.boost.org/libs/thread/ # - Chrono - https://www.boost.org/libs/chrono/ # - Atomic - https://www.boost.org/libs/atomic/ - .\b2.exe address-model=${{ inputs.ARCH_ADDRESS_MODEL }} --with-thread --with-chrono --with-atomic install + cmd /c "`"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat`" x64 && .\b2 address-model=${{ inputs.ARCH_ADDRESS_MODEL }} --with-thread --with-chrono --with-atomic install" + .\b2 address-model=${{ inputs.ARCH_ADDRESS_MODEL }} --with-thread --with-chrono --with-atomic install cd .. Remove-Item ${{ inputs.BOOST_FOLDER_NAME }} -Recurse -Force From 0a304fe0fb9938c394bc1f2ffb4edac5cd44ec2a Mon Sep 17 00:00:00 2001 From: ihsan Date: Sat, 25 Oct 2025 00:22:29 +0300 Subject: [PATCH 4/7] Properly set vcvarsall.bet environment. --- .github/actions/build-test/windows/action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/build-test/windows/action.yml b/.github/actions/build-test/windows/action.yml index 9a8f01ff4..5afc88f0f 100644 --- a/.github/actions/build-test/windows/action.yml +++ b/.github/actions/build-test/windows/action.yml @@ -90,13 +90,15 @@ runs: tar xzf ${{ inputs.BOOST_ARCHIVE_NAME }} rm ${{ inputs.BOOST_ARCHIVE_NAME }} cd ${{ inputs.BOOST_FOLDER_NAME }} - cmd /c "`"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat`" x64 && .\bootstrap.bat msvc" + $vcvars = Get-ChildItem "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" -ErrorAction SilentlyContinue + if (-not $vcvars) { $vcvars = Get-ChildItem "C:\Program Files\Microsoft Visual Studio" -Recurse -Filter "vcvarsall.bat" | Select-Object -First 1 } + cmd /c "`"$($vcvars.FullName)`" x64 > nul 2>&1 && set" | ForEach-Object { if ($_ -match "^(.*?)=(.*)$") { [Environment]::SetEnvironmentVariable($matches[1], $matches[2]) } } + .\bootstrap.bat msvc # Build the libs for: # - Thread - https://www.boost.org/libs/thread/ # - Chrono - https://www.boost.org/libs/chrono/ # - Atomic - https://www.boost.org/libs/atomic/ - cmd /c "`"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat`" x64 && .\b2 address-model=${{ inputs.ARCH_ADDRESS_MODEL }} --with-thread --with-chrono --with-atomic install" - .\b2 address-model=${{ inputs.ARCH_ADDRESS_MODEL }} --with-thread --with-chrono --with-atomic install + .\b2 address-model=${{ inputs.ARCH_ADDRESS_MODEL }} --with-thread --with-chrono --with-atomic install cd .. Remove-Item ${{ inputs.BOOST_FOLDER_NAME }} -Recurse -Force From f8bfa0d2bf671d8ead2b9954931976f179a55ff9 Mon Sep 17 00:00:00 2001 From: ihsan Date: Sat, 25 Oct 2025 01:13:26 +0300 Subject: [PATCH 5/7] Added the explicit toolset for windows boost build for old boost versions such as boost 1.73.0 since otherwise it tries to build for mcvc-6.0 and fails. E.g.: ``` ...skipped chrono.obj for lack of msvc-setup.nup... ``` --- .github/actions/build-test/windows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build-test/windows/action.yml b/.github/actions/build-test/windows/action.yml index 5afc88f0f..4f2e71794 100644 --- a/.github/actions/build-test/windows/action.yml +++ b/.github/actions/build-test/windows/action.yml @@ -98,7 +98,7 @@ runs: # - Thread - https://www.boost.org/libs/thread/ # - Chrono - https://www.boost.org/libs/chrono/ # - Atomic - https://www.boost.org/libs/atomic/ - .\b2 address-model=${{ inputs.ARCH_ADDRESS_MODEL }} --with-thread --with-chrono --with-atomic install + .\b2 address-model=${{ inputs.ARCH_ADDRESS_MODEL }} toolset=msvc --with-thread --with-chrono --with-atomic install cd .. Remove-Item ${{ inputs.BOOST_FOLDER_NAME }} -Recurse -Force From b74f582a9154d1e4257ab7080c7019bb164f35b4 Mon Sep 17 00:00:00 2001 From: ihsan demir Date: Sun, 26 Oct 2025 00:19:12 +0300 Subject: [PATCH 6/7] changed Windows nightly to use boost 1.80.0 as minimum boost version --- .github/workflows/nightly-windows.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nightly-windows.yml b/.github/workflows/nightly-windows.yml index 7fc4e5c80..1bff4cb5e 100644 --- a/.github/workflows/nightly-windows.yml +++ b/.github/workflows/nightly-windows.yml @@ -20,12 +20,12 @@ jobs: fail-fast: false matrix: vc_boost: - - name: msvc-latest_boost_1730 + - name: msvc-latest_boost_1800 image: 'windows-latest' - boost_url: 'https://archives.boost.io/release/1.73.0/source/boost_1_73_0.tar.gz' - boost_archive_name: 'boost_1_73_0.tar.gz' - boost_folder_name: 'boost_1_73_0' - boost_include_folder: 'C:\Boost\include\boost-1_73' + boost_url: 'https://archives.boost.io/release/1.80.0/source/boost_1_80_0.tar.gz' + boost_archive_name: 'boost_1_80_0.tar.gz' + boost_folder_name: 'boost_1_80_0' + boost_include_folder: 'C:\Boost\include\boost-1_80' - name: msvc-latest_boost_1890 image: 'windows-latest' boost_url: 'https://archives.boost.io/release/1.89.0/source/boost_1_89_0.tar.gz' From 09147fc8178bc2a5ddb8fde47248aac43ae0caf7 Mon Sep 17 00:00:00 2001 From: ihsan Date: Mon, 27 Oct 2025 11:04:12 +0300 Subject: [PATCH 7/7] Removed the unneeded status message as it is duplicate to the below messages. --- CMakeLists.txt | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c13d38de..f1dd75fae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -267,8 +267,6 @@ install( if (BUILD_TESTS) add_subdirectory(hazelcast/test) -else() - message(STATUS "BUILD_TESTS is disabled.") endif() if (BUILD_EXAMPLES) @@ -279,12 +277,12 @@ message(STATUS "Configuration summary:") if (NOT is_multi_config) message(STATUS " CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") endif() -message(STATUS " BUILD_SHARED_LIBS = ${BUILD_SHARED_LIBS}") -message(STATUS " WITH_OPENSSL = ${WITH_OPENSSL}") -message(STATUS " DISABLE_LOGGING = ${DISABLE_LOGGING}") -message(STATUS " CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}") -message(STATUS " BUILD_TESTS = ${BUILD_TESTS}") -message(STATUS " BUILD_EXAMPLES = ${BUILD_EXAMPLES}") -message(STATUS " CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}") -message(STATUS " CMAKE_CXX_FLAGS_DEBUG = ${CMAKE_CXX_FLAGS_DEBUG}") -message(STATUS " CMAKE_CXX_FLAGS_RELEASE = ${CMAKE_CXX_FLAGS_RELEASE}") +message(STATUS " BUILD_SHARED_LIBS = ${BUILD_SHARED_LIBS}") +message(STATUS " WITH_OPENSSL = ${WITH_OPENSSL}") +message(STATUS " DISABLE_LOGGING = ${DISABLE_LOGGING}") +message(STATUS " CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}") +message(STATUS " BUILD_TESTS = ${BUILD_TESTS}") +message(STATUS " BUILD_EXAMPLES = ${BUILD_EXAMPLES}") +message(STATUS " CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}") +message(STATUS " CMAKE_CXX_FLAGS_DEBUG = ${CMAKE_CXX_FLAGS_DEBUG}") +message(STATUS " CMAKE_CXX_FLAGS_RELEASE = ${CMAKE_CXX_FLAGS_RELEASE}")