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 11 commits into
base: main
Choose a base branch
from
40 changes: 14 additions & 26 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-12"
- os: "macos-14"
triplet: "arm64-osx-dynamic-release"
arch: arm64
vcpkg_cache: "/Users/runner/.cache/vcpkg/archives"
Expand All @@ -177,15 +176,6 @@ jobs:
with:
fetch-depth: 0

- name: Cache vcpkg
uses: actions/cache@v4
id: vcpkgcache
with:
path: |
${{ matrix.vcpkg_cache }}
# bump the last digit to avoid using previous build cache
key: ${{ matrix.os }}-${{ matrix.arch }}-vcpkg-gdal3.9.2-cache0

# MacOS build requires aclocal, which is part of automake, but appears
# to be missing in default image
- name: Reinstall automake
Expand All @@ -194,22 +184,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 73794ce5f63fd138fab999a22959ca7c6305d93c
- name: Install vcpkg and checkout specific version
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: 73794ce5f63fd138fab999a22959ca7c6305d93c

- 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 +211,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 +253,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 +273,6 @@ jobs:
curl -LsSf https://astral.sh/uv/install.sh | sh
. $HOME/.cargo/env
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 @@ -313,7 +302,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")

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 @@ -41,7 +41,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