Skip to content

Merge pull request #319 from pgRouting/develop #24

Merge pull request #319 from pgRouting/develop

Merge pull request #319 from pgRouting/develop #24

Workflow file for this run

name: Build for Ubuntu
# manually triggered workflow
on:
workflow_dispatch:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: Ubuntu psql
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
psql: [13, 14, 15, 16, 17, 18]
postgis: [3]
release: [Debug, Release]
os: [ubuntu-latest, ubuntu-22.04]
compiler: [ gcc-latest, g++-11, clang ]
steps:
- uses: actions/checkout@v5
- name: 'Raise Priority for apt.postgresql.org'
run: |
cat << EOF >> ./pgdg.pref
Package: *
Pin: release o=apt.postgresql.org
Pin-Priority: 600
EOF
sudo mv ./pgdg.pref /etc/apt/preferences.d/
sudo apt update
- name: Add PostgreSQL APT repository
run: |
sudo apt-get -y purge postgresql-*
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg-testing main ${{ matrix.psql }}" > /etc/apt/sources.list.d/pgdg.list'
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
- name: Install compiler
id: install_cc
uses: rlalik/setup-cpp-compiler@master
with:
compiler: ${{ matrix.compiler }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libboost-program-options-dev \
libtap-parser-sourcehandler-pgtap-perl \
postgresql-${{ matrix.psql }} \
postgresql-${{ matrix.psql }}-pgtap \
postgresql-${{ matrix.psql }}-postgis-${{ matrix.postgis }} \
postgresql-${{ matrix.psql }}-postgis-${{ matrix.postgis }}-scripts \
postgresql-${{ matrix.psql }}-pgrouting \
libpqxx-dev \
postgresql-server-dev-${{ matrix.psql }}
# should be 7 on latest and 6 on 22.04
apt-cache policy libpqxx-dev
- name: Configure compiler
run: |
export CC=/usr/bin/${{ steps.install_cc.outputs.cc }}
export CXX=/usr/bin/${{ steps.install_cc.outputs.cxx }}
export PATH=/usr/lib/postgresql/${{ matrix.psql }}/bin:$PATH
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.release }} ..
- name: Build
run: |
cd build
make -j 4
sudo make install