@@ -42,13 +42,13 @@ jobs:
42
42
- flavour : ubuntu-20
43
43
ubuntu : 20
44
44
postgresql : 12
45
- postgis : 3
46
45
lua : ' 5.1'
46
+ dependencies : pip
47
47
- flavour : ubuntu-24
48
48
ubuntu : 24
49
49
postgresql : 17
50
- postgis : 3
51
50
lua : ' 5.3'
51
+ dependencies : apt
52
52
53
53
runs-on : ubuntu-${{ matrix.ubuntu }}.04
54
54
@@ -60,58 +60,67 @@ jobs:
60
60
- name : Unpack Nominatim
61
61
run : tar xf nominatim-src.tar.bz2
62
62
63
- - uses : actions/setup-python@v5
64
- with :
65
- python-version : 3.7
66
- if : matrix.flavour == 'oldstuff'
67
-
68
63
- uses : ./Nominatim/.github/actions/setup-postgresql
69
64
with :
70
65
postgresql-version : ${{ matrix.postgresql }}
71
- postgis-version : ${{ matrix.postgis }}
72
66
73
67
- uses : ./Nominatim/.github/actions/build-nominatim
74
68
with :
75
- flavour : ${{ matrix.flavour }}
76
- lua : ${{ matrix.lua }}
69
+ dependencies : ${{ matrix.dependencies }}
77
70
78
- - name : Install test prerequisites
79
- run : pip3 install behave==1.2.6
71
+ - name : Compile osm2pgsql
72
+ run : |
73
+ sudo apt-get install -y -qq libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libbz2-dev libpq-dev libproj-dev libicu-dev liblua${LUA_VERSION}-dev lua-dkjson nlohmann-json3-dev
74
+ mkdir osm2pgsql-build
75
+ cd osm2pgsql-build
76
+ git clone https://github.com/osm2pgsql-dev/osm2pgsql
77
+ mkdir build
78
+ cd build
79
+ cmake ../osm2pgsql
80
+ make
81
+ sudo make install
82
+ cd ../..
83
+ rm -rf osm2pgsql-build
84
+ if : matrix.ubuntu == '20'
85
+ env :
86
+ LUA_VERSION : ${{ matrix.lua }}
80
87
81
88
- name : Install test prerequisites
82
- run : sudo apt-get install -y -qq python3-pytest python3-pytest-asyncio uvicorn
89
+ run : ./venv/bin/pip install behave==1.2.6
83
90
84
- - name : Install newer pytest-asyncio
85
- run : pip3 install -U pytest- asyncio
86
- if : matrix.flavour == 'ubuntu-20 '
91
+ - name : Install test prerequisites (apt)
92
+ run : sudo apt-get install -y -qq python3- pytest python3-pytest- asyncio uvicorn python3-falcon python3-aiosqlite python3-pyosmium
93
+ if : matrix.dependencies == 'apt '
87
94
88
- - name : Install Python webservers
89
- run : pip3 install falcon starlette asgi_lifespan
95
+ - name : Install test prerequisites (pip)
96
+ run : ./venv/bin/pip install pytest-asyncio falcon starlette asgi_lifespan aiosqlite osmium uvicorn
97
+ if : matrix.dependencies == 'pip'
90
98
91
99
- name : Install latest flake8
92
- run : pip3 install -U flake8
100
+ run : ./venv/bin/pip install -U flake8
93
101
94
102
- name : Python linting
95
- run : python3 -m flake8 src
103
+ run : ../venv/bin/python -m flake8 src
96
104
working-directory : Nominatim
97
105
106
+ - name : Install mypy and typechecking info
107
+ run : ./venv/bin/pip install -U mypy types-PyYAML types-jinja2 types-psutil types-requests types-ujson types-Pygments typing-extensions
108
+ if : matrix.dependencies == 'pip'
109
+
110
+ - name : Python static typechecking
111
+ run : ../venv/bin/python -m mypy --strict --python-version 3.8 src
112
+ working-directory : Nominatim
113
+ if : matrix.dependencies == 'pip'
114
+
98
115
- name : Python unit tests
99
- run : python3 -m pytest test/python
116
+ run : ../venv/bin/python -m pytest test/python
100
117
working-directory : Nominatim
101
118
102
119
- name : BDD tests
103
120
run : |
104
- export PATH=$GITHUB_WORKSPACE/build/osm2pgsql:$PATH
105
- python3 -m behave -DREMOVE_TEMPLATE=1 --format=progress3
121
+ ../../../venv/bin/python -m behave -DREMOVE_TEMPLATE=1 --format=progress3
106
122
working-directory : Nominatim/test/bdd
107
123
108
- - name : Install mypy and typechecking info
109
- run : pip3 install -U mypy osmium uvicorn types-PyYAML types-jinja2 types-psycopg2 types-psutil types-requests types-ujson types-Pygments typing-extensions
110
-
111
- - name : Python static typechecking
112
- run : python3 -m mypy --strict --python-version 3.8 src
113
- working-directory : Nominatim
114
-
115
124
install :
116
125
runs-on : ubuntu-latest
117
126
needs : create-archive
@@ -186,12 +195,10 @@ jobs:
186
195
- name : Add nominatim to path
187
196
run : |
188
197
sudo ln -s /home/nominatim/nominatim-venv/bin/nominatim /usr/local/bin/nominatim
189
- if : matrix.ubuntu == 24
190
198
191
199
- name : Need lua binary
192
200
run : |
193
201
sudo apt-get install -y lua5.4 lua-dkjson
194
- if : matrix.ubuntu == 24
195
202
196
203
- name : Print version
197
204
run : nominatim --version
@@ -221,19 +228,9 @@ jobs:
221
228
run : nominatim admin --warm
222
229
working-directory : /home/nominatim/nominatim-project
223
230
224
- - name : Prepare update (Ubuntu)
225
- run : apt-get install -y python3-pip
226
- shell : bash
227
-
228
- - name : Install osmium (Ubuntu 22)
229
- run : |
230
- pip3 install --user osmium
231
- if : matrix.ubuntu == 22
232
-
233
- - name : Install osmium (Ubuntu 24)
231
+ - name : Install osmium
234
232
run : |
235
233
/home/nominatim/nominatim-venv/bin/pip install osmium
236
- if : matrix.ubuntu == 24
237
234
238
235
- name : Run update
239
236
run : |
@@ -260,7 +257,7 @@ jobs:
260
257
working-directory : /home/nominatim/nominatim-project
261
258
262
259
install-no-superuser :
263
- runs-on : ubuntu-latest
260
+ runs-on : ubuntu-24.04
264
261
needs : create-archive
265
262
266
263
steps :
@@ -274,12 +271,8 @@ jobs:
274
271
- uses : ./Nominatim/.github/actions/setup-postgresql
275
272
with :
276
273
postgresql-version : 16
277
- postgis-version : 3
278
274
279
275
- uses : ./Nominatim/.github/actions/build-nominatim
280
- with :
281
- flavour : ubuntu-22
282
- lua : 5.3
283
276
284
277
- name : Prepare import environment
285
278
run : |
@@ -288,7 +281,7 @@ jobs:
288
281
289
282
- name : Prepare Database
290
283
run : |
291
- nominatim import --prepare-database
284
+ ./venv/bin/ nominatim import --prepare-database
292
285
293
286
- name : Create import user
294
287
run : |
@@ -298,10 +291,10 @@ jobs:
298
291
299
292
- name : Run import
300
293
run : |
301
- NOMINATIM_DATABASE_DSN="pgsql:host=127.0.0.1;dbname=nominatim;user=osm-import;password=osm-import" nominatim import --continue import-from-file --osm-file test.pbf
294
+ NOMINATIM_DATABASE_DSN="pgsql:host=127.0.0.1;dbname=nominatim;user=osm-import;password=osm-import" ./venv/bin/ nominatim import --continue import-from-file --osm-file test.pbf
302
295
303
296
- name : Check full import
304
- run : nominatim admin --check-database
297
+ run : ./venv/bin/ nominatim admin --check-database
305
298
306
299
migrate :
307
300
runs-on : ubuntu-24.04
@@ -318,7 +311,6 @@ jobs:
318
311
- uses : ./Nominatim/.github/actions/setup-postgresql
319
312
with :
320
313
postgresql-version : 17
321
- postgis-version : 3
322
314
323
315
- name : Install Python dependencies
324
316
run : |
0 commit comments