Skip to content

Commit c0e785a

Browse files
committed
CI: switch to pip install for Nominatim
1 parent 3796fc2 commit c0e785a

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

.github/workflows/ci.yml

+18-17
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ jobs:
3232

3333
import:
3434
name: Import OSM data from Nominatim into Photon
35-
runs-on: ubuntu-22.04
35+
runs-on: ubuntu-24.04
3636

3737
steps:
3838
- uses: actions/checkout@v4
3939

40-
- name: Setup Java 11
40+
- name: Setup Java 21
4141
uses: actions/setup-java@v4
4242
with:
4343
distribution: 'temurin'
44-
java-version: 11
44+
java-version: 21
4545
cache: 'gradle'
4646

4747
- name: Compile project
@@ -50,7 +50,6 @@ jobs:
5050
- uses: actions/checkout@v4
5151
with:
5252
repository: osm-search/Nominatim
53-
submodules: true
5453
path: Nominatim
5554

5655
- name: Get Date
@@ -64,19 +63,18 @@ jobs:
6463
monaco-latest.osm.pbf
6564
key: nominatim-test-data-${{ env.cache_key }}
6665

67-
- name: Install prerequisits
66+
- name: Install prerequisites
6867
run: |
6968
sudo apt-get update -qq
70-
sudo apt-get install -y -qq libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libbz2-dev libpq-dev libproj-dev liblua5.3-dev lua5.3 python3-psycopg2 python3-pyosmium python3-dotenv python3-psutil python3-jinja2 python3-icu python3-datrie postgresql-14-postgis-3 postgresql-client-14 postgresql-14 postgresql-14-postgis-3-scripts nlohmann-json3-dev
71-
pip3 install sqlalchemy GeoAlchemy2 psycopg
69+
sudo apt-get install -y -qq osm2pgsql postgresql-postgis virtualenv pkg-config libicu-dev
7270
shell: bash
7371

7472
- name: Setup database
7573
run: |
76-
echo 'fsync = off' | sudo tee /etc/postgresql/14/main/conf.d/local.conf
77-
echo 'synchronous_commit = off' | sudo tee -a /etc/postgresql/14/main/conf.d/local.conf
78-
echo 'full_page_writes = off' | sudo tee -a /etc/postgresql/14/main/conf.d/local.conf
79-
echo 'shared_buffers = 512MB' | sudo tee -a /etc/postgresql/14/main/conf.d/local.conf
74+
echo 'fsync = off' | sudo tee /etc/postgresql/16/main/conf.d/local.conf
75+
echo 'synchronous_commit = off' | sudo tee -a /etc/postgresql/16/main/conf.d/local.conf
76+
echo 'full_page_writes = off' | sudo tee -a /etc/postgresql/16/main/conf.d/local.conf
77+
echo 'shared_buffers = 512MB' | sudo tee -a /etc/postgresql/16/main/conf.d/local.conf
8078
sudo systemctl start postgresql
8179
sudo -u postgres createuser -S www-data
8280
sudo -u postgres createuser -s runner
@@ -93,8 +91,11 @@ jobs:
9391
shell: bash
9492

9593
- name: Build Nominatim
96-
run: mkdir nomin-build && cd nomin-build && cmake -DBUILD_MODULE=off ../Nominatim && make -j2 && sudo make install
94+
run: |
95+
virtualenv ~/venv
96+
~/venv/bin/pip install packaging/nominatim-db
9797
shell: bash
98+
working-directory: Nominatim
9899

99100
- name: Prepare import environment
100101
run: |
@@ -106,9 +107,8 @@ jobs:
106107

107108
- name: Import Nominatim
108109
run: |
109-
export NOMINATIM_TOKENIZER=icu
110-
nominatim import --osm-file ../monaco-latest.osm.pbf --reverse-only
111-
nominatim admin --check-database
110+
~/venv/bin/nominatim import --osm-file ../monaco-latest.osm.pbf --reverse-only
111+
~/venv/bin/nominatim admin --check-database
112112
shell: bash
113113
working-directory: data-env
114114

@@ -120,8 +120,9 @@ jobs:
120120
121121
- name: Update Nominatim
122122
run: |
123-
nominatim replication --init
124-
nominatim replication --once
123+
~/venv/bin/pip install osmium
124+
~/venv/bin/nominatim replication --init
125+
~/venv/bin/nominatim replication --once
125126
shell: bash
126127
working-directory: data-env
127128
env:

0 commit comments

Comments
 (0)