Skip to content

Commit

Permalink
Merge pull request #17 from pgRouting/develop
Browse files Browse the repository at this point in the history
Preparation of release 0.2.0
  • Loading branch information
krashish8 authored Sep 7, 2021
2 parents 2cf246e + d70d253 commit fdda73f
Show file tree
Hide file tree
Showing 432 changed files with 44,167 additions and 9,167 deletions.
7 changes: 6 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# C++ files want tab indentation
[*.sql]
indent_style = space
indent_size = 2

# C++ files want tab indentation
[*.{c,h,cpp,hpp,inl}]
indent_style = space
indent_size = 4
indent_size = 2

# Makefiles want tab indentation
[Makefile]
Expand Down
32 changes: 28 additions & 4 deletions .github/workflows/boost_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,46 @@ 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: Install VROOM dependencies
run: |
sudo apt-get install libssl-dev libasio-dev libglpk-dev
- name: Build VROOM v1.10.0
run: |
wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v1.10.0.tar.gz
tar -zvxf v1.10.0.tar.gz
cd vroom-1.10.0/src
# Create object file with position independent code using -fPIC flag
sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile
make
cd ..
echo "VROOM_INSTALL_PATH=$(pwd)" >> $GITHUB_ENV
- name: Configure
run: |
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 -DWITH_DOC=OFF -DVROOM_INSTALL_PATH=${VROOM_INSTALL_PATH} ..
- name: Build
run: |
cd build
make -j 4
sudo make install
- name: Test
- name: Unpack data
run: |
cd tools/testers
tar -xf matrix_new_values.tar.gz
- name: pgTap test
run: |
sudo service postgresql start
sudo -u postgres createdb -p 5432 ___vrp___test___
sudo -u postgres bash ./tools/testers/pg_prove_tests.sh postgres 5432 Release
sudo -u postgres createdb -p 5432 ___vrp___test___
cd tools/testers
sudo -u postgres psql -p 5432 -U postgres -d ___vrp___test___ -X -q -v ON_ERROR_STOP=1 --pset pager=off -f setup_db.sql
sudo -u postgres pg_prove --failures --quiet --recurse --ext .sql -p 5432 -d ___vrp___test___ -U postgres ../../pgtap/
15 changes: 15 additions & 0 deletions .github/workflows/check-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,18 @@ jobs:
sudo apt install -y shellcheck
- name: Run Shell Check
run: ./tools/scripts/test_shell.sh

style-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Requirements
uses: actions/checkout@v2
with:
repository: 'google/styleguide'
ref: "gh-pages"
path: "code_linter/styleguide"
- name: Run linter
run: |
bash ./tools/scripts/code_checker.sh
31 changes: 27 additions & 4 deletions .github/workflows/check-queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,29 @@ jobs:
postgresql-${PGVER}-pgrouting \
postgresql-server-dev-${PGVER}
- name: Install VROOM dependencies
run: |
sudo apt-get install libssl-dev libasio-dev libglpk-dev
- name: Build VROOM v1.10.0
run: |
wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v1.10.0.tar.gz
tar -zvxf v1.10.0.tar.gz
cd vroom-1.10.0/src
# Create object file with position independent code using -fPIC flag
sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile
make
cd ..
echo "VROOM_INSTALL_PATH=$(pwd)" >> $GITHUB_ENV
- name: Configure
run: |
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
mkdir build
cd build
cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Debug ..
cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Debug -DVROOM_INSTALL_PATH=${VROOM_INSTALL_PATH} ..
- name: Build
run: |
Expand All @@ -73,13 +90,19 @@ jobs:
tools/scripts/get_signatures.sh -p ${PGPORT}
git diff --exit-code --quiet sql/sigs/*.sig
- name: Unpack data
run: |
cd tools/testers
tar -xf matrix_new_values.tar.gz
- name: Test documentation queries are up to date
run: |
sudo -u postgres createdb -p ${PGPORT} pgr_test__db__test
sudo -u postgres createdb -p ${PGPORT} ___vrp___test___
TESTDIRS="version"
for d in ${TESTDIRS}
do
./tools/testers/doc_queries_generator.pl -pgver "${PGVER}" -pguser runner -documentation -alg "${d}"
./tools/testers/doc_queries_generator.pl -pgport "${PGPORT}" -documentation -alg "${d}"
done
./tools/testers/doc_queries_generator.pl -pgver "${PGVER}"
./tools/testers/doc_queries_generator.pl -pgport "${PGPORT}"
49 changes: 36 additions & 13 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
strategy:
fail-fast: false
matrix:
psql: [12]
postgis: [3]
release: [Debug,Release]
os: [ubuntu-latest]

steps:
Expand All @@ -32,7 +32,7 @@ jobs:
echo "PGVER=${pgver}" >> $GITHUB_ENV
PGP=5433
if [ "${{ matrix.psql }}" == "${pgver}" ]; then PGP=5432; fi
echo "PGPORT=${PGP}" >> $GITHUB_ENV
echo "PGPORT=5432" >> $GITHUB_ENV
- name: Add PostgreSQL APT repository
run: |
Expand All @@ -48,29 +48,52 @@ jobs:
clang \
libboost-graph-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 \
postgresql-server-dev-${{ matrix.psql }}
postgresql-${PGVER} \
postgresql-${PGVER}-pgtap \
postgresql-${PGVER}-postgis-${{ matrix.postgis }} \
postgresql-${PGVER}-postgis-${{ matrix.postgis }}-scripts \
postgresql-${PGVER}-pgrouting \
postgresql-server-dev-${PGVER}
- name: Install VROOM dependencies
run: |
sudo apt-get install libssl-dev libasio-dev libglpk-dev
- name: Build VROOM v1.10.0
run: |
wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v1.10.0.tar.gz
tar -zvxf v1.10.0.tar.gz
cd vroom-1.10.0/src
# Create object file with position independent code using -fPIC flag
sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile
make
cd ..
echo "VROOM_INSTALL_PATH=$(pwd)" >> $GITHUB_ENV
- name: Configure
run: |
export PATH=/usr/lib/postgresql/${{ matrix.psql }}/bin:$PATH
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
mkdir build
cd build
CXX=clang++ CC=clang cmake -DPOSTGRESQL_VERSION=${{ matrix.psql }} -DCMAKE_BUILD_TYPE=Debug -DWITH_DOC=OFF ..
CXX=clang++ CC=clang cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=${{ matrix.release }} -DWITH_DOC=OFF -DVROOM_INSTALL_PATH=${VROOM_INSTALL_PATH} ..
- name: Build
run: |
cd build
make -j 4
sudo make install
- name: Test
- name: Unpack data
run: |
cd tools/testers
tar -xf matrix_new_values.tar.gz
- name: pgTap test
run: |
echo "test pending"
sudo service postgresql start
sudo -u postgres createdb -p ${PGPORT} ___vrp___test___
sudo -u postgres bash ./tools/testers/pg_prove_tests.sh postgres ${PGPORT} Debug
cd tools/testers
sudo -u postgres psql -p "${PGPORT}" -U postgres -d ___vrp___test___ -X -q -v ON_ERROR_STOP=1 --pset pager=off -f setup_db.sql
sudo -u postgres pg_prove --failures --quiet --recurse --ext .sql -p "${PGPORT}" -d ___vrp___test___ -U postgres ../../pgtap/
20 changes: 19 additions & 1 deletion .github/workflows/doc-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,23 @@ jobs:
pip install -r requirements.txt
pip list
- name: Install VROOM dependencies
run: |
sudo apt-get install libssl-dev libasio-dev libglpk-dev
- name: Build VROOM v1.10.0
run: |
wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v1.10.0.tar.gz
tar -zvxf v1.10.0.tar.gz
cd vroom-1.10.0/src
# Create object file with position independent code using -fPIC flag
sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile
make
cd ..
echo "VROOM_INSTALL_PATH=$(pwd)" >> $GITHUB_ENV
- name: Configure
if: env.PROCESS == 'true'
run: |
Expand All @@ -84,7 +101,8 @@ jobs:
cd build
cmake -DLINKCHECK=ON -DHTML=ON -DWITH_DOC=ON \
-DDE=ON -DES=ON -DFR=ON -DJA=ON -DIT=ON \
-DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Release ..
-DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Release \
-DVROOM_INSTALL_PATH=${VROOM_INSTALL_PATH} ..
- name: Check Links
if: env.PROCESS == 'true'
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,31 @@ jobs:
pip install -r requirements.txt
pip list
- name: Install VROOM dependencies
run: |
sudo apt-get install libssl-dev libasio-dev libglpk-dev
- name: Build VROOM v1.10.0
run: |
wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v1.10.0.tar.gz
tar -zvxf v1.10.0.tar.gz
cd vroom-1.10.0/src
# Create object file with position independent code using -fPIC flag
sed -i 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile
make
cd ..
echo "VROOM_INSTALL_PATH=$(pwd)" >> $GITHUB_ENV
- name: Configure link checks
run: |
export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH
mkdir build
cd build
cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Release \
-DWITH_DOC=ON -DES=ON ..
-DWITH_DOC=ON -DES=ON \
-DVROOM_INSTALL_PATH=${VROOM_INSTALL_PATH} ..
- name: Build Documentation
run: |
Expand Down
62 changes: 47 additions & 15 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
paths-ignore:
- '**.po'

# TODO: Fix the macOS build for compiling and building VROOM with vrprouting.
jobs:
build:
name: Build
Expand All @@ -18,6 +19,45 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: install deps
run: |
brew install postgis boost pgrouting
- name: Install VROOM dependencies
run: |
brew install openssl asio glpk
- name: Build VROOM v1.10.0
run: |
wget https://github.com/VROOM-Project/vroom/archive/refs/tags/v1.10.0.tar.gz
tar -zvxf v1.10.0.tar.gz
cd vroom-1.10.0/src
# Source: https://github.com/VROOM-Project/vroom/issues/378
ln -s /usr/local/opt/openssl/include/openssl /usr/local/include
ln -s /usr/local/opt/openssl/lib/libssl.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libcrypto.dylib /usr/local/lib/
# Create object file with position independent code using -fPIC flag
sed -i '' -e 's/CXXFLAGS = /CXXFLAGS = -fPIC /' makefile
sed -i '' -e 's/\/usr\/include\/glpk.h/\/usr\/local\/opt\/glpk\/include\/glpk.h/' makefile
make
cd ..
echo "VROOM_INSTALL_PATH=$(pwd)" >> $GITHUB_ENV
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF -DVROOM_INSTALL_PATH=${VROOM_INSTALL_PATH} ..
- name: Build
run: |
cd build
make -j
sudo make install
- name: Cache pgtap
id: cache-pgtap
uses: actions/cache@v2
Expand Down Expand Up @@ -47,26 +87,18 @@ jobs:
sudo make install
cpan TAP::Parser::SourceHandler::pgTAP
- name: install deps
run: |
brew install postgis boost pgrouting
- name: Configure
- name: Unpack data
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF ..
- name: Build
run: |
cd build
make -j
sudo make install
cd tools/testers
tar -xf matrix_new_values.tar.gz
- name: Test
run: |
export PATH=/usr/local/Cellar/perl/$(perl -e 'print substr($^V, 1)')/bin:$PATH
pg_ctl -D /usr/local/var/postgres start
createuser -s postgres
createdb ___vrp___test___
bash ./tools/testers/pg_prove_tests.sh postgres 5432 Release
cd tools/testers
psql -p 5432 -U postgres -d ___vrp___test___ -X -q -v ON_ERROR_STOP=1 --pset pager=off -f setup_db.sql
psql -p 5432 -U postgres -d ___vrp___test___ -c "SELECT * FROM pgr_full_version();"
pg_prove --failures --quiet --recurse --ext .sql -p 5432 -d ___vrp___test___ -U postgres ../../pgtap/
Loading

0 comments on commit fdda73f

Please sign in to comment.