Pillow/.github/workflows/wheels.yml
2020-10-23 18:14:38 +01:00

93 lines
2.5 KiB
YAML

name: Wheels
on: [push, pull_request, create]
jobs:
build:
strategy:
matrix:
os: [ "ubuntu-16.04" ]
python: [ "3.6", "3.7", "3.8", "3.9", "pypy3.6-7.3" ]
platform: [ "x86_64", "i686" ]
fail-fast: false
timeout-minutes: 30
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
# Run everything in a single step because GHA doesn't share envvars
- 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"
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
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::"
install_run $PLAT
- 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 }}