Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/scripts/setup_pg_repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
# This file is part of the pgRouting project.
# Copyright (c) 2021-2026 pgRouting developers
# License: GPL-2 See https://github.com/pgRouting/pgrouting/blob/main/LICENSE

# Set up the PostgreSQL APT repository
# Usage: setup_pg_repo.sh [--testing]
# --testing use the *-pgdg-testing suite (pre-release versions)

set -euo pipefail

# Raise priority for apt.postgresql.org
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

TESTING=""
for arg in "$@"; do
case "$arg" in
--testing) TESTING="-t" ;;
*) echo "Unknown option: $arg" >&2; exit 1 ;;
esac
done

sudo apt-get -y purge postgresql-* || true
sudo apt-get install -y postgresql-common ca-certificates
if [ -n "$TESTING" ]; then
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -t -y
else
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
fi
16 changes: 10 additions & 6 deletions .github/workflows/boost_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,7 @@ jobs:
sudo -u postgres psql -p "${PG_PORT}" -c "CREATE DATABASE \"${PG_USER}\";"

- name: Add PostgreSQL APT repository
run: |
sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
run: .github/scripts/setup_pg_repo.sh --testing

- name: Install dependencies
run: |
Expand Down Expand Up @@ -126,10 +122,18 @@ jobs:
make -j 4
sudo make install

- name: Recreate runner role after reinstall
run: |
sudo service postgresql start
PG_USER=$(whoami)
sudo -u postgres psql -p 5432 -c "DROP ROLE IF EXISTS \"${PG_USER}\";" || true
sudo -u postgres psql -p 5432 -c "CREATE ROLE \"${PG_USER}\" WITH LOGIN SUPERUSER;" || true
sudo -u postgres psql -p 5432 -c "CREATE DATABASE \"${PG_USER}\";" 2>/dev/null || true

- name: Test
run: |
sudo service postgresql start
psql -c "CREATE DATABASE ___pgr___test___;"
DIR=$(git rev-parse --show-toplevel)
bash "${DIR}/tools/testers/setup_db.sh" "${PGPORT}" ___pgr___test___ "${PG_RUNNER_USER}" "4.0.2"
bash "${DIR}/tools/testers/setup_db.sh" "${PGPORT}" ___pgr___test___ "${PG_RUNNER_USER}" "4.0.3"
pg_prove -Q -f --normalize --directives --recurse -U "${PG_RUNNER_USER}" -d ___pgr___test___ "pgtap"
6 changes: 1 addition & 5 deletions .github/workflows/check-queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ jobs:
echo "PGIS=3" >> $GITHUB_ENV

- name: Add PostgreSQL APT repository
run: |
sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
run: .github/scripts/setup_pg_repo.sh --testing

- name: Install dependencies
run: |
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
fail-fast: false
matrix:
release: [Debug, Release]
os: [ubuntu-latest, ubuntu-22.04]
os: [ubuntu-latest, ubuntu-24.04, ubuntu-22.04]

steps:
- uses: actions/checkout@v7
Expand All @@ -70,21 +70,8 @@ jobs:
echo "PGIS=3" >> $GITHUB_ENV
echo "PGPORT=5432" >> $GITHUB_ENV

- 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 ${PGVER}" > /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
run: .github/scripts/setup_pg_repo.sh --testing

- name: Install dependencies
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/doc-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ jobs:

- name: Add PostgreSQL APT repository
if: env.PROCESS == 'true'
run: |
sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
run: .github/scripts/setup_pg_repo.sh

- name: Install python
if: env.PROCESS == 'true'
Expand All @@ -117,6 +113,7 @@ jobs:
postgresql-${PGVER} \
postgresql-server-dev-${PGVER} \
graphviz $(apt-cache pkgnames libgvplugin-neato-layout | grep -v -- -dev)
sudo service postgresql start

- name: Configure
if: env.PROCESS == 'true'
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ jobs:
echo "GIT_HASH=$git_hash" >> $GITHUB_ENV

- name: Add PostgreSQL APT repository
run: |
sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
run: .github/scripts/setup_pg_repo.sh

- name: Install python
uses: actions/setup-python@v7
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,13 @@ jobs:
psql: [13, 14, 15, 16, 17, 18]
postgis: [3]
release: [Debug, Release]
os: [ubuntu-latest, ubuntu-22.04]
os: [ubuntu-latest, ubuntu-24.04, ubuntu-22.04]

steps:
- uses: actions/checkout@v7

- 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
run: .github/scripts/setup_pg_repo.sh --testing

- name: Install dependencies
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/update-locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ jobs:
echo "PGVER=${pgver}" >> $GITHUB_ENV

- name: Add PostgreSQL APT repository
run: |
sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
run: .github/scripts/setup_pg_repo.sh

- name: Install dependencies
run: |
Expand All @@ -66,6 +62,7 @@ jobs:
postgresql-${PGVER} \
postgresql-server-dev-${PGVER} \
graphviz $(apt-cache pkgnames libgvplugin-neato-layout | grep -v -- -dev)
sudo service postgresql start
python3 -m pip install --break-system-packages sphinx sphinx-bootstrap-theme

- name: Initialize mandatory git config
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
fail-fast: false
matrix:
boost_minor: [56]
old_pgr: [4.0.1, 4.0.0, 3.8.0, 3.7.3, 3.7.2, 3.7.1, 3.7.0, 3.6.3, 3.6.2, 3.6.1, 3.6.0, 3.5.1, 3.5.0, 3.4.2, 3.4.1, 3.4.0, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.6, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0, 3.2.1, 3.2.2]
old_pgr: [4.0.2, 4.0.1, 4.0.0, 3.8.0, 3.7.3, 3.7.2, 3.7.1, 3.7.0, 3.6.3, 3.6.2, 3.6.1, 3.6.0, 3.5.1, 3.5.0, 3.4.2, 3.4.1, 3.4.0, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.6, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0, 3.2.1, 3.2.2]

steps:
- uses: actions/checkout@v7
Expand All @@ -70,16 +70,7 @@ jobs:
sudo -u postgres psql -p "${PG_PORT}" -c "CREATE DATABASE \"${PG_USER}\";"

- name: Add PostgreSQL APT repository
run: |
sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

- name: Install python
uses: actions/setup-python@v7
with:
python-version: '3.x'
run: .github/scripts/setup_pg_repo.sh

- name: Install dependencies
run: |
Expand All @@ -96,6 +87,14 @@ jobs:
sudo tar --bzip2 -xf boost_1_${{ matrix.boost_minor }}_0.tar.bz2
sudo mv boost_1_${{ matrix.boost_minor }}_0/boost /usr/include/

- name: Recreate runner role after reinstall
run: |
sudo service postgresql start
PG_USER=$(whoami)
sudo -u postgres psql -p 5432 -c "DROP ROLE IF EXISTS \"${PG_USER}\";" || true
sudo -u postgres psql -p 5432 -c "CREATE ROLE \"${PG_USER}\" WITH LOGIN SUPERUSER;" || true
sudo -u postgres psql -p 5432 -c "CREATE DATABASE \"${PG_USER}\";" 2>/dev/null || true

- name: get old version
uses: actions/checkout@v7
with:
Expand Down Expand Up @@ -149,6 +148,6 @@ jobs:
run: |
sudo service postgresql start
psql -p "${PGPORT}" -d ___pgr___test___ -c "SELECT * FROM pgr_full_version();"
psql -p "${PGPORT}" -d ___pgr___test___ -c "ALTER EXTENSION pgrouting UPDATE TO '4.0.2';"
psql -p "${PGPORT}" -d ___pgr___test___ -c "ALTER EXTENSION pgrouting UPDATE TO '4.0.3';"
psql -p "${PGPORT}" -d ___pgr___test___ -c "SELECT * FROM pgr_full_version();"
pg_prove -Q -f --normalize --directives --recurse -U "${PG_RUNNER_USER}" -d ___pgr___test___ "pgtap"
7 changes: 2 additions & 5 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ jobs:
echo "GIT_HASH=$git_hash" >> $GITHUB_ENV

- name: Add PostgreSQL APT repository
run: |
sudo apt-get install curl ca-certificates gnupg
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
run: .github/scripts/setup_pg_repo.sh

- name: Install python
uses: actions/setup-python@v7
Expand All @@ -75,6 +71,7 @@ jobs:
postgresql-server-dev-${PGVER} \
graphviz $(apt-cache pkgnames libgvplugin-neato-layout | grep -v -- -dev) \
doxygen
sudo service postgresql start
python3 -m pip install --break-system-packages sphinx sphinx-bootstrap-theme

- name: Configure and build documentation
Expand Down
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ if(POLICY CMP0144)
cmake_policy(SET CMP0144 OLD)
endif()

if(POLICY CMP0167)
cmake_policy(SET CMP0167 OLD)
endif()

if(POLICY CMP0148)
cmake_policy(SET CMP0148 OLD)
endif()
Expand All @@ -33,7 +29,7 @@ include(pgr/BuildType)
#---------------------------------------------
#---------------------------------------------

project(PGROUTING VERSION 4.0.2
project(PGROUTING VERSION 4.0.3
LANGUAGES C CXX )
set(PROJECT_VERSION_DEV "")
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
Expand All @@ -51,6 +47,7 @@ string(TIMESTAMP COMPILATION_DATE "%Y/%m/%d" UTC)

set(MINORS 4.0 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.6)
set(OLD_SIGNATURES
4.0.2
4.0.1
4.0.0
3.8.0
Expand Down Expand Up @@ -98,14 +95,19 @@ endif()
# Boost
#---------------------------------------------

find_package(Boost ${BOOST_MINIMUM_VERSION} REQUIRED)
find_package(Boost ${BOOST_MINIMUM_VERSION} MODULE REQUIRED)

if (Boost_FOUND OR Boost_INCLUDE_DIR)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
endif (Boost_FOUND OR Boost_INCLUDE_DIR)

if (NOT Boost_VERSION_MACRO)
set(Boost_VERSION_MACRO ${Boost_VERSION})
endif()
set(BOOST_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
message(STATUS "Found Boost: ${BOOST_VERSION}")
add_definitions(-DBOOST_ALLOW_DEPRECATED_HEADERS)

include_directories(SYSTEM ${Boost_INCLUDE_DIRS})

#---------------------------------------------
# Clang tidy
Expand Down
9 changes: 8 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ To read all history of releases go to the latest [release notes](https://docs.pg



### pgRouting 4.0.3 Release Notes

### pgRouting 4.0.2 Release Notes
4.0.3 Bug fixes

* [#3176](https://github.com/pgRouting/pgrouting/issues/3176): Boost broken links

</details>

<details> <summary>pgRouting 4.0.2 Release Notes</summary>

To see all issues & pull requests closed by this release see the
[#4.0.2](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%204.0.2%22)
Expand Down
3 changes: 3 additions & 0 deletions doc/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ linkcheck_ignore = [
r'https://docs.pgrouting.org/3.8/*',
# Currently has a problem
r'https://www.overpass-api.de/*',
# 443 Time out
r'https://www.postgressql.org/*',
r'https://www.highgo.org/*',
# 403 Client error
'https://gis.stackexchange.com/questions/tagged/pgrouting'
]
Expand Down
7 changes: 7 additions & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ pgRouting 4.0

.. current

pgRouting 4.0.3 Release Notes
-------------------------------------------------------------------------------

4.0.3 Bug fixes
...............................................................................

* :issue:`3176`: Boost broken links

pgRouting 4.0.2 Release Notes
-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docqueries/version/full_version.result
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SET
SELECT version, library FROM pgr_full_version();
version | library
---------+-----------------
4.0.2 | pgrouting-4.0.2
4.0.3 | pgrouting-4.0.3
(1 row)

/* -- q2 */
Expand Down
2 changes: 1 addition & 1 deletion docqueries/version/version.result
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SET
SELECT pgr_version();
pgr_version
-------------
4.0.2
4.0.3
(1 row)

/* -- q2 */
Expand Down
Loading
Loading