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 all 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
29 changes: 13 additions & 16 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 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
1 change: 1 addition & 0 deletions ci/custom-triplets/arm64-osx-dynamic-release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set(VCPKG_BUILD_TYPE release)
set(VCPKG_OSX_DEPLOYMENT_TARGET "12.0")

set(VCPKG_LIBRARY_LINKAGE static)

if(PORT MATCHES "gdal")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
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