move macOS to GHA

This commit is contained in:
nulano 2020-10-23 15:16:09 +01:00
parent 6991e05c68
commit 6466660f7d
3 changed files with 19 additions and 91 deletions

View File

@ -7,12 +7,14 @@ jobs:
build:
strategy:
matrix:
os: [ "ubuntu-16.04" ]
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
timeout-minutes: 30
runs-on: ${{ matrix.os }}
name: ${{ matrix.python }} ${{ matrix.os }} ${{ matrix.platform }}
@ -22,7 +24,7 @@ jobs:
BUILD_COMMIT: HEAD
BUILD_DEPENDS: ""
TEST_DEPENDS: "pytest pytest-cov"
MACOSX_DEPLOYMENT_TARGET: 10.10
MACOSX_DEPLOYMENT_TARGET: "10.10"
WHEEL_SDIR: wheelhouse
PLAT: ${{ matrix.platform }}
MB_PYTHON_VERSION: ${{ matrix.python }}
@ -37,13 +39,14 @@ jobs:
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"
# 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
@ -56,6 +59,8 @@ jobs:
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::"
@ -69,7 +74,14 @@ jobs:
ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/"
echo "::endgroup::"
install_run $PLAT
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:

View File

@ -16,38 +16,6 @@ services: docker
jobs:
include:
- name: "3.6 macOS"
os: osx
osx_image: xcode9.3
language: generic
env:
- MB_PYTHON_VERSION=3.6
- name: "3.7 macOS"
os: osx
osx_image: xcode9.3
language: generic
env:
- MB_PYTHON_VERSION=3.7
- name: "3.8 macOS"
os: osx
osx_image: xcode9.3
language: generic
env:
- MB_PYTHON_VERSION=3.8
- name: "3.9 macOS"
os: osx
osx_image: xcode9.3
language: generic
env:
- MB_PYTHON_VERSION=3.9
- name: "3.6 macOS PyPy"
os: osx
osx_image: xcode9.3
language: generic
env:
- MB_PYTHON_VERSION=pypy3.6-7.3
- MB_PYTHON_OSX_VER=10.9
- name: "3.6 Xenial aarch64"
arch: arm64
env:
@ -79,48 +47,6 @@ jobs:
- MB_PYTHON_VERSION=3.9
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
- name: "3.6 macOS latest"
os: osx
osx_image: xcode9.3
language: generic
if: tag IS blank
env:
- MB_PYTHON_VERSION=3.6
- LATEST="true"
- name: "3.7 macOS latest"
os: osx
osx_image: xcode9.3
language: generic
if: tag IS blank
env:
- MB_PYTHON_VERSION=3.7
- LATEST="true"
- name: "3.8 macOS latest"
os: osx
osx_image: xcode9.3
language: generic
if: tag IS blank
env:
- MB_PYTHON_VERSION=3.8
- LATEST="true"
- name: "3.9 macOS latest"
os: osx
osx_image: xcode9.3
language: generic
if: tag IS blank
env:
- MB_PYTHON_VERSION=3.9
- LATEST="true"
- name: "3.6 macOS PyPy latest"
os: osx
osx_image: xcode9.3
language: generic
if: tag IS blank
env:
- MB_PYTHON_VERSION=pypy3.6-7.3
- MB_PYTHON_OSX_VER=10.9
- LATEST="true"
- name: "3.6 Xenial aarch64 latest"
os: linux
arch: arm64

View File

@ -52,29 +52,19 @@ function pre_build {
CFLAGS="$CFLAGS -g -O2"
build_jpeg
CFLAGS=$ORIGINAL_CFLAGS
build_tiff
build_libpng
build_lcms2
build_openjpeg
if [ -n "$IS_OSX" ]; then
# Custom flags to allow building on OS X 10.10 and 10.11
build_giflib
ORIGINAL_CPPFLAGS=$CPPFLAGS
CPPFLAGS=""
fi
CFLAGS="$CFLAGS -O3 -DNDEBUG"
build_libwebp
CFLAGS=$ORIGINAL_CFLAGS
if [ -n "$IS_OSX" ]; then
CPPFLAGS=$ORIGINAL_CPPFLAGS
fi
if [ -n "$IS_OSX" ]; then
# Custom freetype build
build_simple freetype $FREETYPE_VERSION https://download.savannah.gnu.org/releases/freetype tar.gz --with-harfbuzz=no
build_simple freetype $FREETYPE_VERSION https://download.savannah.gnu.org/releases/freetype tar.gz --with-harfbuzz=no --with-brotli=no
else
build_freetype
fi