Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pumpup to v3.6.3 & fixes #2659

Merged
merged 13 commits into from
Oct 10, 2024
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
39 changes: 39 additions & 0 deletions .github/scripts/tidy-vs-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Runs clang-tidy only on changed files

readonly BASE=$1
readonly BUILD_DIR=build

MODIFIED_FILES=$(git diff-tree --no-commit-id --diff-filter=d --name-only -r "$BASE" HEAD | grep '\.c')
MODIFIED_HEADERS=$(git diff-tree --no-commit-id --diff-filter=d --name-only -r "$BASE" HEAD | grep '\.h')
POSTGRES_SERVER=$(grep -o -m1 '\-isystem .*' "${BUILD_DIR}/compile_commands.json" | head -1 | awk '{print $2}')

echo "POSTGRES_SERVER ${POSTGRES_SERVER}"

CHECKS="-checks=clang-analyzer-*"

if [ -z "${MODIFIED_FILES}" ] && [ -z "${MODIFIED_HEADERS}" ]; then
echo "No paths modified"
exit 0
fi

# C/C++ use the compile command
if [ ${#MODIFIED_FILES[@]} != 0 ] ; then
for f in ${MODIFIED_FILES}
do
if [ "${f##*.}" == 'conf' ]; then continue; fi
echo "${f}"
clang-tidy -p "${BUILD_DIR}" "${CHECKS}" -header-filter="^$(pwd).*" "${f}"
done
fi

# H/HPP do not have a compile command
# workaround: add the includes
if [ ${#MODIFIED_HEADERS[@]} != 0 ] ; then
for f in ${MODIFIED_HEADERS}
do
echo "${f}"
clang-tidy "${CHECKS}" -header-filter=.* "${f}" \
-- -I./include -isystem "${POSTGRES_SERVER}"
done
fi
12 changes: 3 additions & 9 deletions .github/workflows/boost_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ name: Boost supported versions
# - 1.56 is the minimum version we ask (Aug 2014)

on:
workflow_dispatch:
push:
paths:
- '.github/workflows/boost_version.yml'
Expand Down Expand Up @@ -94,11 +95,6 @@ jobs:
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@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
sudo apt-get update
Expand All @@ -110,8 +106,6 @@ jobs:
postgresql-${PGVER}-postgis-${PGIS}-scripts \
postgresql-server-dev-${PGVER}

python -m pip install --upgrade pip
pip install -r requirements.txt
wget https://sourceforge.net/projects/boost/files/boost/1.${{ matrix.boost_minor }}.0/boost_1_${{ matrix.boost_minor }}_0.tar.bz2
#wget https://dl.bintray.com/boostorg/release/1.${{ matrix.boost_minor }}.0/source/boost_1_${{ matrix.boost_minor }}_0.tar.bz2
sudo tar --bzip2 -xf boost_1_${{ matrix.boost_minor }}_0.tar.bz2
Expand All @@ -123,7 +117,7 @@ jobs:
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
mkdir build
cd build
cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Debug -DWITH_DOC=OFF ..
cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Debug ..

- name: Build
run: |
Expand All @@ -136,5 +130,5 @@ jobs:
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}" "3.6.2"
bash "${DIR}/tools/testers/setup_db.sh" "${PGPORT}" ___pgr___test___ "${PG_RUNNER_USER}" "3.6.3"
pg_prove -Q -f --normalize --directives --recurse -U "${PG_RUNNER_USER}" -d ___pgr___test___ "pgtap"
1 change: 1 addition & 0 deletions .github/workflows/check-queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ name: Check queries
# - the latest postgis version

on:
workflow_dispatch:
push:
paths:
- '.github/workflows/check-queries.yml'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ name: Build for Ubuntu with clang
# - postgis 3

on:
workflow_dispatch:
push:
paths:
- '.github/workflows/clang.yml'
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/tidy-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: clang-tidy check

on:
workflow_dispatch:
pull_request:
branches-ignore:
- 'gh-pages'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-changelog:
name: Check for changelog entry
runs-on: ubuntu-latest
env:
PR_BASE: ${{ github.base_ref }}

steps:

- uses: actions/checkout@v4

- name: Get postgres version
run: |
sudo service postgresql start
pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()')
echo "PGVER=${pgver}" >> $GITHUB_ENV
echo "PGPORT=5432" >> $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 | sudo apt-key add -
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 dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libboost-graph-dev \
postgresql-${PGVER} \
postgresql-server-dev-${PGVER}

- name: Configure
run: |
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
mkdir build
cd build
cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWITH_DOC=OFF ..

- name: Add upstream
run: |
git remote add upstream https://github.com/pgRouting/pgrouting
git fetch upstream ${PR_BASE}

- name: do clang-tidy
run: .github/scripts/tidy-vs-commit.sh "upstream/${PR_BASE}"
5 changes: 4 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ jobs:
matrix:
psql: [11,12,13,14,15,16]
postgis: [3]
os: [ubuntu-latest, ubuntu-20.04]
os: [ubuntu-latest, ububtu-22.04, ubuntu-20.04]
exclude:
- os: ubuntu-latest
psql: 11

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
old_pgr: [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: [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.6, 3.1.3, 3.2.0, 3.2.1, 3.2.2]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -122,6 +122,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 '3.6.2';"
psql -p "${PGPORT}" -d ___pgr___test___ -c "ALTER EXTENSION pgrouting UPDATE TO '3.6.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"
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ include(pgr/BuildType)
#---------------------------------------------
#---------------------------------------------

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

set(MINORS 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.6)
set(OLD_SIGNATURES
3.6.2
3.6.1
3.6.0
3.5.1
Expand Down Expand Up @@ -60,9 +61,9 @@ include(pgr/Configure)
#---------------------------------------------
set(DOXYGEN_MINIMUM_VERSION "1.7")
set(SPHINX_MINIMUM_VERSION "4.0")
set(POSTGRESQL_MINIMUM_VERSION "9.2.0")
set(POSTGRESQL_MINIMUM_VERSION "11.0.0")
set(BOOST_MINIMUM_VERSION "1.56.0")
set(POSTGIS_MINIMUM_VERSION "2.0.0")
set(POSTGIS_MINIMUM_VERSION "3.0.0")

message(STATUS "DOXYGEN_MINIMUM_VERSION=${DOXYGEN_MINIMUM_VERSION}")
message(STATUS "SPHINX_MINIMUM_VERSION=${SPHINX_MINIMUM_VERSION}")
Expand Down Expand Up @@ -171,25 +172,24 @@ endif()
# PostgreSQL
#---------------------------------------------
#---------------------------------------------
find_package(PostgreSQL)
if(NOT POSTGRESQL_FOUND OR NOT POSTGRESQL_VERSION_STRING)
message(FATAL_ERROR "PostgreSQL not found - Please check your PostgreSQL installation.")
endif()
find_package(PostgreSQL "${POSTGRESQL_MINIMUM_VERSION}")

# removing type of release on postgres version
# for XbetaY XalphaY XrcY -> X.Y
string(REGEX REPLACE "([0-9]+)[beta|alpha|rc|devel].*" "\\1.0" POSTGRESQL_VERSION_STRING ${POSTGRESQL_VERSION_STRING})
message(STATUS "POSTGRESQL_VERSION_STRING=${POSTGRESQL_VERSION_STRING}")

# calcualte mayor.micro
STRING(REGEX MATCH "([0-9]+)\.([0-9]+)" POSTGRESQL_VERSION "${POSTGRESQL_VERSION_STRING}")
message(STATUS "POSTGRESQL_VERSION=${POSTGRESQL_VERSION}")

#for X.Y.Z -> XY Y<10
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*" "\\1\\2" PGSQL_VERSION ${POSTGRESQL_VERSION})
#message(STATUS "PGSQL_VERSION=${PGSQL_VERSION}")
# split mayor minor
string(REPLACE "." ";" VERSION_LIST ${POSTGRESQL_VERSION})
list(GET VERSION_LIST 0 POSTGRESQL_VERSION_MAYOR)
list(GET VERSION_LIST 1 POSTGRESQL_VERSION_MINOR)

if("${POSTGRESQL_VERSION}" VERSION_LESS "${POSTGRESQL_MINIMUM_VERSION}")
message(FATAL_ERROR " PostgreSQL ${POSTGRESQL_MINIMUM_VERSION} or greater is required.")
endif("${POSTGRESQL_VERSION}" VERSION_LESS "${POSTGRESQL_MINIMUM_VERSION}")
math(EXPR PGSQL_VERSION "${POSTGRESQL_VERSION_MAYOR} * 1000 + ${POSTGRESQL_VERSION_MINOR}")
message(STATUS "PGSQL_VERSION=${PGSQL_VERSION}")

#-------
include_directories(SYSTEM ${POSTGRESQL_INCLUDE_DIR})
Expand Down
37 changes: 37 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,43 @@

.. current


### pgRouting 3.6.3 Release Notes

To see all issues & pull requests closed by this release see the [Git closed
milestone for 3.6.3
](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.6.3%22)

**Build**

* Explicit minimum requirements:

* postgres 11.0.0
* postgis 3.0.0

**Code fixes**

* Fix warnings from cpplint.
* Fix warnings from clang 18.

**CI tests**

* Add a clang tidy test on changed files.
* Update test not done on versions: 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0, 3.1.1,
3.1.2

**Documentation**

* Results of documentation queries adujsted to boost 1.83.0 version:

* pgr_edgeDisjointPaths
* pgr_stoerWagner

**pgtap tests**

* bug fixes


### pgRouting 3.6.2 Release Notes

To see all issues & pull requests closed by this release see the [Git closed
Expand Down
38 changes: 38 additions & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,44 @@ pgRouting 3.6

.. current


pgRouting 3.6.3 Release Notes
-------------------------------------------------------------------------------

To see all issues & pull requests closed by this release see the `Git closed
milestone for 3.6.3
<https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.6.3%22>`__

.. rubric:: Build

* Explicit minimum requirements:

* postgres 11.0.0
* postgis 3.0.0

.. rubric:: Code fixes

* Fix warnings from cpplint.
* Fix warnings from clang 18.

.. rubric:: CI tests

* Add a clang tidy test on changed files.
* Update test not done on versions: 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0, 3.1.1,
3.1.2

.. rubric:: Documentation

* Results of documentation queries adujsted to boost 1.83.0 version:

* pgr_edgeDisjointPaths
* pgr_stoerWagner

.. rubric:: pgtap tests

* bug fixes


pgRouting 3.6.2 Release Notes
-------------------------------------------------------------------------------

Expand Down
Loading
Loading