forked from python-pillow/Pillow
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 36fd8dd.
- Loading branch information
Showing
10 changed files
with
895 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
skip_commits: | ||
files: | ||
- ".github/**/*" | ||
- ".gitmodules" | ||
- "docs/**/*" | ||
- "wheels/**/*" | ||
|
||
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: | ||
COVERAGE_CORE: sysmon | ||
EXECUTABLE: python.exe | ||
TEST_OPTIONS: | ||
DEPLOY: YES | ||
matrix: | ||
- PYTHON: C:/Python312 | ||
ARCHITECTURE: x86 | ||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 | ||
- PYTHON: C:/Python38-x64 | ||
ARCHITECTURE: AMD64 | ||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 | ||
|
||
|
||
install: | ||
- '%PYTHON%\%EXECUTABLE% --version' | ||
- '%PYTHON%\%EXECUTABLE% -m pip install --upgrade pip' | ||
- curl -fsSL -o pillow-test-images.zip https://github.com/python-pillow/test-images/archive/main.zip | ||
- 7z x pillow-test-images.zip -oc:\ | ||
- xcopy /S /Y c:\test-images-main\* c:\pillow\tests\images | ||
- curl -fsSL -o nasm-win64.zip https://raw.githubusercontent.com/python-pillow/pillow-depends/main/nasm-2.16.03-win64.zip | ||
- 7z x nasm-win64.zip -oc:\ | ||
- choco install ghostscript --version=10.3.1 | ||
- path c:\nasm-2.16.03;C:\Program Files\gs\gs10.03.1\bin;%PATH% | ||
- cd c:\pillow\winbuild\ | ||
- ps: | | ||
c:\python38\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: | ||
- cd c:\pillow | ||
- winbuild\build\build_env.cmd | ||
- '%PYTHON%\%EXECUTABLE% -m pip install -v -C raqm=vendor -C fribidi=vendor .' | ||
- '%PYTHON%\%EXECUTABLE% selftest.py --installed' | ||
|
||
test_script: | ||
- cd c:\pillow | ||
- '%PYTHON%\%EXECUTABLE% -m pip install pytest pytest-cov pytest-timeout defusedxml numpy olefile pyroma' | ||
- 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: | ||
- curl -Os https://uploader.codecov.io/latest/windows/codecov.exe | ||
- .\codecov.exe --file coverage.xml --name %PYTHON% --flags AppVeyor | ||
|
||
matrix: | ||
fast_finish: true | ||
|
||
cache: | ||
- '%LOCALAPPDATA%\pip\Cache' | ||
|
||
artifacts: | ||
- path: pillow\*.egg | ||
name: egg | ||
- path: pillow\*.whl | ||
name: wheel | ||
|
||
before_deploy: | ||
- cd c:\pillow | ||
- '%PYTHON%\%EXECUTABLE% -m pip wheel -v -C raqm=vendor -C fribidi=vendor .' | ||
- ps: Get-ChildItem .\*.whl | % { 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')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: CIFuzz | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
paths: | ||
- ".github/workflows/cifuzz.yml" | ||
- "**.c" | ||
- "**.h" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/cifuzz.yml" | ||
- "**.c" | ||
- "**.h" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
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@v4 | ||
if: failure() && steps.build.outcome == 'success' | ||
with: | ||
name: artifacts | ||
path: ./out/artifacts | ||
- name: Upload Legacy Crash | ||
uses: actions/upload-artifact@v4 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
paths: | ||
- ".github/workflows/docs.yml" | ||
- "docs/**" | ||
- "src/PIL/**" | ||
pull_request: | ||
paths: | ||
- ".github/workflows/docs.yml" | ||
- "docs/**" | ||
- "src/PIL/**" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
name: Docs | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
cache: pip | ||
cache-dependency-path: | | ||
".ci/*.sh" | ||
"pyproject.toml" | ||
- name: Build system information | ||
run: python3 .github/workflows/system-info.py | ||
|
||
- name: Cache libimagequant | ||
uses: actions/cache@v4 | ||
id: cache-libimagequant | ||
with: | ||
path: ~/cache-libimagequant | ||
key: ${{ runner.os }}-libimagequant-${{ hashFiles('depends/install_imagequant.sh') }} | ||
|
||
- name: Install Linux dependencies | ||
run: | | ||
.ci/install.sh | ||
env: | ||
GHA_PYTHON_VERSION: "3.x" | ||
GHA_LIBIMAGEQUANT_CACHE_HIT: ${{ steps.cache-libimagequant.outputs.cache-hit }} | ||
|
||
- name: Build | ||
run: | | ||
.ci/build.sh | ||
- name: Docs | ||
run: | | ||
make doccheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
name: Test Cygwin | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
paths-ignore: | ||
- ".github/workflows/docs.yml" | ||
- ".github/workflows/wheels*" | ||
- ".gitmodules" | ||
- "docs/**" | ||
- "wheels/**" | ||
pull_request: | ||
paths-ignore: | ||
- ".github/workflows/docs.yml" | ||
- ".github/workflows/wheels*" | ||
- ".gitmodules" | ||
- "docs/**" | ||
- "wheels/**" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
COVERAGE_CORE: sysmon | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-minor-version: [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@v4 | ||
|
||
- name: Install Cygwin | ||
uses: cygwin/cygwin-install-action@v4 | ||
with: | ||
packages: > | ||
gcc-g++ | ||
ghostscript | ||
git | ||
ImageMagick | ||
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 }}-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 | ||
wget | ||
xorg-server-extra | ||
zlib-devel | ||
- name: Add Lapack to PATH | ||
uses: egor-tensin/cleanup-path@v4 | ||
with: | ||
dirs: 'C:\cygwin\bin;C:\cygwin\lib\lapack' | ||
|
||
- name: Select Python version | ||
run: | | ||
ln -sf c:/cygwin/bin/python3.${{ matrix.python-minor-version }} c:/cygwin/bin/python3 | ||
- name: pip cache | ||
uses: actions/cache@v4 | ||
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: 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@v4 | ||
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@v4 | ||
with: | ||
file: ./coverage.xml | ||
flags: GHA_Cygwin | ||
name: Cygwin Python 3.${{ matrix.python-minor-version }} | ||
token: ${{ secrets.CODECOV_ORG_TOKEN }} | ||
|
||
success: | ||
permissions: | ||
contents: none | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Cygwin Test Successful | ||
steps: | ||
- name: Success | ||
run: echo Cygwin Test Successful |
Oops, something went wrong.