forked from psycopg/psycopg2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(macos): Avoid linking against homebrew
Homebrew binaries are always compiled for exactly the version they're installed on making them very un-portable. When a wheel is "repaired" by cibuildwheel, delocate-wheel pulls in _psycopg's dependencies (libpq.dylib, libssl.dylib and libcrypto.dylib) which, on a GitHub Actions macOS 14 runner, are provided by Homebrew and are therefore only macOS >= 14 compatible. The resultant wheel is therefore incompatible with all but the latest macOS versions. Build all dependencies from source so that we can set the deployment target to something sensible. Fixes psycopg#1753.
- Loading branch information
Showing
3 changed files
with
93 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,12 @@ on: | |
|
||
env: | ||
PIP_BREAK_SYSTEM_PACKAGES: "1" | ||
LIBPQ_VERSION: "16.0" | ||
OPENSSL_VERSION: "1.1.1w" | ||
|
||
jobs: | ||
build-sdist: | ||
if: true | ||
if: false | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -58,16 +60,12 @@ jobs: | |
build-linux: | ||
if: true | ||
|
||
env: | ||
LIBPQ_VERSION: "16.0" | ||
OPENSSL_VERSION: "1.1.1w" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [manylinux, musllinux] | ||
arch: [x86_64, i686, aarch64, ppc64le] | ||
pyver: [cp38, cp39, cp310, cp311, cp312, cp313] | ||
arch: [x86_64] #, i686, aarch64, ppc64le] | ||
pyver: [cp38] #, cp39, cp310, cp311, cp312, cp313] | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -140,18 +138,12 @@ jobs: | |
matrix: | ||
# These archs require an Apple M1 runner: [arm64, universal2] | ||
arch: [x86_64] | ||
pyver: [cp38, cp39, cp310, cp311, cp312, cp313] | ||
pyver: [cp38, cp313] | ||
macver: ["12"] | ||
include: | ||
- arch: arm64 | ||
pyver: cp310 | ||
macver: "14" | ||
- arch: arm64 | ||
pyver: cp311 | ||
macver: "14" | ||
- arch: arm64 | ||
pyver: cp312 | ||
macver: "14" | ||
- arch: arm64 | ||
pyver: cp313 | ||
macver: "14" | ||
|
@@ -160,6 +152,9 @@ jobs: | |
- name: Checkout repos | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build dependencies | ||
run: ./scripts/build/build_libpq.sh | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
|
@@ -170,12 +165,11 @@ jobs: | |
export PYTHONPATH={project} && | ||
python -c "import tests; tests.unittest.main(defaultTest='tests.test_suite')" | ||
CIBW_ENVIRONMENT: >- | ||
MACOSX_DEPLOYMENT_TARGET=${{ matrix.macver }}.0 | ||
PG_VERSION=16 | ||
PACKAGE_NAME=psycopg2-binary | ||
PSYCOPG2_TESTDB=postgres | ||
PSYCOPG2_TEST_FAST=1 | ||
PATH="/usr/local/opt/postgresql@${PG_VERSION}/bin:$PATH" | ||
PATH="/tmp/libpq.build/bin:$PATH" | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ on: | |
|
||
jobs: | ||
tests: | ||
if: false | ||
name: Unit tests run | ||
runs-on: ubuntu-latest | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters