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

Port fixes from master #2665

Merged
merged 12 commits into from
Oct 17, 2024
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ updates:
directory: "/"
schedule:
interval: "weekly"
target-branch: main

#develop branch starts here
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: develop
4 changes: 2 additions & 2 deletions .github/scripts/tidy-vs-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ 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 $1" "$2}')
POSTGRES_SERVER=$(grep -o -m1 '\-isystem .*' "${BUILD_DIR}/compile_commands.json" | head -1 | awk '{print $2}')

echo "POSTGRES_SERVER ${POSTGRES_SERVER}"

Expand Down Expand Up @@ -34,6 +34,6 @@ if [ ${#MODIFIED_HEADERS[@]} != 0 ] ; then
do
echo "${f}"
clang-tidy "${CHECKS}" -header-filter=.* "${f}" \
-- -I./include "${POSTGRES_SERVER}"
-- -I./include -isystem "${POSTGRES_SERVER}"
done
fi
3 changes: 2 additions & 1 deletion .github/workflows/boost_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ name: Boost supported versions
# - boost::geometry has not changed anything we use
#
# boost::graph
# - 1.86 does not support C++11 (Aug 2024)
# - 1.84 is failing its own tests (Jul 2022)
# - 1.83 transitive closure & stoer wagner changed on 83 (Jul 2022)
# - 1.80 changed on 1.80 (Aug 2022)
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
strategy:
fail-fast: false
matrix:
boost_minor: [56, 68, 75, 76, 77, 78, 79, 80, 83, 84]
boost_minor: [56, 68, 75, 76, 77, 78, 79, 80, 83, 84, 86]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- centos-7 gcc-4.8.5

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: get postgres version
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/doc-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ jobs:
# allways processing english, no matter what the change was
if [[ "${{ matrix.language }}" == "en" ]]; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi

# if [[ "${{ matrix.language }}" == "zh_Hans" && "${{ github.repository_owner }}" != "pgRouting" ]]; then echo "PROCESS=false" >> $GITHUB_ENV; exit 0; fi

# when this file changes all languages are tested
if git diff --name-only HEAD^ HEAD | grep -q '.github/workflows/doc-check.yml' ; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi

Expand Down Expand Up @@ -95,7 +93,7 @@ jobs:

- name: Install python
if: env.PROCESS == 'true'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-latest]
os: [macos-latest, macos-14]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: install deps
run: |
brew install postgresql postgis boost
brew install postgresql@14 postgis boost

- name: Configure
run: |
Expand Down
58 changes: 20 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Release

on:
push:
tags:
- 'v*.*.*'

workflow_dispatch:

permissions:
contents: read
Expand All @@ -25,6 +22,11 @@ jobs:
with:
fetch-depth: 0

- name: Initialize mandatory git config
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Get postgres version
run: |
sudo service postgresql start
Expand All @@ -34,17 +36,14 @@ jobs:
echo "PGPORT=5432" >> $GITHUB_ENV
echo "PGIS=3" >> $GITHUB_ENV
echo "PGROUTING_VERSION=${PGROUTING_VERSION}" >> $GITHUB_ENV
echo "TAG_NAME=v${PGROUTING_VERSION}" >> $GITHUB_ENV

- name: Verify Tag Name
- name: Create and Push Tag
run: |
TAG_NAME=${GITHUB_REF#refs/*/}
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
echo ${TAG_NAME}
echo ${PGROUTING_VERSION}
if [ "${TAG_NAME}" != "v${PGROUTING_VERSION}" ]; then
echo "Tag name should be v${PGROUTING_VERSION}"
exit 1
fi
git tag -a "${TAG_NAME}" -m "Release version ${TAG_NAME}"
git push origin "${TAG_NAME}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Extract branch name and commit hash
run: |
Expand All @@ -62,7 +61,7 @@ jobs:
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

- name: Install python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -87,7 +86,8 @@ jobs:
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
mkdir build
cd build
cmake -DPOSTGRESQL_VERSION=${PGVER} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Release -DES=ON ..
cmake -DPOSTGRESQL_VERSION=${PGVER} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Release \
-DES=ON -DZH_HANS=ON ..

- name: Build
run: |
Expand All @@ -97,11 +97,6 @@ jobs:
sudo make install
make doxy

- name: Initialize mandatory git config
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

- name: Update Users Documentation
run: |
git checkout origin/gh-pages
Expand Down Expand Up @@ -140,41 +135,28 @@ jobs:
run: |
cd build/doc

cp -r html doc-v${PGROUTING_VERSION}-en-es
tar -zcvf doc-v${PGROUTING_VERSION}-en-es.tar.gz doc-v${PGROUTING_VERSION}-en-es

cp -r html doc-v${PGROUTING_VERSION}-en
rm -rf doc-v${PGROUTING_VERSION}-en/es
tar -zcvf doc-v${PGROUTING_VERSION}-en.tar.gz doc-v${PGROUTING_VERSION}-en

cp -r html doc-v${PGROUTING_VERSION}-es
rm -rf doc-v${PGROUTING_VERSION}-es/en
perl -pi -e 's/en\/index.html/es\/index.html/g' doc-v${PGROUTING_VERSION}-es/index.html
tar -zcvf doc-v${PGROUTING_VERSION}-es.tar.gz doc-v${PGROUTING_VERSION}-es
cp -r html doc-v${PGROUTING_VERSION}
tar -zcvf doc-v${PGROUTING_VERSION}.tar.gz doc-v${PGROUTING_VERSION}

cd ../..
grep -Pzo "(?s)pgRouting ${PGROUTING_VERSION//./\\.} Release Notes.*?(?=pgRouting .\..\.. Release Notes)" NEWS.md | tr '\0' '\n' > release_body.txt
echo "**Attachments**" >> release_body.txt
echo "File | Contents" >> release_body.txt
echo "| --- | --- |" >> release_body.txt
echo "| \`doc-v${PGROUTING_VERSION}-en-es.tar.gz\` | English and Spanish documentation. Redirection to English" >> release_body.txt
echo "| \`doc-v${PGROUTING_VERSION}-en.tar.gz\`|English documentation. Redirection to English" >> release_body.txt
echo "| \`doc-v${PGROUTING_VERSION}-es.tar.gz\`|Spanish documentation. Redirection to Spanish" >> release_body.txt
echo "| \`doc-v${PGROUTING_VERSION}tar.gz\` | English and Spanish documentation. Redirection to English" >> release_body.txt
echo "| \`pgrouting-${PGROUTING_VERSION}.tar.gz\` | tar.gz of the release" >> release_body.txt
echo "| \`pgrouting-${PGROUTING_VERSION}.zip\`| zip of the release" >> release_body.txt
cat release_body.txt

- name: Create Draft Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
body_path: release_body.txt
name: ${{ env.TAG_NAME }}
draft: true
prerelease: false
files: |
build/doc/doc-v${{ env.PGROUTING_VERSION }}-en-es.tar.gz
build/doc/doc-v${{ env.PGROUTING_VERSION }}-en.tar.gz
build/doc/doc-v${{ env.PGROUTING_VERSION }}-es.tar.gz
build/doc/doc-v${{ env.PGROUTING_VERSION }}.tar.gz
${{ github.event.repository.name }}-${{ env.PGROUTING_VERSION }}.zip
${{ github.event.repository.name }}-${{ env.PGROUTING_VERSION }}.tar.gz

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

- name: Install python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

- name: Install python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

- name: Install python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ milestone for 3.6.3
* postgres 11.0.0
* postgis 3.0.0

* g++ 13+ is supported

**Code fixes**

* Fix warnings from cpplint.
Expand Down
2 changes: 2 additions & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ milestone for 3.6.3
* postgres 11.0.0
* postgis 3.0.0

* g++ 13+ is supported

.. rubric:: Code fixes

* Fix warnings from cpplint.
Expand Down
1 change: 1 addition & 0 deletions include/cpp_common/rule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#include <vector>
#include <sstream>
#include <cstdint>

typedef struct Restriction_t Restriction_t;

Expand Down
5 changes: 2 additions & 3 deletions tools/scripts/test_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ mylicensecheck() {
}

DIR=$(git rev-parse --show-toplevel)

pushd "${DIR}" > /dev/null || exit
missing=$(! { mylicensecheck src & mylicensecheck sql & mylicensecheck include & mylicensecheck pgtap;} | grep "No copyright\|UNKNOWN")
{ mylicensecheck src & mylicensecheck sql & mylicensecheck include & mylicensecheck pgtap;} | grep "No copyright\|UNKNOWN"
missing1=$(mylicensecheck doc | grep "No copyright")
missing2=$(grep --files-without-match 'Creative Commons' doc/*/*.rst)
missing3=$(mylicensecheck docqueries | grep "No copyright")
missing4=$(grep --files-without-match 'Creative Commons' "$(git ls-files docqueries | grep '.sql')")
missing4=$(grep --files-without-match 'Creative Commons' docqueries/*/*.pg)
popd > /dev/null || exit

#mylicensecheck doc
Expand Down