actions: cache compiled osm2pgsql binary

This commit is contained in:
Sarah Hoffmann
2025-04-09 20:12:15 +02:00
parent 63b055283d
commit b47c8ccfb1

View File

@@ -68,8 +68,16 @@ jobs:
with: with:
dependencies: ${{ matrix.dependencies }} dependencies: ${{ matrix.dependencies }}
- uses: actions/cache@v4
with:
path: |
/usr/local/bin/osm2pgsql
key: osm2pgsql-bin-22-1
if: matrix.ubuntu == '22'
- name: Compile osm2pgsql - name: Compile osm2pgsql
run: | run: |
if [ ! -f /usr/local/bin/osm2pgsql ]; then
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 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
mkdir osm2pgsql-build mkdir osm2pgsql-build
cd osm2pgsql-build cd osm2pgsql-build
@@ -81,6 +89,9 @@ jobs:
sudo make install sudo make install
cd ../.. cd ../..
rm -rf osm2pgsql-build rm -rf osm2pgsql-build
else
sudo apt-get install -y -qq libexpat1 liblua${LUA_VERSION}
fi
if: matrix.ubuntu == '22' if: matrix.ubuntu == '22'
env: env:
LUA_VERSION: ${{ matrix.lua }} LUA_VERSION: ${{ matrix.lua }}