diff --git a/.github/workflows/build_windows_cpp.yml b/.github/workflows/build_windows_cpp.yml index eb67bff02..bdb2dc39a 100644 --- a/.github/workflows/build_windows_cpp.yml +++ b/.github/workflows/build_windows_cpp.yml @@ -9,8 +9,8 @@ jobs: fail-fast: false matrix: include: - - { os: "windows-2022", msvc-toolset: "v141", cxx-standard: "11", build-type: "Release" } - - { os: "windows-2022", msvc-toolset: "v141", cxx-standard: "11", build-type: "Debug" } + - { os: "windows-2019", msvc-toolset: "v141", cxx-standard: "11", build-type: "Release" } + - { os: "windows-2019", msvc-toolset: "v141", cxx-standard: "11", build-type: "Debug" } - { os: "windows-2022", mingw-version: "7.5.0", cxx-standard: "11", build-type: "Release" } - { os: "windows-2022", mingw-version: "7.5.0", cxx-standard: "11", build-type: "Debug" } @@ -41,7 +41,15 @@ jobs: if [[ "${{matrix.msvc-toolset}}" != "" ]] ; then echo "MSVC_CMAKE_TOOLSET=${{matrix.msvc-toolset}}" >> ${GITHUB_ENV} echo "PACKAGE=windows64-msvc" >> ${GITHUB_ENV} - elif [[ "${{matrix.mingw-version}}" != "" ]] ; then + # v141 toolset is not installed in windows-2022/VS2022 image by default + if [[ "${{matrix.msvc-toolset}}" == "v141" ]] ; then + echo "MSVC_CMAKE_GENERATOR=Visual Studio 16 2019" >> ${GITHUB_ENV} + else + echo "MSVC_CMAKE_GENERATOR=Visual Studio 17 2022" >> ${GITHUB_ENV} + fi + fi + + if [[ "${{matrix.mingw-version}}" != "" ]] ; then echo "MINGW64_TOOLCHAIN_ROOT=/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64" >> ${GITHUB_ENV} echo "PACKAGE=windows64-mingw" >> ${GITHUB_ENV} fi diff --git a/.github/workflows/build_windows_python.yml b/.github/workflows/build_windows_python.yml index 2c6917fb7..b76c7cb47 100644 --- a/.github/workflows/build_windows_python.yml +++ b/.github/workflows/build_windows_python.yml @@ -9,11 +9,11 @@ jobs: fail-fast: false matrix: include: - - { os: "windows-2022", python-version: "3.8" } - - { os: "windows-2022", python-version: "3.9" } - - { os: "windows-2022", python-version: "3.10" } - - { os: "windows-2022", python-version: "3.11" } - - { os: "windows-2022", python-version: "3.12" } + - { os: "windows-2019", python-version: "3.8" } + - { os: "windows-2019", python-version: "3.9" } + - { os: "windows-2019", python-version: "3.10" } + - { os: "windows-2019", python-version: "3.11" } + - { os: "windows-2019", python-version: "3.12" } runs-on: ${{matrix.os}} name: ${{matrix.os}}-python${{matrix.python-version}} @@ -24,6 +24,7 @@ jobs: run: | echo "PYLINT_ENABLED=1" >> ${GITHUB_ENV} echo "MYPY_ENABLED=1" >> ${GITHUB_ENV} + echo "MSVC_CMAKE_GENERATOR=Visual Studio 16 2019" >> ${GITHUB_ENV} # python wants v141 which exists in VS2019 only - name: Install dependencies shell: bash