From fe25c1b5af2c288342b2ea6c0c895d6c179a7410 Mon Sep 17 00:00:00 2001 From: Nulano Date: Mon, 9 Oct 2023 19:49:50 +0200 Subject: [PATCH] fix testing pypy --- .github/workflows/test-windows.yml | 2 +- winbuild/test_docker.ps1 | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index e7f98fa03b3..76dd4d6675c 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -239,7 +239,7 @@ jobs: if: "github.event_name != 'pull_request'" run: | docker run --rm -v ${env:GITHUB_WORKSPACE}:C:\pillow mcr.microsoft.com/windows/servercore:ltsc2022 powershell C:\pillow\winbuild\test_docker.ps1 ${{ matrix.python-version }} - shell: pwsh + shell: powershell - name: Upload wheel uses: actions/upload-artifact@v3 diff --git a/winbuild/test_docker.ps1 b/winbuild/test_docker.ps1 index 521c7a2376b..807f6ee8b86 100644 --- a/winbuild/test_docker.ps1 +++ b/winbuild/test_docker.ps1 @@ -1,17 +1,19 @@ param ([string]$python) $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 if ($python -like "pypy*") { - $url = 'https://downloads.python.org/pypy/{0}-v7.3.11-win64.zip' -f $python - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + echo "Downloading https://aka.ms/vs/15/release/vc_redist.x64.exe" Invoke-WebRequest -Uri 'https://aka.ms/vs/15/release/vc_redist.x64.exe' -OutFile 'vc_redist.x64.exe' - & C:\vc_redist.x64.exe /install /quiet /norestart + C:\vc_redist.x64.exe /install /quiet /norestart | Out-Null + $url = 'https://downloads.python.org/pypy/{0}-v7.3.13-win64.zip' -f $python + echo "Downloading $url" Invoke-WebRequest -Uri $url -OutFile 'pypy.zip' tar -xf 'pypy.zip' mv pypy*-win64 C:\Python } else { $url = 'https://www.python.org/ftp/python/{0}.0/python-{0}.0-amd64.exe' -f $python - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + echo "Downloading $url" Invoke-WebRequest -Uri $url -OutFile 'setup.exe' Start-Process setup.exe -Wait -NoNewWindow -PassThru -ArgumentList @( '/quiet', @@ -27,8 +29,10 @@ if ($python -like "pypy*") { $env:CI = "true" $env:path += ";C:\Python\;C:\pillow\winbuild\build\bin\" cd C:\pillow +echo "Running test" & python -VV & python -m ensurepip +& python -m pip install -U pip & python -m pip install pytest pytest-timeout & python -m pip install "$(Get-ChildItem *.whl -Name)" & python -m pytest -vx Tests\check_wheel.py Tests