From 940b2bf6169a93956b2edbe9d05fbf61d758e28d Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Tue, 14 Jan 2025 21:50:15 +0300 Subject: [PATCH] Restore Appveyor CI tests (#16) --- .appveyor.yml | 29 +++++++++++------------ Chapter05/06_thread_specific_ptr/main.cpp | 2 ++ Chapter12/07_gil/07_gil.pro | 6 ++++- test.py | 2 +- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 90483327..44f07b24 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -17,7 +17,7 @@ init: # From this point and below code is same for all the Boost libs ############################################################################################################### -version: 1.70.{build}-{branch} +version: 1.87.{build}-{branch} # branches to build branches: @@ -26,14 +26,16 @@ branches: environment: matrix: - - TOOLSET_PATH: C:\Qt\5.10\mingw53_32\bin;C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin - BOOST_FLAGS: toolset=gcc --layout=system variant=release address-model=32 - BUILD_COMMAND: mingw32-make -j2 - - - TOOLSET_PATH: C:\Qt\5.10\msvc2015_64\bin - BOOST_FLAGS: toolset=msvc #address-model=64 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + TOOLSET_PATH: C:\Qt\6.8\msvc2022_64\bin + BOOST_FLAGS: toolset=msvc address-model=64 BUILD_COMMAND: nmake /NOLOGO + #- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + # TOOLSET_PATH: C:\Qt\6.8\mingw_64\bin + # BOOST_FLAGS: toolset=gcc --layout=system variant=release address-model=64 + # BUILD_COMMAND: mingw32-make -j2 + skip_tags: true before_build: @@ -51,15 +53,12 @@ before_build: - git remote set-branches --add origin %BRANCH_TO_TEST% #- git pull --recurse-submodules # Updaes submodules to most recent version. Not required - -build_script: - - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 + - call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" # Packages from nuget. - - nuget install libpng -ExcludeVersion -NonInteractive - - dir zlib.v140.windesktop.msvcstl.dyn.rt-dyn - - dir zlib.v140.windesktop.msvcstl.dyn.rt-dyn\build - - dir zlib.v140.windesktop.msvcstl.dyn.rt-dyn\build\native - - dir zlib.v140.windesktop.msvcstl.dyn.rt-dyn\build\native\include + - nuget install libpng-v142 -ExcludeVersion -NonInteractive + - nuget install zlib_static -ExcludeVersion -NonInteractive + +build_script: # Building Boost. - bootstrap.bat - b2.exe headers diff --git a/Chapter05/06_thread_specific_ptr/main.cpp b/Chapter05/06_thread_specific_ptr/main.cpp index 101d284f..934aec67 100644 --- a/Chapter05/06_thread_specific_ptr/main.cpp +++ b/Chapter05/06_thread_specific_ptr/main.cpp @@ -19,6 +19,8 @@ connection& get_connection(); // In source file: #include #include +#include + boost::thread_specific_ptr connection_ptr; connection& get_connection() { diff --git a/Chapter12/07_gil/07_gil.pro b/Chapter12/07_gil/07_gil.pro index b7364076..45ed0cf3 100644 --- a/Chapter12/07_gil/07_gil.pro +++ b/Chapter12/07_gil/07_gil.pro @@ -6,13 +6,17 @@ SOURCES += main.cpp QMAKE_CXXFLAGS += $$CPP14FLAG -# Those paths are used by CI scripts of the book. You shall not find those libraries by that path in default Boost archive. +# Those paths are used by CI scripts of the book. You may not find those libraries by that path in default Boost archive. # Just install libpng into your system and add correct include paths to the build script. INCLUDEPATH += $$BOOST_PATH/libpng/build/native/include +INCLUDEPATH += $$BOOST_PATH/libpng-v142/build/native/include INCLUDEPATH += $$BOOST_PATH/zlib/build/native/include INCLUDEPATH += $$BOOST_PATH/zlib.v140.windesktop.msvcstl.dyn.rt-dyn/build/native/include +INCLUDEPATH += $$BOOST_PATH/zlib_static/build/native/include msvc { QMAKE_LFLAGS += /LIBPATH:$$BOOST_PATH/libpng/build/native/lib/x64/v140/dynamic/Release/ + QMAKE_LFLAGS += /LIBPATH:$$BOOST_PATH/libpng-v142/build/native/lib/x64/v142/Release/ + QMAKE_LFLAGS += /LIBPATH:$$BOOST_PATH/zlib_static/build/native/lib/Win32/v142/Release/MultiThreaded LIBS += -llibpng16 } else { unix { diff --git a/test.py b/test.py index 9552dec1..df26e898 100644 --- a/test.py +++ b/test.py @@ -102,7 +102,7 @@ def safe_wait(task, timeout = 15.0): task.kill() print('!!! Test timeout !!!') a, b = task.communicate() - return '!!! Test timeout !!!:' + a, '!!! Test timeout !!!:' + b + return '!!! Test timeout !!!:' + a.decode("utf-8"), '!!! Test timeout !!!:' + b.decode("utf-8") return task.communicate() @staticmethod