Skip to content

ci: fix GDAL numpy 2.0 ABI mismatch by disabling caching for gdal wheel#11

Merged
maurerle merged 1 commit into
mainfrom
fix_gdal
Jun 29, 2026
Merged

ci: fix GDAL numpy 2.0 ABI mismatch by disabling caching for gdal wheel#11
maurerle merged 1 commit into
mainfrom
fix_gdal

Conversation

@maurerle

@maurerle maurerle commented Jun 29, 2026

Copy link
Copy Markdown

User description

Enabled pip caching in both test and pages workflows for performance, but explicitly added --no-cache-dir to the GDAL pip install. This ensures the GDAL C-extensions are always built fresh against the current numpy and system libgdal-dev, preventing ImportError crashes when numpy upgrades (e.g. to 2.0).

Assisted-by: gemini-3.1-pro-low


PR Type

Bug fix, Enhancement


Description

  • Add pip caching to test workflow

  • Disable GDAL wheel caching in CI

  • Prevent numpy/GDAL ABI mismatch crashes


Diagram Walkthrough

flowchart LR
  A["GitHub Actions workflows"] --> B["Enable pip cache"]
  A["GitHub Actions workflows"] --> C["Install GDAL from system version"]
  C["Install GDAL from system version"] --> D["Use --no-cache-dir for GDAL"]
  D["Use --no-cache-dir for GDAL"] --> E["Avoid numpy ABI mismatch"]
Loading

File Walkthrough

Relevant files
Bug fix
gh-pages.yml
Force uncached GDAL install for Pages                                       

.github/workflows/gh-pages.yml

  • Install GDAL with --no-cache-dir
  • Ensure fresh GDAL build against env
+1/-1     
Enhancement
python-test.yml
Cache pip deps, avoid cached GDAL wheels                                 

.github/workflows/python-test.yml

  • Enable pip caching via actions/setup-python
  • Configure cache key with **/pyproject.toml
  • Install GDAL with --no-cache-dir
+3/-1     

Enabled pip caching in both test and pages workflows for performance, but explicitly added --no-cache-dir to the GDAL pip install. This ensures the GDAL C-extensions are always built fresh against the current numpy and system libgdal-dev, preventing ImportError crashes when numpy upgrades (e.g. to 2.0).

Assisted-by: gemini-3.1-pro-low
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

No code suggestions found for the PR.

@maurerle
maurerle merged commit f4e54cf into main Jun 29, 2026
6 checks passed
@maurerle
maurerle deleted the fix_gdal branch June 29, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant