mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-29 17:39:49 +03:00
feat: Cross-compile macos arm64 wheels
This uses [cibuildwheel](https://cibuildwheel.readthedocs.io/en/stable/) in order to cross-compile the arm64 wheels for Python 3.8, 3.9 & 3.10. Fixes #1286
This commit is contained in:
parent
1b255b7dc3
commit
5ef2032e19
37
.github/workflows/packages.yml
vendored
37
.github/workflows/packages.yml
vendored
|
@ -3,7 +3,6 @@ name: Build packages
|
||||||
on:
|
on:
|
||||||
- workflow_dispatch
|
- workflow_dispatch
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-sdist:
|
build-sdist:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -51,16 +50,15 @@ jobs:
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
|
||||||
|
|
||||||
build-manylinux:
|
build-manylinux:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- {tag: manylinux2014, arch: x86_64}
|
- { tag: manylinux2014, arch: x86_64 }
|
||||||
- {tag: manylinux2014, arch: i686}
|
- { tag: manylinux2014, arch: i686 }
|
||||||
- {tag: manylinux_2_24, arch: aarch64}
|
- { tag: manylinux_2_24, arch: aarch64 }
|
||||||
- {tag: manylinux_2_24, arch: ppc64le}
|
- { tag: manylinux_2_24, arch: ppc64le }
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
|
@ -107,13 +105,12 @@ jobs:
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ['3.6', '3.7', '3.8', '3.9']
|
python-version: ["3.6", "3.7", "3.8", "3.9"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repos
|
- name: Checkout repos
|
||||||
|
@ -137,3 +134,27 @@ jobs:
|
||||||
name: packages_macos
|
name: packages_macos
|
||||||
path: |
|
path: |
|
||||||
dist/*/*${{ matrix.platform }}.whl
|
dist/*/*${{ matrix.platform }}.whl
|
||||||
|
|
||||||
|
# This only uploads the arm64 wheels for Apple M1 silicon usage
|
||||||
|
build-macos-arm64:
|
||||||
|
runs-on: macos-10.15
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
name: "build-macos (3.8-3.10 - arm64)"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
# This builds all possible Python versions (currently, 3.8 to 3.10)
|
||||||
|
- uses: pypa/cibuildwheel@v2.1.1
|
||||||
|
with:
|
||||||
|
output-dir: dist
|
||||||
|
# Read about options here https://cibuildwheel.readthedocs.io/en/stable/options
|
||||||
|
env:
|
||||||
|
CIBW_ARCHS_MACOS: arm64
|
||||||
|
# Skip testing the arm64 builds
|
||||||
|
CIBW_TEST_SKIP: "*:arm64"
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: packages_macos
|
||||||
|
path: |
|
||||||
|
dist/*/*macosx_11_0_arm64.whl
|
||||||
|
|
Loading…
Reference in New Issue
Block a user