diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 1cca224ab3f..00000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,95 +0,0 @@ -version: '{build}' -clone_folder: c:\pillow -init: -- ECHO %PYTHON% -#- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) -# Uncomment previous line to get RDP access during the build. - -environment: - EXECUTABLE: python.exe - TEST_OPTIONS: - DEPLOY: YES - matrix: - - PYTHON: C:/Python310 - ARCHITECTURE: x86 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - - PYTHON: C:/Python37-x64 - ARCHITECTURE: x64 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - -install: -- '%PYTHON%\%EXECUTABLE% --version' -- curl -fsSL -o pillow-depends.zip https://github.com/python-pillow/pillow-depends/archive/main.zip -- 7z x pillow-depends.zip -oc:\ -- mv c:\pillow-depends-main c:\pillow-depends -- xcopy /S /Y c:\pillow-depends\test_images\* c:\pillow\tests\images -- 7z x ..\pillow-depends\nasm-2.15.05-win64.zip -oc:\ -- ..\pillow-depends\gs9561w32.exe /S -- path c:\nasm-2.15.05;C:\Program Files (x86)\gs\gs9.56.1\bin;%PATH% -- cd c:\pillow\winbuild\ -- ps: | - c:\python37\python.exe c:\pillow\winbuild\build_prepare.py -v --depends=C:\pillow-depends\ - c:\pillow\winbuild\build\build_dep_all.cmd - $host.SetShouldExit(0) -- path C:\pillow\winbuild\build\bin;%PATH% - -build_script: -- ps: | - c:\pillow\winbuild\build\build_pillow.cmd install - $host.SetShouldExit(0) -- cd c:\pillow -- '%PYTHON%\%EXECUTABLE% selftest.py --installed' - -test_script: -- cd c:\pillow -- '%PYTHON%\%EXECUTABLE% -m pip install pytest pytest-cov pytest-timeout' -- c:\"Program Files (x86)"\"Windows Kits"\10\Debuggers\x86\gflags.exe /p /enable %PYTHON%\%EXECUTABLE% -- '%PYTHON%\%EXECUTABLE% -c "from PIL import Image"' -- '%PYTHON%\%EXECUTABLE% -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests' -#- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s %TEST_OPTIONS%' TODO TEST_OPTIONS with pytest? - -after_test: -- python -m pip install codecov -- codecov --file coverage.xml --name %PYTHON% --flags AppVeyor - -matrix: - fast_finish: true - -cache: -- '%LOCALAPPDATA%\pip\Cache' - -artifacts: -- path: pillow\dist\*.egg - name: egg -- path: pillow\dist\*.wheel - name: wheel - -before_deploy: - - cd c:\pillow - - '%PYTHON%\%EXECUTABLE% -m pip install wheel' - - cd c:\pillow\winbuild\ - - c:\pillow\winbuild\build\build_pillow.cmd bdist_wheel - - cd c:\pillow - - ps: Get-ChildItem .\dist\*.* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } - -deploy: - provider: S3 - region: us-west-2 - access_key_id: AKIAIRAXC62ZNTVQJMOQ - secret_access_key: - secure: Hwb6klTqtBeMgxAjRoDltiiqpuH8xbwD4UooDzBSiCWXjuFj1lyl4kHgHwTCCGqi - bucket: pillow-nightly - folder: win/$(APPVEYOR_BUILD_NUMBER)/ - artifact: /.*egg|wheel/ - on: - APPVEYOR_REPO_NAME: python-pillow/Pillow - branch: main - deploy: YES - - -# Uncomment the following lines to get RDP access after the build/test and block for -# up to the timeout limit (~1hr) -# -#on_finish: -#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml deleted file mode 100644 index 0e0abaf95ee..00000000000 --- a/.github/workflows/cifuzz.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: CIFuzz - -on: - push: - paths: - - "**.c" - - "**.h" - pull_request: - paths: - - "**.c" - - "**.h" - workflow_dispatch: - -jobs: - Fuzzing: - runs-on: ubuntu-latest - steps: - - name: Build Fuzzers - id: build - uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master - with: - oss-fuzz-project-name: 'pillow' - language: python - dry-run: false - - name: Run Fuzzers - id: run - uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master - with: - oss-fuzz-project-name: 'pillow' - fuzz-seconds: 600 - language: python - dry-run: false - - name: Upload New Crash - uses: actions/upload-artifact@v3 - if: failure() && steps.build.outcome == 'success' - with: - name: artifacts - path: ./out/artifacts - - name: Upload Legacy Crash - uses: actions/upload-artifact@v3 - if: steps.run.outcome == 'success' - with: - name: crash - path: ./out/crash* - - name: Fail on legacy crash - if: success() - run: | - [ ! -e out/crash-* ] - echo No legacy crash detected diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 527f26d35d4..00000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Lint - -on: [push, pull_request, workflow_dispatch] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - name: Lint - - steps: - - uses: actions/checkout@v3 - - - name: pre-commit cache - uses: actions/cache@v2 - with: - path: ~/.cache/pre-commit - key: lint-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }} - restore-keys: | - lint-pre-commit- - - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: "3.10" - cache: pip - cache-dependency-path: "setup.py" - - - name: Build system information - run: python3 .github/workflows/system-info.py - - - name: Install dependencies - run: | - python3 -m pip install -U pip - python3 -m pip install -U tox - - - name: Lint - run: tox -e lint - env: - PRE_COMMIT_COLOR: always diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index 7ee76c4ac8c..00000000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Release drafter - -on: - push: - # branches to consider in the event; optional, defaults to all - branches: - - main - workflow_dispatch: - -permissions: - contents: read - -jobs: - update_release_draft: - permissions: - contents: write # for release-drafter/release-drafter to create a github release - pull-requests: write # for release-drafter/release-drafter to add label to PR - if: github.repository == 'python-pillow/Pillow' - runs-on: ubuntu-latest - steps: - # Drafts your next release notes as pull requests are merged into "main" - - uses: release-drafter/release-drafter@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index cc5e0d488ab..00000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Close stale issues - -on: - schedule: - - cron: "10 0 * * *" - workflow_dispatch: - -permissions: - issues: write - -jobs: - stale: - if: github.repository_owner == 'python-pillow' - - runs-on: ubuntu-latest - - steps: - - name: "Check issues" - uses: actions/stale@v5 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - only-labels: "Awaiting OP Action" - close-issue-message: "Closing this issue as no feedback has been received." - days-before-stale: 7 - days-before-issue-close: 0 - days-before-pr-close: -1 - labels-to-remove-when-unstale: "Awaiting OP Action" diff --git a/.github/workflows/test-cygwin.yml b/.github/workflows/test-cygwin.yml deleted file mode 100644 index 417b1f21276..00000000000 --- a/.github/workflows/test-cygwin.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: Test Cygwin - -on: [push, pull_request, workflow_dispatch] - -jobs: - build: - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - python-minor-version: [7, 8, 9] - - timeout-minutes: 40 - - name: Python 3.${{ matrix.python-minor-version }} - - steps: - - name: Fix line endings - run: | - git config --global core.autocrlf input - - - name: Checkout Pillow - uses: actions/checkout@v3 - - - name: Install Cygwin - uses: cygwin/cygwin-install-action@v2 - with: - platform: x86_64 - packages: > - ImageMagick gcc-g++ ghostscript jpeg libfreetype-devel - libimagequant-devel libjpeg-devel liblapack-devel - liblcms2-devel libopenjp2-devel libraqm-devel - libtiff-devel libwebp-devel libxcb-devel libxcb-xinerama0 - make netpbm perl - python3${{ matrix.python-minor-version }}-cffi - python3${{ matrix.python-minor-version }}-cython - python3${{ matrix.python-minor-version }}-devel - python3${{ matrix.python-minor-version }}-numpy - python3${{ matrix.python-minor-version }}-sip - python3${{ matrix.python-minor-version }}-tkinter - qt5-devel-tools subversion xorg-server-extra zlib-devel - - - name: Add Lapack to PATH - uses: egor-tensin/cleanup-path@v1 - with: - dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack' - - - name: pip cache - uses: actions/cache@v3 - with: - path: 'C:\cygwin\home\runneradmin\.cache\pip' - key: ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}-${{ hashFiles('.ci/install.sh') }} - restore-keys: | - ${{ runner.os }}-cygwin-pip3.${{ matrix.python-minor-version }}- - - - name: Build system information - run: | - dash.exe -c "python3 .github/workflows/system-info.py" - - - name: Install dependencies - run: | - bash.exe .ci/install.sh - - - name: Install a different NumPy - shell: dash.exe -l "{0}" - run: | - python3 -m pip install -U 'numpy!=1.21.*' - - - name: Build - shell: bash.exe -eo pipefail -o igncr "{0}" - run: | - .ci/build.sh - - - name: Test - run: | - bash.exe xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh - - - name: Prepare to upload errors - if: failure() - run: | - dash.exe -c "mkdir -p Tests/errors" - - - name: Upload errors - uses: actions/upload-artifact@v3 - if: failure() - with: - name: errors - path: Tests/errors - - - name: After success - run: | - bash.exe .ci/after_success.sh - - - name: Upload coverage - uses: codecov/codecov-action@v3 - with: - file: ./coverage.xml - flags: GHA_Cygwin - name: Cygwin Python 3.${{ matrix.python-minor-version }} - - success: - permissions: - contents: none - needs: build - runs-on: ubuntu-latest - name: Cygwin Test Successful - steps: - - name: Success - run: echo Cygwin Test Successful diff --git a/.github/workflows/test-docker.yml b/.github/workflows/test-docker.yml deleted file mode 100644 index a789726079e..00000000000 --- a/.github/workflows/test-docker.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Test Docker - -on: [push, pull_request, workflow_dispatch] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - docker: [ - # Run slower jobs first to give them a headstart and reduce waiting time - ubuntu-22.04-jammy-arm64v8, - ubuntu-22.04-jammy-ppc64le, - ubuntu-22.04-jammy-s390x, - # Then run the remainder - alpine, - amazon-2-amd64, - arch, - centos-7-amd64, - centos-stream-8-amd64, - centos-stream-9-amd64, - debian-10-buster-x86, - debian-11-bullseye-x86, - fedora-35-amd64, - fedora-36-amd64, - gentoo, - ubuntu-18.04-bionic-amd64, - ubuntu-20.04-focal-amd64, - ubuntu-22.04-jammy-amd64, - ] - dockerTag: [main] - include: - - docker: "ubuntu-22.04-jammy-arm64v8" - qemu-arch: "aarch64" - - docker: "ubuntu-22.04-jammy-ppc64le" - qemu-arch: "ppc64le" - - docker: "ubuntu-22.04-jammy-s390x" - qemu-arch: "s390x" - - name: ${{ matrix.docker }} - - steps: - - uses: actions/checkout@v3 - - - name: Build system information - run: python3 .github/workflows/system-info.py - - - name: Set up QEMU - if: "matrix.qemu-arch" - run: | - docker run --rm --privileged aptman/qus -s -- -p ${{ matrix.qemu-arch }} - - - name: Docker pull - run: | - docker pull pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }} - - - name: Docker build - run: | - # The Pillow user in the docker container is UID 1000 - sudo chown -R 1000 $GITHUB_WORKSPACE - docker run --name pillow_container -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }} - sudo chown -R runner $GITHUB_WORKSPACE - - - name: After success - run: | - PATH="$PATH:~/.local/bin" - docker start pillow_container - pil_path=`docker exec pillow_container /vpy3/bin/python -c 'import os, PIL;print(os.path.realpath(os.path.dirname(PIL.__file__)))'` - docker stop pillow_container - sudo mkdir -p $pil_path - sudo cp src/PIL/*.py $pil_path - .ci/after_success.sh - env: - MATRIX_DOCKER: ${{ matrix.docker }} - - - name: Upload coverage - uses: codecov/codecov-action@v1 - with: - flags: GHA_Docker - name: ${{ matrix.docker }} - - success: - permissions: - contents: none - needs: build - runs-on: ubuntu-latest - name: Docker Test Successful - steps: - - name: Success - run: echo Docker Test Successful diff --git a/.github/workflows/test-mingw.yml b/.github/workflows/test-mingw.yml deleted file mode 100644 index 7ddb71e1f68..00000000000 --- a/.github/workflows/test-mingw.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: Test MinGW - -on: [push, pull_request, workflow_dispatch] - -permissions: - contents: read - -jobs: - build: - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - mingw: ["MINGW32", "MINGW64"] - include: - - mingw: "MINGW32" - name: "MSYS2 MinGW 32-bit" - package: "mingw-w64-i686" - - mingw: "MINGW64" - name: "MSYS2 MinGW 64-bit" - package: "mingw-w64-x86_64" - - defaults: - run: - shell: bash.exe --login -eo pipefail "{0}" - env: - MSYSTEM: ${{ matrix.mingw }} - CHERE_INVOKING: 1 - - timeout-minutes: 30 - name: ${{ matrix.name }} - - steps: - - name: Checkout Pillow - uses: actions/checkout@v3 - - - name: Set up shell - run: echo "C:\msys64\usr\bin\" >> $env:GITHUB_PATH - shell: pwsh - - - name: Install dependencies - run: | - pacman -S --noconfirm \ - ${{ matrix.package }}-python3-cffi \ - ${{ matrix.package }}-python3-numpy \ - ${{ matrix.package }}-python3-olefile \ - ${{ matrix.package }}-python3-pip \ - ${{ matrix.package }}-python-pyqt6 \ - ${{ matrix.package }}-python3-setuptools \ - ${{ matrix.package }}-freetype \ - ${{ matrix.package }}-gcc \ - ${{ matrix.package }}-ghostscript \ - ${{ matrix.package }}-lcms2 \ - ${{ matrix.package }}-libimagequant \ - ${{ matrix.package }}-libjpeg-turbo \ - ${{ matrix.package }}-libraqm \ - ${{ matrix.package }}-libtiff \ - ${{ matrix.package }}-libwebp \ - ${{ matrix.package }}-openjpeg2 \ - subversion - - python3 -m pip install pyroma pytest pytest-cov pytest-timeout - - pushd depends && ./install_extra_test_images.sh && popd - - - name: Build Pillow - run: CFLAGS="-coverage" python3 -m pip install --global-option="build_ext" . - - - name: Test Pillow - run: | - python3 selftest.py --installed - python3 -c "from PIL import Image" - python3 -m pytest -vx --cov PIL --cov Tests --cov-report term --cov-report xml Tests - - - name: Upload coverage - run: | - python3 -m pip install codecov - bash <(curl -s https://codecov.io/bash) -F GHA_Windows - env: - CODECOV_NAME: ${{ matrix.name }} - - success: - permissions: - contents: none - needs: build - runs-on: ubuntu-latest - name: MinGW Test Successful - steps: - - name: Success - run: echo MinGW Test Successful diff --git a/.github/workflows/test-valgrind.yml b/.github/workflows/test-valgrind.yml deleted file mode 100644 index 013e5ca4ac3..00000000000 --- a/.github/workflows/test-valgrind.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Test Valgrind - -# like the docker tests, but running valgrind only on *.c/*.h changes. - -on: - push: - paths: - - "**.c" - - "**.h" - pull_request: - paths: - - "**.c" - - "**.h" - workflow_dispatch: - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - docker: [ - ubuntu-20.04-focal-amd64-valgrind, - ] - dockerTag: [main] - - name: ${{ matrix.docker }} - - steps: - - uses: actions/checkout@v3 - - - name: Build system information - run: python3 .github/workflows/system-info.py - - - name: Docker pull - run: | - docker pull pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }} - - - name: Build and Run Valgrind - run: | - # The Pillow user in the docker container is UID 1000 - sudo chown -R 1000 $GITHUB_WORKSPACE - docker run --name pillow_container -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }} - sudo chown -R runner $GITHUB_WORKSPACE diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml deleted file mode 100644 index b9accfdf9a5..00000000000 --- a/.github/workflows/test-windows.yml +++ /dev/null @@ -1,202 +0,0 @@ -name: Test Windows - -on: [push, pull_request, workflow_dispatch] - -permissions: - contents: read - -jobs: - build: - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"] - architecture: ["x86", "x64"] - include: - # PyPy 7.3.4+ only ships 64-bit binaries for Windows - - python-version: "pypy-3.7" - architecture: "x64" - - python-version: "pypy-3.8" - architecture: "x64" - - timeout-minutes: 30 - - name: Python ${{ matrix.python-version }} ${{ matrix.architecture }} - - steps: - - name: Checkout Pillow - uses: actions/checkout@v3 - - - name: Checkout cached dependencies - uses: actions/checkout@v3 - with: - repository: python-pillow/pillow-depends - path: winbuild\depends - - # sets env: pythonLocation - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.architecture }} - cache: pip - cache-dependency-path: ".github/workflows/test-windows.yml" - - - name: Print build system information - run: python3 .github/workflows/system-info.py - - - name: python3 -m pip install wheel pytest pytest-cov pytest-timeout defusedxml - run: python3 -m pip install wheel pytest pytest-cov pytest-timeout defusedxml - - - name: Install dependencies - id: install - run: | - 7z x winbuild\depends\nasm-2.15.05-win64.zip "-o$env:RUNNER_WORKSPACE\" - echo "$env:RUNNER_WORKSPACE\nasm-2.15.05" >> $env:GITHUB_PATH - - winbuild\depends\gs9561w32.exe /S - echo "C:\Program Files (x86)\gs\gs9.56.1\bin" >> $env:GITHUB_PATH - - xcopy /S /Y winbuild\depends\test_images\* Tests\images\ - - # make cache key depend on VS version - & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" | find """catalog_buildVersion""" | ForEach-Object { $a = $_.split(" ")[1]; echo "::set-output name=vs::$a" } - shell: pwsh - - - name: Cache build - id: build-cache - uses: actions/cache@v2 - with: - path: winbuild\build - key: - ${{ hashFiles('winbuild\build_prepare.py') }}-${{ hashFiles('.github\workflows\test-windows.yml') }}-${{ env.pythonLocation }}-${{ steps.install.outputs.vs }} - - - name: Prepare build - if: steps.build-cache.outputs.cache-hit != 'true' - run: | - & python.exe winbuild\build_prepare.py -v --python=$env:pythonLocation --srcdir - shell: pwsh - - - name: Build dependencies / libjpeg-turbo - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_libjpeg.cmd" - - - name: Build dependencies / zlib - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_zlib.cmd" - - - name: Build dependencies / LibTiff - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_libtiff.cmd" - - - name: Build dependencies / WebP - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_libwebp.cmd" - - # for FreeType CBDT/SBIX font support - - name: Build dependencies / libpng - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_libpng.cmd" - - - name: Build dependencies / FreeType - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_freetype.cmd" - - - name: Build dependencies / LCMS2 - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_lcms2.cmd" - - - name: Build dependencies / OpenJPEG - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_openjpeg.cmd" - - # GPL licensed - - name: Build dependencies / libimagequant - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_libimagequant.cmd" - - # Raqm dependencies - - name: Build dependencies / HarfBuzz - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_harfbuzz.cmd" - - # Raqm dependencies - - name: Build dependencies / FriBidi - if: steps.build-cache.outputs.cache-hit != 'true' - run: "& winbuild\\build\\build_dep_fribidi.cmd" - - # trim ~150MB x 9 - - name: Optimize build cache - if: steps.build-cache.outputs.cache-hit != 'true' - run: rmdir /S /Q winbuild\build\src - shell: cmd - - - name: Build Pillow - run: | - $FLAGS="" - if ('${{ github.event_name }}' -ne 'pull_request') { $FLAGS="--disable-imagequant" } - & winbuild\build\build_pillow.cmd $FLAGS install - & $env:pythonLocation\python.exe selftest.py --installed - shell: pwsh - - # skip PyPy for speed - - name: Enable heap verification - if: "!contains(matrix.python-version, 'pypy')" - run: | - & reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\python.exe" /v "GlobalFlag" /t REG_SZ /d "0x02000000" /f - - - name: Test Pillow - run: | - path %GITHUB_WORKSPACE%\\winbuild\\build\\bin;%PATH% - python.exe -m pytest -vx -W always --cov PIL --cov Tests --cov-report term --cov-report xml Tests - shell: cmd - - - name: Prepare to upload errors - if: failure() - run: | - mkdir -p Tests/errors - shell: bash - - - name: Upload errors - uses: actions/upload-artifact@v3 - if: failure() - with: - name: errors - path: Tests/errors - - - name: After success - run: | - .ci/after_success.sh - shell: pwsh - - - name: Upload coverage - uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml - flags: GHA_Windows - name: ${{ runner.os }} Python ${{ matrix.python-version }} ${{ matrix.architecture }} - - - name: Build wheel - id: wheel - if: "github.event_name != 'pull_request'" - run: | - for /f "tokens=3 delims=/" %%a in ("${{ github.ref }}") do echo ::set-output name=dist::dist-%%a - winbuild\\build\\build_pillow.cmd --disable-imagequant bdist_wheel - shell: cmd - - - uses: actions/upload-artifact@v3 - if: "github.event_name != 'pull_request'" - with: - name: ${{ steps.wheel.outputs.dist }} - path: dist\*.whl - - success: - permissions: - contents: none - needs: build - runs-on: ubuntu-latest - name: Windows Test Successful - steps: - - name: Success - run: echo Windows Test Successful diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5614ad5f228..a25394e9bae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,122 +1,22 @@ name: Test -on: [push, pull_request, workflow_dispatch] - -permissions: - contents: read +on: [push] jobs: build: - - strategy: - fail-fast: false - matrix: - os: [ - "macos-latest", - "ubuntu-latest", - ] - python-version: [ - "pypy-3.8", - "pypy-3.7", - "3.11-dev", - "3.10", - "3.9", - "3.8", - "3.7", - ] - include: - - python-version: "3.7" - PYTHONOPTIMIZE: 1 - REVERSE: "--reverse" - - python-version: "3.8" - PYTHONOPTIMIZE: 2 - # Include new variables for Codecov - - os: ubuntu-latest - codecov-flag: GHA_Ubuntu - - os: macos-latest - codecov-flag: GHA_macOS - - runs-on: ${{ matrix.os }} - name: ${{ matrix.os }} Python ${{ matrix.python-version }} + runs-on: ubuntu-latest + name: ubuntu-latest Python 3.9 steps: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + - uses: actions/setup-python@v3 with: - python-version: ${{ matrix.python-version }} - cache: pip - cache-dependency-path: ".ci/*.sh" - - - name: Build system information - run: python3 .github/workflows/system-info.py - - - name: Install Linux dependencies - if: startsWith(matrix.os, 'ubuntu') - run: | - .ci/install.sh - env: - GHA_PYTHON_VERSION: ${{ matrix.python-version }} - - - name: Install macOS dependencies - if: startsWith(matrix.os, 'macOS') - run: | - .github/workflows/macos-install.sh - env: - GHA_PYTHON_VERSION: ${{ matrix.python-version }} - - - name: Build - run: | - .ci/build.sh + python-version: 3.9 - name: Test run: | - if [ $REVERSE ]; then - python3 -m pip install pytest-reverse - fi - if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then - xvfb-run -s '-screen 0 1024x768x24' .ci/test.sh - else - .ci/test.sh - fi - env: - PYTHONOPTIMIZE: ${{ matrix.PYTHONOPTIMIZE }} - REVERSE: ${{ matrix.REVERSE }} - - - name: Prepare to upload errors - if: failure() - run: | - mkdir -p Tests/errors - - - name: Upload errors - uses: actions/upload-artifact@v3 - if: failure() - with: - name: errors - path: Tests/errors - - - name: Docs - if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == 3.10 - run: | - python3 -m pip install furo sphinx-copybutton sphinx-issues sphinx-removed-in sphinxext-opengraph - make doccheck - - - name: After success - run: | - .ci/after_success.sh - - - name: Upload coverage - run: bash <(curl -s https://codecov.io/bash) -F ${{ matrix.codecov-flag }} - env: - CODECOV_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }} - - success: - permissions: - contents: none - needs: build - runs-on: ubuntu-latest - name: Test Successful - steps: - - name: Success - run: echo Test Successful + export QT_DEBUG_PLUGINS=1 + sudo apt-get -qq install libegl1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxkbcommon-x11-0 + python3 -m pip install pyqt6 + python3 -c "from PyQt6.QtWidgets import QApplication;QApplication([])" diff --git a/.github/workflows/tidelift.yml b/.github/workflows/tidelift.yml deleted file mode 100644 index c73f254313d..00000000000 --- a/.github/workflows/tidelift.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Tidelift Align -on: - schedule: - - cron: "30 2 * * *" # daily at 02:30 UTC - push: - paths: - - "Pipfile*" - - ".github/workflows/tidelift.yml" - pull_request: - paths: - - "Pipfile*" - - ".github/workflows/tidelift.yml" - workflow_dispatch: - -permissions: - contents: read - -jobs: - build: - if: github.repository_owner == 'python-pillow' - name: Run Tidelift to ensure approved open source packages are in use - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Scan - uses: tidelift/alignment-action@main - env: - TIDELIFT_API_KEY: ${{ secrets.TIDELIFT_API_KEY }} - TIDELIFT_ORGANIZATION: team/aclark4life - TIDELIFT_PROJECT: pillow