Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BLD: assorted cleanups in release workflow #467

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ jobs:
shell: bash
# virtual environment is automatically activated
run: |
cd ..
uv run python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')"
uv run python -m pytest --pyargs pyogrio.tests -v

Expand Down Expand Up @@ -131,8 +130,8 @@ jobs:
tags: manylinux-vcpkg-gdal:latest
push: false
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=${{ matrix.container }}
cache-to: type=gha,mode=max,scope=${{ matrix.container }}
env:
BUILDKIT_PROGRESS: plain

Expand All @@ -158,7 +157,7 @@ jobs:
vcpkg_cache: "/Users/runner/.cache/vcpkg/archives"
vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log"

- os: "macos-13"
- os: "macos-14"
triplet: "arm64-osx-dynamic-release"
arch: arm64
vcpkg_cache: "/Users/runner/.cache/vcpkg/archives"
Expand Down Expand Up @@ -194,22 +193,19 @@ jobs:
brew reinstall automake
echo $(which aclocal)

- name: Checkout specific version of vcpkg
shell: bash
run: |
cd $VCPKG_INSTALLATION_ROOT
# on mac the clone is not clean, otherwise git pull fails
git reset --hard
# pull specific commit with desired GDAL version
git pull
git checkout 0857a4b08c14030bbe41e80accb2b1fddb047a74
- name: Install vcpkg and checkout specific version
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: 0857a4b08c14030bbe41e80accb2b1fddb047a74

- name: Install GDAL
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
VCPKG_INSTALLATION_ROOT: ${{ github.workspace }}/vcpkg
shell: bash
run: |
vcpkg install --overlay-triplets=./ci/custom-triplets --feature-flags="versions,manifests" --x-manifest-root=./ci --x-install-root=$VCPKG_INSTALLATION_ROOT/installed
vcpkg install --overlay-triplets=./ci/custom-triplets --feature-flags="versions,manifests" --x-manifest-root=./ci --x-install-root=$VCPKG_INSTALLATION_ROOT/installed --debug
vcpkg list

- name: Upload vcpkg build logs
Expand All @@ -224,6 +220,7 @@ jobs:
env:
# CIBW needs to know triplet for the correct install path
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
VCPKG_INSTALLATION_ROOT: ${{ github.workspace }}/vcpkg
CIBW_ARCHS: ${{ matrix.arch }}

- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -265,6 +262,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: ci/requirements-wheel-test.txt
sparse-checkout-cone-mode: false

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -282,8 +282,6 @@ jobs:
if: ${{ runner.os != 'Windows' }}
run: |
uv venv .venv
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH

- name: Create virtual environment (Windows)
if: ${{ runner.os == 'Windows' }}
Expand Down Expand Up @@ -316,7 +314,6 @@ jobs:
shell: bash
# virtual environment is automatically activated
run: |
cd ..
uv run python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')"
uv run python -m pytest --pyargs pyogrio.tests -v

Expand Down
2 changes: 1 addition & 1 deletion ci/custom-triplets/arm64-osx-dynamic-release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)
set(VCPKG_BUILD_TYPE release)
set(VCPKG_OSX_DEPLOYMENT_TARGET "12.0")
set(VCPKG_OSX_DEPLOYMENT_TARGET "14.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want this to be our minimum supported version of MacOS, even if we're building on a newer MacOS runner. So this should probably be 13 since 12 is now past EOL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like MACOSX_DEPLOYMENT_TARGET is getting ignored during the build because it looks like we are building wheels for only >= 14 (per the errors from when repairing the wheel). I don't recall this being an issue before, so it might be that we're not setting this when using the lukka/run-vcpkg@v11 action?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I read that wrong. This is setting 14 as the minimum version we build for, but we were still expecting MACOSX_DEPLOYMENT_TARGET to be 12 in pyproject.toml.


set(VCPKG_LIBRARY_LINKAGE static)
if(PORT MATCHES "gdal")
Expand Down
9 changes: 4 additions & 5 deletions ci/requirements-wheel-test.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# pytest 8.0 gives permission error (https://github.com/pytest-dev/pytest/issues/11904)
pytest<8
pytest
# dependencies of geopandas (installed separately with --no-deps to avoid fiona)
pandas
pyproj ; (python_version < '3.12') or (python_full_version >= '3.12.1')
shapely>=2 ; (python_version < '3.12') or (python_full_version >= '3.12.1')
pyproj
shapely>=2
packaging
# optional test dependencies
pyarrow ; (python_version < '3.12') or (python_full_version >= '3.12.1')
pyarrow
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MACOSX_DEPLOYMENT_TARGET = "12.0"

[tool.cibuildwheel.windows]
before-build = "pip install delvewheel"
repair-wheel-command = "delvewheel repair --add-path C:/vcpkg/installed/x64-windows-dynamic-release/bin -w {dest_dir} {wheel}"
repair-wheel-command = "delvewheel repair --add-path $VCPKG_INSTALLATION_ROOT/installed/x64-windows-dynamic-release/bin -w {dest_dir} {wheel}"

[tool.cibuildwheel.windows.environment]
VCPKG_INSTALL = "$VCPKG_INSTALLATION_ROOT/installed/x64-windows-dynamic-release"
Expand Down
Loading