From 3300531083b42fac92820f4b756c9d3d945e7ab4 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 9 Nov 2021 00:49:02 +0100 Subject: [PATCH 1/2] PROJStringFormatter::toString(): avoid invalid iterator increment (fixes #2931) --- src/iso19111/io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index 5f2472a724..f8a4672a09 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -7678,7 +7678,7 @@ const std::string &PROJStringFormatter::toString() const { iterCur = steps.erase(iterPrev, std::next(iterCur)); if (iterCur != steps.begin()) iterCur = std::prev(iterCur); - if (iterCur == steps.begin()) + if (iterCur == steps.begin() && iterCur != steps.end()) ++iterCur; }; From f7e9db583b709b62aabeaf8ae7f8b1f7e1505395 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 9 Nov 2021 00:49:18 +0100 Subject: [PATCH 2/2] CI: add a MSVC Debug build (refs #2931) --- .github/workflows/windows.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4425fccde4..9358aaa61d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,9 +8,15 @@ jobs: runs-on: windows-latest if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + strategy: + fail-fast: false + matrix: + BUILD_TYPE: [Release, Debug] + env: ARCH: x64 BUILD_SHARED_LIBS: ON + BUILD_TYPE: ${{ matrix.BUILD_TYPE }} steps: @@ -42,7 +48,7 @@ jobs: mkdir %PROJ_BUILD% cd %PROJ_BUILD% set PROJ_DIR=%GITHUB_WORKSPACE%\proj_dir - cmake -GNinja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS="{{ env.BUILD_SHARED_LIBS }}" -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX="%PROJ_DIR%" + cmake -GNinja .. -DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" -DBUILD_SHARED_LIBS="${{ env.BUILD_SHARED_LIBS }}" -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX="%PROJ_DIR%" ninja -v ninja install dir %PROJ_DIR%\bin @@ -55,10 +61,10 @@ jobs: set PROJ_DIR=%GITHUB_WORKSPACE%\proj_dir set PROJ_BUILD=%GITHUB_WORKSPACE%\build cd %PROJ_BUILD% - ctest -V -C Release + ctest -V -C "${{ env.BUILD_TYPE }}" set PATH=%PROJ_DIR%\bin;%PATH% - call %GITHUB_WORKSPACE%\test\postinstall\test_cmake.bat %PROJ_DIR% - proj + if "${{ env.BUILD_TYPE }}"=="Release" call %GITHUB_WORKSPACE%\test\postinstall\test_cmake.bat %PROJ_DIR% + if "${{ env.BUILD_TYPE }}"=="Release" proj MSYS2: runs-on: windows-latest