Replace SVN with Git for installing extra test images

This commit is contained in:
Hugo van Kemenade 2023-01-27 23:19:03 +02:00
parent 698951e19e
commit c8966013bd
3 changed files with 16 additions and 14 deletions

View File

@ -21,9 +21,11 @@ environment:
install:
- '%PYTHON%\%EXECUTABLE% --version'
- curl -fsSL -o pillow-depends.zip https://github.com/python-pillow/pillow-depends/archive/main.zip
- curl -fsSL -o pillow-test-images.zip https://github.com/python-pillow/test-images/archive/main.zip
- 7z x pillow-depends.zip -oc:\
- 7z x pillow-test-images.zip -oc:\
- mv c:\pillow-depends-main c:\pillow-depends
- xcopy /S /Y c:\pillow-depends\test_images\* c:\pillow\tests\images
- xcopy /S /Y c:\test-images-main\* c:\pillow\tests\images
- 7z x ..\pillow-depends\nasm-2.15.05-win64.zip -oc:\
- ..\pillow-depends\gs1000w32.exe /S
- path c:\nasm-2.15.05;C:\Program Files (x86)\gs\gs10.0.0\bin;%PATH%

View File

@ -62,7 +62,10 @@ jobs:
winbuild\depends\gs1000w32.exe /S
echo "C:\Program Files (x86)\gs\gs10.0.0\bin" >> $env:GITHUB_PATH
xcopy /S /Y winbuild\depends\test_images\* Tests\images\
# Install extra test images
curl -fsSL -o pillow-test-images.zip https://github.com/hugovk/test-images/archive/main.zip
7z x pillow-test-images.zip -oc:\
xcopy /S /Y c:\test-images-main\* Tests\images\
# make cache key depend on VS version
& "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" `

View File

@ -1,15 +1,12 @@
#!/bin/bash
#!/usr/bin/env bash
# install extra test images
# Use SVN to just fetch a single Git subdirectory
svn_export()
{
if [ ! -z $1 ]; then
echo ""
echo "Retrying svn export..."
echo ""
fi
archive=test-images-main
svn export --force https://github.com/python-pillow/pillow-depends/trunk/test_images ../Tests/images
}
svn_export || svn_export retry || svn_export retry || svn_export retry
./download-and-extract.sh $archive https://github.com/hugovk/test-images/archive/refs/heads/main.tar.gz
mv $archive/* ../Tests/images/
# Cleanup old tarball and empty directory
rm $archive.tar.gz
rm -r $archive