mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-29 09:29:46 +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
29
.github/workflows/packages.yml
vendored
29
.github/workflows/packages.yml
vendored
|
@ -3,7 +3,6 @@ name: Build packages
|
|||
on:
|
||||
- workflow_dispatch
|
||||
|
||||
|
||||
jobs:
|
||||
build-sdist:
|
||||
strategy:
|
||||
|
@ -51,7 +50,6 @@ jobs:
|
|||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
|
||||
build-manylinux:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -107,13 +105,12 @@ jobs:
|
|||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
|
||||
|
||||
build-macos:
|
||||
runs-on: macos-10.15
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ['3.6', '3.7', '3.8', '3.9']
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9"]
|
||||
|
||||
steps:
|
||||
- name: Checkout repos
|
||||
|
@ -137,3 +134,27 @@ jobs:
|
|||
name: packages_macos
|
||||
path: |
|
||||
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