diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index 57b4435af..f581a5974 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -138,7 +138,12 @@ jobs: # Use the prebuilt binary for Windows $Url = "https://sourceforge.net/projects/boost/files/boost-binaries/$env:BOOST_VERSION/$env:BOOST_EXE-${{matrix.platform}}.exe" - (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe") + + # Create WebClient with appropriate settings and download Boost exe + $wc = New-Object System.Net.Webclient + $wc.Headers.Add("User-Agent: Other"); + $wc.DownloadFile($Url, "$env:TEMP\boost.exe") + Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=$BOOST_PATH" # Set the BOOST_ROOT variable diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 1bda7e40a..20b4a846f 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -70,9 +70,6 @@ jobs: } if ("${{ matrix.compiler }}" -eq "gcc") { - # Chocolatey GCC is broken on the windows-2019 image. - # See: https://github.com/DaanDeMeyer/doctest/runs/231595515 - # See: https://github.community/t5/GitHub-Actions/Something-is-wrong-with-the-chocolatey-installed-version-of-gcc/td-p/32413 scoop install gcc --global echo "CC=gcc" >> $GITHUB_ENV echo "CXX=g++" >> $GITHUB_ENV @@ -98,7 +95,12 @@ jobs: # Use the prebuilt binary for Windows $Url = "https://sourceforge.net/projects/boost/files/boost-binaries/$env:BOOST_VERSION/$env:BOOST_EXE-${{matrix.platform}}.exe" - (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe") + + # Create WebClient with appropriate settings and download Boost exe + $wc = New-Object System.Net.Webclient + $wc.Headers.Add("User-Agent: Other"); + $wc.DownloadFile($Url, "$env:TEMP\boost.exe") + Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=$BOOST_PATH" # Set the BOOST_ROOT variable