Skip to content

Commit

Permalink
simplify matrix?
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Oct 5, 2023
1 parent 82530f0 commit 593bdc5
Showing 1 changed file with 46 additions and 78 deletions.
124 changes: 46 additions & 78 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,111 +13,79 @@ env:

jobs:
build:
name: ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }}
name: ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.arch == 'x86' && 'x86_64' || matrix.os == 'macos-11' && 'arm64' || 'aarch64' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-20.04", "macos-11" ]
python: [ "2.7", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
platform: [ "x86_64" ]
manylinux-version: [ "2010" ]
macos-target: [ "10.10" ]
arch: [ "x86", "arm" ]
manylinux-version: [ "2014" ]
mb-ml-libc: [ "manylinux" ]
multibuild-sha: [ "34e970c4bc448b73af0127615fc4583b4f247369" ]
exclude:
- python: "3.11"
manylinux-version: "2010"
- python: "3.11"
multibuild-sha: "34e970c4bc448b73af0127615fc4583b4f247369"
- python: "3.12"
manylinux-version: "2010"
- python: "3.12"
multibuild-sha: "34e970c4bc448b73af0127615fc4583b4f247369"
include:
- os: "macos-11"
os-name: "osx"
- os: "ubuntu-20.04"
manylinux-version: "2010"
os-name: "manylinux2010"
- python: "3.11"
- python: "2.7"
os: "ubuntu-20.04"
manylinux-version: "2014"
os-name: "manylinux2014"
- python: "3.12"
- python: "3.7"
os: "ubuntu-20.04"
manylinux-version: "2014"
os-name: "manylinux2014"
- python: "3.11"
multibuild-sha: "34e970c4bc448b73af0127615fc4583b4f247369"
- python: "3.12"
multibuild-sha: "34e970c4bc448b73af0127615fc4583b4f247369"
- os: "macos-11"
os-name: "osx"
platform: "arm64"
python: "3.10"
macos-target: "11.0"
- os: "macos-11"
os-name: "osx"
platform: "arm64"
python: "3.9"
macos-target: "11.0"
- os: "macos-11"
os-name: "osx"
platform: "arm64"
python: "3.8"
macos-target: "11.0"
- os: "macos-11"
os-name: "osx"
platform: "arm64"
- python: "2.7"
os: "ubuntu-20.04"
arch: "arm"
include:
- os: "ubuntu-20.04"
python: "2.7"
arch: "x86"
manylinux-version: "2010"
os-name: "manylinux2010"
- os: "ubuntu-20.04"
python: "3.7"
macos-target: "11.0"
arch: "x86"
manylinux-version: "2010"
os-name: "manylinux2010"
- os: "macos-11"
os-name: "osx"
platform: "arm64"
python: "2.7"
macos-target: "11.0"
- os: "ubuntu-20.04"
manylinux-version: "2014"
os-name: "manylinux2014"
- python: "3.8"
platform: "x86_64"
arch: "x86"
mb-ml-libc: "musllinux"
os: "ubuntu-20.04"
os-name: "musllinux"
manylinux-version: ""
manylinux-version: "_1_1"
- python: "3.9"
platform: "x86_64"
arch: "x86"
mb-ml-libc: "musllinux"
os: "ubuntu-20.04"
os-name: "musllinux"
manylinux-version: ""
manylinux-version: "_1_1"
- python: "3.10"
platform: "x86_64"
arch: "x86"
mb-ml-libc: "musllinux"
os: "ubuntu-20.04"
os-name: "musllinux"
manylinux-version: ""
- python: "3.8"
platform: "aarch64"
os: "ubuntu-20.04"
os-name: "manylinux2014"
manylinux-version: "2014"
- python: "3.9"
platform: "aarch64"
manylinux-version: "_1_1"
- python: "3.11"
arch: "x86"
mb-ml-libc: "musllinux"
os: "ubuntu-20.04"
os-name: "manylinux2014"
manylinux-version: "2014"
- python: "3.10"
platform: "aarch64"
os-name: "musllinux"
manylinux-version: "_1_1"
- python: "3.12"
arch: "x86"
mb-ml-libc: "musllinux"
os: "ubuntu-20.04"
os-name: "manylinux2014"
manylinux-version: "2014"

os-name: "musllinux"
manylinux-version: "_1_1"
env:
BUILD_COMMIT: HEAD
PLAT: ${{ matrix.platform }}
PLAT: ${{ matrix.arch == 'x86' && 'x86_64' || matrix.os == 'macos-11' && 'arm64' || 'aarch64' }}
MB_PYTHON_VERSION: ${{ matrix.python }}
TRAVIS_OS_NAME: ${{ matrix.os-name }}
MB_ML_VER: ${{ matrix.manylinux-version }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.arch == 'arm' && '11.0' || '10.10' }}
MB_ML_LIBC: ${{ matrix.mb-ml-libc }}
steps:
- uses: actions/checkout@v3
Expand All @@ -135,15 +103,15 @@ jobs:
with:
repository: multi-build/multibuild
path: multibuild
ref: ${{ matrix.multibuild-sha }}
ref: ${{ (matrix.python == '3.11' || matrix.python == '3.12') && '452dd2d1705f6b2375369a6570c415beb3163f70' || '34e970c4bc448b73af0127615fc4583b4f247369' }}

- uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
if: ${{ matrix.platform == 'aarch64' }}
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.arch == 'arm' }}

- name: Setup env_vars
run: |
Expand All @@ -158,7 +126,7 @@ jobs:
with:
path: pillow-avif-plugin/depends/libavif-${{ env.LIBAVIF_VERSION }}
key:
${{ env.LIBAVIF_VERSION }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*') }}-${{ matrix.os }}-${{ matrix.platform }}
${{ env.LIBAVIF_VERSION }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*') }}-${{ matrix.os }}-${{ env.PLAT }}

- name: Cache ccache/sccache
uses: actions/cache@v3
Expand All @@ -167,11 +135,11 @@ jobs:
ccache
sccache
key:
cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ matrix.platform }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }}-${{ matrix.python }}
cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ env.PLAT }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }}-${{ matrix.python }}
restore-keys: |
cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ matrix.platform }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }}-${{ matrix.python }}
cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ matrix.platform }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }}
cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ matrix.platform }}-
cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ env.PLAT }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }}-${{ matrix.python }}
cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ env.PLAT }}-${{ hashFiles('pillow-avif-plugin/wheelbuild/*.sh', 'pillow-avif-plugin/.github/workflows/wheels.yml', 'pillow-avif-plugin/depends/*', 'pillow-avif-plugin/**/*.py', 'pillow-avif-plugin/**/*.c') }}
cache-${{ matrix.os }}-${{ matrix.os-name }}-${{ env.PLAT }}-
- name: Build Wheel
run: pillow-avif-plugin/wheelbuild/build.sh
Expand Down

0 comments on commit 593bdc5

Please sign in to comment.