mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-09-22 03:49:03 +03:00
105 lines
3.0 KiB
YAML
105 lines
3.0 KiB
YAML
|
|
name: Wheels
|
|
|
|
on: [push, pull_request, create]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: [ "ubuntu-16.04", "macos-latest" ]
|
|
python: [ "3.6", "3.7", "3.8", "3.9", "pypy3.6-7.3" ]
|
|
platform: [ "x86_64", "i686" ]
|
|
exclude:
|
|
- os: "macos-latest"
|
|
platform: "i686"
|
|
fail-fast: false
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
name: ${{ matrix.python }} ${{ matrix.os }} ${{ matrix.platform }}
|
|
|
|
env:
|
|
REPO_DIR: Pillow
|
|
BUILD_COMMIT: HEAD
|
|
BUILD_DEPENDS: ""
|
|
TEST_DEPENDS: "pytest pytest-cov"
|
|
MACOSX_DEPLOYMENT_TARGET: "10.10"
|
|
WHEEL_SDIR: wheelhouse
|
|
PLAT: ${{ matrix.platform }}
|
|
MB_PYTHON_VERSION: ${{ matrix.python }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Build Wheel
|
|
run: |
|
|
echo "::group::Install a virtualenv"
|
|
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
|
|
# pretend we are on Travis CI
|
|
TRAVIS_OS_NAME="osx"
|
|
# these cause a conflict with built webp and libtiff
|
|
brew remove --ignore-dependencies webp zstd xz libtiff
|
|
fi
|
|
if [[ "${{ matrix.python }}" == "pypy3.6-7.3" ]]; then
|
|
# PyPy specific settings
|
|
if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then
|
|
MB_ML_VER="2010"
|
|
DOCKER_TEST_IMAGE="multibuild/xenial_$PLAT"
|
|
else
|
|
MB_PYTHON_OSX_VER="10.9"
|
|
fi
|
|
fi
|
|
source multibuild/common_utils.sh
|
|
source multibuild/travis_steps.sh
|
|
# can't use default 7.3.1 on macOS due to https://foss.heptapod.net/pypy/pypy/-/issues/3229
|
|
LATEST_PP_7p3=7.3.2
|
|
pip install virtualenv
|
|
before_install
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Build wheel"
|
|
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "false" ]]; then
|
|
BUILD_COMMIT=master
|
|
fi
|
|
clean_code $REPO_DIR $BUILD_COMMIT
|
|
build_wheel $REPO_DIR $PLAT
|
|
ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/"
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::Test wheel"
|
|
install_run $PLAT
|
|
echo "::endgroup::"
|
|
|
|
# Uncomment to get SSH access for testing
|
|
# - name: Setup tmate session
|
|
# if: failure()
|
|
# uses: mxschmitt/action-tmate@v3
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: wheels
|
|
path: wheelhouse/*.whl
|
|
|
|
release:
|
|
name: Create Release
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
needs: build
|
|
steps:
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: wheels
|
|
- name: Upload Release
|
|
uses: fnkr/github-action-ghr@v1.3
|
|
env:
|
|
GHR_PATH: .
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|