]> git.openstreetmap.org Git - nominatim.git/blob - .github/actions/build-nominatim/action.yml
Merge remote-tracking branch 'upstream/master' into collect_os_info.sh
[nominatim.git] / .github / actions / build-nominatim / action.yml
1 name: 'Build Nominatim'
2
3 inputs:
4     ubuntu:
5         description: 'Version of Ubuntu to install on'
6         required: false
7         default: '20'
8     cmake-args:
9         description: 'Additional options to hand to cmake'
10         required: false
11         default: ''
12
13 runs:
14     using: "composite"
15
16     steps:
17         - name: Clean out the disk
18           run: |
19             sudo rm -rf /opt/hostedtoolcache/go /opt/hostedtoolcache/CodeQL /usr/lib/jvm /usr/local/share/chromium /usr/local/lib/android
20             df -h
21           shell: bash
22         - name: Install prerequisites
23           run: |
24             sudo apt-get install -y -qq libboost-system-dev libboost-filesystem-dev libexpat1-dev zlib1g-dev libbz2-dev libpq-dev libproj-dev libicu-dev
25             if [ "x$UBUNTUVER" == "x18" ]; then
26                 pip3 install python-dotenv psycopg2==2.7.7 jinja2==2.8 psutil==5.4.2 pyicu osmium PyYAML==5.1 datrie
27             else
28                 sudo apt-get install -y -qq python3-icu python3-datrie python3-pyosmium python3-jinja2 python3-psutil python3-psycopg2 python3-dotenv python3-yaml
29             fi
30           shell: bash
31           env:
32             UBUNTUVER: ${{ inputs.ubuntu }}
33             CMAKE_ARGS: ${{ inputs.cmake-args }}
34
35         - name: Configure
36           run: mkdir build && cd build && cmake $CMAKE_ARGS ../Nominatim
37           shell: bash
38           env:
39             CMAKE_ARGS: ${{ inputs.cmake-args }}
40
41         - name: Build
42           run: |
43               make -j2 all
44               sudo make install
45           shell: bash
46           working-directory: build