Skip to content

Commit 785a13e

Browse files
authored
Merge pull request #319 from pgRouting/develop
New version v3.0.0
2 parents 2e83649 + 0c9f44f commit 785a13e

28 files changed

+249
-372
lines changed

.github/workflows/libpqxx.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

.github/workflows/ubuntu.yml

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,58 @@
11
name: Build for Ubuntu
22

3+
# manually triggered workflow
4+
35
on:
6+
workflow_dispatch:
47
push:
5-
branches-ignore:
6-
- 'translations_*'
7-
tags: []
88
pull_request:
9-
paths-ignore:
10-
- '**.po'
119

1210

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
1318
jobs:
1419
build:
15-
name: Build
20+
name: Ubuntu psql
1621
runs-on: ${{ matrix.os }}
1722

1823
strategy:
1924
fail-fast: false
2025
matrix:
21-
psql: [9.6,10,11,12, 13]
22-
postgis: [2.5,3]
23-
os: [ubuntu-latest]
26+
psql: [13, 14, 15, 16, 17, 18]
27+
postgis: [3]
28+
release: [Debug, Release]
29+
os: [ubuntu-latest, ubuntu-22.04]
30+
compiler: [ gcc-latest, g++-11, clang ]
2431

2532
steps:
26-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v5
2734

28-
- name: get postgres version
35+
- name: 'Raise Priority for apt.postgresql.org'
2936
run: |
30-
sudo service postgresql start
31-
pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d \()')
32-
echo "PGVER=${pgver}" >> $GITHUB_ENV
33-
PGP=5433
34-
if [ "${{ matrix.psql }}" == "${pgver}" ]; then PGP=5432; fi
35-
echo "PGPORT=${PGP}" >> $GITHUB_ENV
37+
cat << EOF >> ./pgdg.pref
38+
Package: *
39+
Pin: release o=apt.postgresql.org
40+
Pin-Priority: 600
41+
EOF
42+
sudo mv ./pgdg.pref /etc/apt/preferences.d/
43+
sudo apt update
3644
3745
- name: Add PostgreSQL APT repository
3846
run: |
39-
sudo apt-get install curl ca-certificates gnupg
40-
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
41-
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \
42-
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
47+
sudo apt-get -y purge postgresql-*
48+
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'
49+
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
50+
51+
- name: Install compiler
52+
id: install_cc
53+
uses: rlalik/setup-cpp-compiler@master
54+
with:
55+
compiler: ${{ matrix.compiler }}
4356

4457
- name: Install dependencies
4558
run: |
@@ -54,23 +67,20 @@ jobs:
5467
postgresql-${{ matrix.psql }}-pgrouting \
5568
libpqxx-dev \
5669
postgresql-server-dev-${{ matrix.psql }}
70+
# should be 7 on latest and 6 on 22.04
71+
apt-cache policy libpqxx-dev
5772
58-
- name: Configure
73+
- name: Configure compiler
5974
run: |
75+
export CC=/usr/bin/${{ steps.install_cc.outputs.cc }}
76+
export CXX=/usr/bin/${{ steps.install_cc.outputs.cxx }}
6077
export PATH=/usr/lib/postgresql/${{ matrix.psql }}/bin:$PATH
6178
mkdir build
6279
cd build
63-
cmake -DPOSTGRESQL_VERSION=${{ matrix.psql }} -DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF ..
80+
cmake -DCMAKE_BUILD_TYPE=${{ matrix.release }} ..
6481
6582
- name: Build
6683
run: |
6784
cd build
6885
make -j 4
6986
sudo make install
70-
71-
- name: Test
72-
if: false
73-
run: |
74-
sudo service postgresql start
75-
sudo -u postgres createdb -p ${PGPORT} ___vrp___test___
76-
sudo -u postgres bash ./tools/testers/pg_prove_tests.sh postgres ${PGPORT} Release

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
1+
2+
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
3+
24

35
if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} )
46
message(FATAL_ERROR "In-source builds not allowed.
57
Please make a new directory (called a build directory) and run CMake from there.
68
You may need to remove CMakeCache.txt." )
79
endif()
810

9-
PROJECT(osm2pgrouting)
11+
PROJECT(osm2pgrouting VERSION 3.0.0
12+
LANGUAGES C CXX)
1013

1114
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
1215
SET(SHARE_DIR "${CMAKE_INSTALL_PREFIX}/share/osm2pgrouting")
@@ -46,7 +49,7 @@ else()
4649
endif()
4750

4851
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64")
49-
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wconversion -pedantic -Wextra -frounding-math -Wno-deprecated -fmax-errors=10")
52+
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wconversion -pedantic -Wextra -frounding-math -Wno-deprecated")
5053

5154
if(WIN32 AND MSVC)
5255
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_DEPRECATE")

NEWS

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,52 @@
1+
osm2pgRouting 3.0.0
2+
3+
* cmake >= 3.12
4+
* geometry column name: `geom`
5+
6+
New "ways" table structure
7+
Column | Type | Modifications | Default
8+
-------------------+---------------------------+--------------------+-----------
9+
id | bigint | previously was gid | generated always as identity
10+
osm_id | bigint |
11+
tag_id | integer |
12+
length | double precision |
13+
length_m | double precision |
14+
name | text |
15+
source | bigint |
16+
target | bigint |
17+
source_osm | bigint |
18+
target_osm | bigint |
19+
cost | double precision |
20+
reverse_cost | double precision |
21+
cost_s | double precision |
22+
reverse_cost_s | double precision |
23+
rule | text |
24+
one_way | integer |
25+
oneway | text |
26+
x1 | double precision |
27+
y1 | double precision |
28+
x2 | double precision |
29+
y2 | double precision |
30+
maxspeed_forward | double precision |
31+
maxspeed_backward | double precision |
32+
priority | double precision |
33+
geom | geometry(LineString,4326) | previously was the_geom
34+
35+
New "ways_vertices_pgr" table structure
36+
37+
Column | Type | Default
38+
-----------+----------------------+-------------------------------------------
39+
id | bigint | Default: generated always as identity
40+
in_edges | bigint[] | New column
41+
out_edges | bigint[] | New column
42+
x | numeric(11,8) | Default: generated always as (st_x(geom)) stored
43+
y | numeric(11,8) | Default: generated always as (st_y(geom)) stored
44+
osm_id | bigint |
45+
geom | geometry(Point,4326)
46+
147
osm2pgRouting 2.3.9
248

3-
*
49+
* Homebrew: Add algorithm for std::transform
450

551
osm2pgRouting 2.3.8
652

ci/travis/install-libpqxx.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

ci/travis/install-postgres.sh

Lines changed: 0 additions & 63 deletions
This file was deleted.

ci/travis/osm2pgrouting_build.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)