diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe36ba9f..bc201bb4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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' }} @@ -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 diff --git a/ci/custom-triplets/arm64-osx-dynamic-release.cmake b/ci/custom-triplets/arm64-osx-dynamic-release.cmake index def957a4..35d3a2e3 100644 --- a/ci/custom-triplets/arm64-osx-dynamic-release.cmake +++ b/ci/custom-triplets/arm64-osx-dynamic-release.cmake @@ -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() diff --git a/ci/requirements-wheel-test.txt b/ci/requirements-wheel-test.txt index 35704e3a..b9000e60 100644 --- a/ci/requirements-wheel-test.txt +++ b/ci/requirements-wheel-test.txt @@ -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 diff --git a/pyproject.toml b/pyproject.toml index c448ac80..3490a0e4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"