@@ -54,36 +54,60 @@ jobs:
54
54
needs : [build-sdist]
55
55
runs-on : ubuntu-latest
56
56
container :
57
- image : " ghcr.io/osgeo/gdal:ubuntu-small-3.8.5 "
57
+ image : " ghcr.io/osgeo/gdal:ubuntu-small-3.9.2 "
58
58
59
59
steps :
60
+ - name : Install packages
61
+ run : |
62
+ apt-get update && apt-get install -y build-essential python3-dev
63
+
64
+ - name : Create virtual environment
65
+ # install uv and use it to create a virtual environment, then add it to
66
+ # environment variables so that it is automatically activated and can be
67
+ # used for tests below
68
+ run : |
69
+ curl -LsSf https://astral.sh/uv/install.sh | sh
70
+ . $HOME/.cargo/env
71
+ uv venv .venv
72
+ echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
73
+ echo "$PWD/.venv/bin" >> $GITHUB_PATH
74
+
60
75
- name : Download sdist from artifacts
61
76
uses : actions/download-artifact@v4
62
77
with :
63
78
name : pyogrio-sdist
64
79
path : wheelhouse
65
80
66
- - name : Install pip
67
- run : |
68
- apt-get update && apt-get install -y python3-pip
69
-
70
81
- name : Build from sdist and install test dependencies
71
82
shell : bash
72
83
run : |
73
- python3 -m pip install --no-cache-dir wheelhouse/*.tar.gz
74
- python3 -m pip install --no-cache-dir pytest pandas pyproj shapely>=2
75
- python3 -m pip install --no-cache-dir --no-deps geopandas
76
- python3 -m pip list
84
+ uv pip install --no-cache wheelhouse/*.tar.gz
85
+ uv pip install pytest pandas pyproj shapely>=2
86
+ uv pip install --no-deps geopandas
87
+ uv pip list
77
88
78
89
- name : Run tests
79
90
shell : bash
91
+ # virtual environment is automatically activated
80
92
run : |
81
93
cd ..
82
- python3 -m pytest --pyargs pyogrio.tests -v
94
+ uv run python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')"
95
+ uv run python -m pytest --pyargs pyogrio.tests -v
83
96
84
97
build-wheels-linux :
85
98
name : Build wheels on Linux
86
- runs-on : " ubuntu-20.04"
99
+ runs-on : " ubuntu-latest"
100
+ strategy :
101
+ fail-fast : false
102
+ matrix :
103
+ include :
104
+ # use manylinux2014 for older glibc platforms until discontinued
105
+ - wheel_name : " pyogrio-wheel-linux-manylinux2014_x86_64"
106
+ container : " ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile"
107
+
108
+ # use manylinux_2_28 for any platforms with glibc>=2.28
109
+ - wheel_name : " pyogrio-wheel-linux-manylinux_2_28_x86_64"
110
+ container : " ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile"
87
111
88
112
steps :
89
113
- name : Checkout
@@ -103,7 +127,7 @@ jobs:
103
127
uses : docker/build-push-action@v6
104
128
with :
105
129
context : .
106
- file : ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile
130
+ file : ${{ matrix.container }}
107
131
tags : manylinux-vcpkg-gdal:latest
108
132
push : false
109
133
load : true
@@ -117,7 +141,7 @@ jobs:
117
141
118
142
- uses : actions/upload-artifact@v4
119
143
with :
120
- name : pyogrio-wheel-linux
144
+ name : ${{ matrix.wheel_name }}
121
145
path : ./wheelhouse/*.whl
122
146
compression-level : 0
123
147
@@ -129,7 +153,7 @@ jobs:
129
153
matrix :
130
154
include :
131
155
- os : " macos-12"
132
- triplet : " x64-osx-dynamic"
156
+ triplet : " x64-osx-dynamic-release "
133
157
arch : x86_64
134
158
vcpkg_cache : " /Users/runner/.cache/vcpkg/archives"
135
159
vcpkg_logs : " /usr/local/share/vcpkg/buildtrees/**/*.log"
@@ -160,7 +184,7 @@ jobs:
160
184
path : |
161
185
${{ matrix.vcpkg_cache }}
162
186
# bump the last digit to avoid using previous build cache
163
- key : ${{ matrix.os }}-${{ matrix.arch }}-vcpkg-gdal3.8.5 -cache0
187
+ key : ${{ matrix.os }}-${{ matrix.arch }}-vcpkg-gdal3.9.2 -cache0
164
188
165
189
# MacOS build requires aclocal, which is part of automake, but appears
166
190
# to be missing in default image
@@ -176,9 +200,9 @@ jobs:
176
200
cd $VCPKG_INSTALLATION_ROOT
177
201
# on mac the clone is not clean, otherwise git pull fails
178
202
git reset --hard
179
- # pull latest version to ensure the required commit with GDAL 3.8 is available
203
+ # pull specific commit with desired GDAL version
180
204
git pull
181
- git checkout 4f4a1821b2e8c7a2863e4df65a4d514f84144049
205
+ git checkout 73794ce5f63fd138fab999a22959ca7c6305d93c
182
206
183
207
- name : Install GDAL
184
208
env :
@@ -215,17 +239,28 @@ jobs:
215
239
strategy :
216
240
fail-fast : false
217
241
matrix :
218
- os : ["ubuntu-20.04", "windows-latest", "macos-12", "macos-latest"]
242
+ os :
243
+ [
244
+ " ubuntu-latest" ,
245
+ " ubuntu-20.04" ,
246
+ " windows-latest" ,
247
+ " macos-12" ,
248
+ " macos-latest" ,
249
+ ]
219
250
python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
220
251
include :
252
+ - os : " ubuntu-latest"
253
+ artifact : pyogrio-wheel-linux-manylinux2014_x86_64
254
+ - os : " ubuntu-latest"
255
+ artifact : pyogrio-wheel-linux-manylinux_2_28_x86_64
221
256
- os : " ubuntu-20.04"
222
- artifact : pyogrio-wheel-linux
257
+ artifact : pyogrio-wheel-linux-manylinux_2_28_x86_64
223
258
- os : " windows-latest"
224
259
artifact : pyogrio-wheel-x64-windows-dynamic-release
225
260
- os : " macos-12"
226
- artifact : pyogrio-wheel-x64-osx-dynamic
261
+ artifact : pyogrio-wheel-x64-osx-dynamic-release
227
262
- os : " macos-latest"
228
- artifact : pyogrio-wheel-x64 -osx-dynamic
263
+ artifact : pyogrio-wheel-arm64 -osx-dynamic-release
229
264
230
265
steps :
231
266
- name : Checkout
@@ -236,8 +271,27 @@ jobs:
236
271
with :
237
272
python-version : ${{ matrix.python-version }}
238
273
allow-prereleases : true
239
- cache : " pip"
240
- cache-dependency-path : " ci/requirements-wheel-test.txt"
274
+
275
+ - name : Create virtual environment (Linux / MacOS)
276
+ # install uv and use it to create a virtual environment, then add it to
277
+ # environment variables so that it is automatically activated and can be
278
+ # used for tests below
279
+ if : ${{ runner.os != 'Windows' }}
280
+ shell : bash
281
+ run : |
282
+ curl -LsSf https://astral.sh/uv/install.sh | sh
283
+ . $HOME/.cargo/env
284
+ uv venv .venv
285
+ echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
286
+ echo "$PWD/.venv/bin" >> $GITHUB_PATH
287
+
288
+ - name : Create virtual environment (Windows)
289
+ if : ${{ runner.os == 'Windows' }}
290
+ run : |
291
+ irm https://astral.sh/uv/install.ps1 | iex
292
+ uv venv .venv
293
+ "VIRTUAL_ENV=.venv" | Out-File -FilePath $env:GITHUB_ENV -Append
294
+ "$PWD/.venv/Scripts" | Out-File -FilePath $env:GITHUB_PATH -Append
241
295
242
296
- name : Download wheels from artifacts
243
297
uses : actions/download-artifact@v4
@@ -248,19 +302,20 @@ jobs:
248
302
- name : Install dependencies and pyogrio wheel
249
303
shell : bash
250
304
run : |
251
- python -m pip install -r ci/requirements-wheel-test.txt
305
+ uv pip install -r ci/requirements-wheel-test.txt
306
+ uv pip install --no-cache --pre --no-index --find-links wheelhouse pyogrio
252
307
if [ ${{ matrix.python-version }} != "3.12" ]; then
253
- python -m pip install --no-deps geopandas
308
+ uv pip install --no-deps geopandas
254
309
fi
255
- python -m pip install --pre --find-links wheelhouse pyogrio
256
- python -m pip list
310
+ uv pip list
257
311
258
312
- name : Run tests
259
313
shell : bash
314
+ # virtual environment is automatically activated
260
315
run : |
261
316
cd ..
262
- python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')"
263
- python -m pytest --pyargs pyogrio.tests -v
317
+ uv run python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')"
318
+ uv run python -m pytest --pyargs pyogrio.tests -v
264
319
265
320
publish :
266
321
name : Publish pyogrio to GitHub / PyPI
0 commit comments