From 0910e18bbdfe6fac13ad74f0ec4e0d9f22d78fb6 Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Sat, 27 Nov 2021 02:29:26 +0000 Subject: [PATCH 1/4] Use the newer appveyor images to build for VS2017 and VS2019. Trim the number of builds we do. --- appveyor.yml | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 581366d..d7b1e3c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,31 +1,45 @@ version: '{branch}.{build}' -os: Windows Server 2012 R2 + +image: + # VS2015 also used for earlier VS builds + # aka os: Windows Server 2012 R2 + - Visual Studio 2015 + # aka os: Windows Server 2016 + - Visual Studio 2017 + # aka os: Windows Server 2019 + - Visual Studio 2019 platform: x64 -# There should be a better way to set-up a build matrix. -environment: +for: +- matrix: - - b_toolset: Windows7.1SDK - b_config: Debug + only: + - image: Visual Studio 2015 + + environment: + matrix: + - b_toolset: Windows7.1SDK + b_config: Debug - - b_toolset: Windows7.1SDK - b_config: Release + - b_toolset: v120 + b_config: Debug - - b_toolset: v120 - b_config: Debug + - b_toolset: v140 + b_config: Debug - - b_toolset: v120 - b_config: Release + build_script: + - cmake -T %b_toolset% -DCMAKE_BUILD_TYPE=%b_config% -DCMAKE_INSTALL_PREFIX=t_install . + - cmake --build . --target install - - b_toolset: v140 - b_config: Debug +environment: + matrix: + - b_config: Debug - - b_toolset: v140 - b_config: Release + - b_config: Release build_script: -- cmake -T %b_toolset% -DCMAKE_BUILD_TYPE=%b_config% -DCMAKE_INSTALL_PREFIX=t_install . +- cmake -DCMAKE_BUILD_TYPE=%b_config% -DCMAKE_INSTALL_PREFIX=t_install . - cmake --build . --target install after_build: From a5fed59756c844e503aa2b2c8c184df80d086d17 Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Sat, 27 Nov 2021 02:55:29 +0000 Subject: [PATCH 2/4] There doesn't seem to be a way to extend the appveyor build matrix for just one image, so instead list a whole bunch of excluded builds. --- appveyor.yml | 97 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 77 insertions(+), 20 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d7b1e3c..12f7daa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,43 +5,100 @@ image: # aka os: Windows Server 2012 R2 - Visual Studio 2015 # aka os: Windows Server 2016 +# b_toolset: v141 - Visual Studio 2017 # aka os: Windows Server 2019 +# b_toolset: v142 - Visual Studio 2019 +# b_toolset: v143 + - Visual Studio 2022 platform: x64 -for: -- +environment: matrix: - only: - - image: Visual Studio 2015 + - b_toolset: Windows7.1SDK - environment: - matrix: - - b_toolset: Windows7.1SDK - b_config: Debug + - b_toolset: v120 - - b_toolset: v120 - b_config: Debug + - b_toolset: v140 - - b_toolset: v140 - b_config: Debug + - b_toolset: v141 - build_script: - - cmake -T %b_toolset% -DCMAKE_BUILD_TYPE=%b_config% -DCMAKE_INSTALL_PREFIX=t_install . - - cmake --build . --target install + - b_toolset: v142 -environment: - matrix: - - b_config: Debug + - b_toolset: v143 - - b_config: Release +configuration: + - Debug + - Release build_script: -- cmake -DCMAKE_BUILD_TYPE=%b_config% -DCMAKE_INSTALL_PREFIX=t_install . +- cmake -T %b_toolset% -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DCMAKE_INSTALL_PREFIX=t_install . - cmake --build . --target install +matrix: + exclude: + - image: Visual Studio 2015 + b_toolset: v141 + + - image: Visual Studio 2015 + b_toolset: v142 + + - image: Visual Studio 2015 + b_toolset: v143 + + # ---- + + - image: Visual Studio 2017 + b_toolset: Windows7.1SDK + + - image: Visual Studio 2017 + b_toolset: v120 + + - image: Visual Studio 2017 + b_toolset: v140 + + - image: Visual Studio 2017 + b_toolset: v142 + + - image: Visual Studio 2017 + b_toolset: v143 + + # ---- + + - image: Visual Studio 2019 + b_toolset: Windows7.1SDK + + - image: Visual Studio 2019 + b_toolset: v120 + + - image: Visual Studio 2019 + b_toolset: v140 + + - image: Visual Studio 2019 + b_toolset: v141 + + - image: Visual Studio 2019 + b_toolset: v143 + + # ---- + + - image: Visual Studio 2022 + b_toolset: Windows7.1SDK + + - image: Visual Studio 2022 + b_toolset: v120 + + - image: Visual Studio 2022 + b_toolset: v140 + + - image: Visual Studio 2022 + b_toolset: v141 + + - image: Visual Studio 2022 + b_toolset: v142 + after_build: - cd t_install - 7z a ../json-c.win32.%b_toolset%.%b_config%.zip * From 1763edaba3d16d76b6e083eb58dc28488e62c14f Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Mon, 29 Nov 2021 18:18:48 +0000 Subject: [PATCH 3/4] Skip most "Release" builds. s/b_config/CONFIGURATION/ to fix artifact creation. --- appveyor.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 12f7daa..9a5f9c4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -39,6 +39,11 @@ build_script: matrix: exclude: + # Skip release builds for all except the newest image + - image: Visual Studio 2015 + configuration: Release + + # In the "old" image, new toolsets aren't available: - image: Visual Studio 2015 b_toolset: v141 @@ -50,6 +55,12 @@ matrix: # ---- + - image: Visual Studio 2017 + configuration: Release + + # In the "new" images, exclude all toolsets except the relevant + # one for that image: + - image: Visual Studio 2017 b_toolset: Windows7.1SDK @@ -67,6 +78,9 @@ matrix: # ---- + - image: Visual Studio 2019 + configuration: Release + - image: Visual Studio 2019 b_toolset: Windows7.1SDK @@ -101,8 +115,8 @@ matrix: after_build: - cd t_install -- 7z a ../json-c.win32.%b_toolset%.%b_config%.zip * +- 7z a ../json-c.win32.%b_toolset%.%CONFIGURATION%.zip * artifacts: -- path: json-c.win32.%b_toolset%.%b_config%.zip - name: json-c.win32.%b_toolset%.%b_config%.zip +- path: json-c.win32.%b_toolset%.%CONFIGURATION%.zip + name: json-c.win32.%b_toolset%.%CONFIGURATION%.zip From 1cb56e705f83ebedbf3ee4c5b545c3ec7a8a8524 Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Mon, 29 Nov 2021 18:21:05 +0000 Subject: [PATCH 4/4] Put the most recent image first in appveyor builds. --- appveyor.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9a5f9c4..e0349f6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,17 +1,20 @@ version: '{branch}.{build}' image: +# b_toolset: v143 + - Visual Studio 2022 + # VS2015 also used for earlier VS builds # aka os: Windows Server 2012 R2 - Visual Studio 2015 + # aka os: Windows Server 2016 # b_toolset: v141 - Visual Studio 2017 + # aka os: Windows Server 2019 # b_toolset: v142 - Visual Studio 2019 -# b_toolset: v143 - - Visual Studio 2022 platform: x64