Skip to content

Commit 015ba69

Browse files
authored
Merge branch 'master' into sf-ranges
2 parents 0cd0340 + 61464fc commit 015ba69

File tree

608 files changed

+2061
-26036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

608 files changed

+2061
-26036
lines changed

.github/workflows/osrm-backend.yml

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -446,14 +446,14 @@ jobs:
446446
if: steps.cache-boost.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON'
447447
run: |
448448
BOOST_VERSION="1.85.0"
449-
BOOST_VERSION_UNDERSCORE="${BOOST_VERSION//./_}"
450-
wget -q https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDERSCORE}.tar.gz
451-
tar xzf boost_${BOOST_VERSION_UNDERSCORE}.tar.gz
452-
cd boost_${BOOST_VERSION_UNDERSCORE}
449+
BOOST_VERSION_FLAVOR="${BOOST_VERSION}-b2-nodocs"
450+
wget -q https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION_FLAVOR}.tar.gz
451+
tar xzf boost-${BOOST_VERSION_FLAVOR}.tar.gz
452+
cd boost-${BOOST_VERSION}
453453
sudo ./bootstrap.sh
454454
sudo ./b2 install
455455
cd ..
456-
sudo rm -rf boost_${BOOST_VERSION_UNDERSCORE}*
456+
sudo rm -rf boost-${BOOST_VERSION}*
457457
458458
- name: Install dev dependencies
459459
run: |
@@ -502,6 +502,13 @@ jobs:
502502
503503
conan config init
504504
yq eval '.compiler.clang.version += ["18"]' -i "$HOME/.conan/settings.yml"
505+
- name: Add Apple-clang 16 to list of Conan compilers # workaround for the issue that Conan 1.x doesn't know about Apple-clang 16
506+
if: ${{ matrix.ENABLE_CONAN == 'ON' && matrix.runs-on == 'macos-14' }}
507+
run: |
508+
sudo wget https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_darwin_arm64 -O /usr/local/bin/yq && sudo chmod +x /usr/local/bin/yq
509+
510+
conan config init
511+
yq eval '.compiler.apple-clang.version += ["16.0"]' -i "$HOME/.conan/settings.yml"
505512
- name: Prepare build
506513
run: |
507514
mkdir ${OSRM_BUILD_DIR}
@@ -653,7 +660,7 @@ jobs:
653660
benchmarks:
654661
if: github.event_name == 'pull_request'
655662
needs: [format-taginfo-docs]
656-
runs-on: ubuntu-24.04
663+
runs-on: self-hosted
657664
env:
658665
CCOMPILER: clang-16
659666
CXXCOMPILER: clang++-16
@@ -664,37 +671,17 @@ jobs:
664671
GITHUB_REPOSITORY: ${{ github.repository }}
665672
RUN_BIG_BENCHMARK: ${{ contains(github.event.pull_request.labels.*.name, 'Performance') }}
666673
steps:
667-
- name: Enable data.osm.pbf cache
668-
if: ${{ ! env.RUN_BIG_BENCHMARK }}
669-
uses: actions/cache@v4
670-
with:
671-
path: ~/data.osm.pbf
672-
key: v1-data-osm-pbf
673-
restore-keys: |
674-
v1-data-osm-pbf
675-
- name: Enable compiler cache
676-
uses: actions/cache@v4
677-
with:
678-
path: ~/.ccache
679-
key: v1-ccache-benchmarks-${{ github.sha }}
680-
restore-keys: |
681-
v1-ccache-benchmarks-
682-
- name: Enable Conan cache
683-
uses: actions/cache@v4
684-
with:
685-
path: ~/.conan
686-
key: v1-conan-benchmarks-${{ github.sha }}
687-
restore-keys: |
688-
v1-conan-benchmarks-
689674
- name: Checkout PR Branch
690675
uses: actions/checkout@v4
691676
with:
692677
ref: ${{ github.head_ref }}
693678
path: pr
694-
- name: Install dependencies
695-
run: |
696-
python3 -m pip install "conan<2.0.0" "requests==2.31.0" "numpy==1.26.4" --break-system-packages
697-
sudo apt-get update -y && sudo apt-get install ccache
679+
- name: Activate virtualenv
680+
run: |
681+
python3 -m venv .venv
682+
source .venv/bin/activate
683+
echo PATH=$PATH >> $GITHUB_ENV
684+
pip install "conan<2.0.0" "requests==2.31.0" "numpy==1.26.4"
698685
- name: Prepare data
699686
run: |
700687
if [ "$RUN_BIG_BENCHMARK" = "true" ]; then
@@ -722,50 +709,67 @@ jobs:
722709
path: base
723710
- name: Build Base Branch
724711
run: |
712+
cd base
713+
npm ci --ignore-scripts
714+
cd ..
725715
mkdir base/build
726716
cd base/build
727-
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
717+
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=ON ..
728718
make -j$(nproc)
729719
make -j$(nproc) benchmarks
730720
cd ..
731721
make -C test/data
732722
- name: Build PR Branch
733723
run: |
724+
cd pr
725+
npm ci --ignore-scripts
726+
cd ..
734727
mkdir -p pr/build
735728
cd pr/build
736-
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
729+
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=ON ..
737730
make -j$(nproc)
738731
make -j$(nproc) benchmarks
739732
cd ..
740733
make -C test/data
741734
# we run benchmarks in tmpfs to avoid impact of disk IO
742735
- name: Create folder for tmpfs
743-
run: mkdir -p /opt/benchmarks
736+
run: |
737+
# if by any chance it was mounted before(e.g. due to previous job failed), unmount it
738+
sudo umount ~/benchmarks | true
739+
rm -rf ~/benchmarks
740+
mkdir -p ~/benchmarks
741+
# see https://llvm.org/docs/Benchmarking.html
744742
- name: Run PR Benchmarks
745743
run: |
746-
sudo mount -t tmpfs -o size=4g none /opt/benchmarks
747-
cp -rf pr/build /opt/benchmarks/build
748-
mkdir -p /opt/benchmarks/test
749-
cp -rf pr/test/data /opt/benchmarks/test/data
750-
cp -rf pr/profiles /opt/benchmarks/profiles
751-
752-
./pr/scripts/ci/run_benchmarks.sh -f /opt/benchmarks -r $(pwd)/pr_results -s $(pwd)/pr -b /opt/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
753-
sudo umount /opt/benchmarks
744+
sudo cset shield -c 2-3 -k on
745+
sudo mount -t tmpfs -o size=4g none ~/benchmarks
746+
cp -rf pr/build ~/benchmarks/build
747+
cp -rf pr/lib ~/benchmarks/lib
748+
mkdir -p ~/benchmarks/test
749+
cp -rf pr/test/data ~/benchmarks/test/data
750+
cp -rf pr/profiles ~/benchmarks/profiles
751+
752+
sudo cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks -r $(pwd)/pr_results -s $(pwd)/pr -b ~/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
753+
sudo umount ~/benchmarks
754+
sudo cset shield --reset
754755
- name: Run Base Benchmarks
755756
run: |
756-
sudo mount -t tmpfs -o size=4g none /opt/benchmarks
757-
cp -rf base/build /opt/benchmarks/build
758-
mkdir -p /opt/benchmarks/test
759-
cp -rf base/test/data /opt/benchmarks/test/data
760-
cp -rf base/profiles /opt/benchmarks/profiles
757+
sudo cset shield -c 2-3 -k on
758+
sudo mount -t tmpfs -o size=4g none ~/benchmarks
759+
cp -rf base/build ~/benchmarks/build
760+
cp -rf base/lib ~/benchmarks/lib
761+
mkdir -p ~/benchmarks/test
762+
cp -rf base/test/data ~/benchmarks/test/data
763+
cp -rf base/profiles ~/benchmarks/profiles
761764
762765
# TODO: remove it when base branch will have this file at needed location
763-
if [ ! -f /opt/benchmarks/test/data/portugal_to_korea.json ]; then
764-
cp base/src/benchmarks/portugal_to_korea.json /opt/benchmarks/test/data/portugal_to_korea.json
766+
if [ ! -f ~/benchmarks/test/data/portugal_to_korea.json ]; then
767+
cp base/src/benchmarks/portugal_to_korea.json ~/benchmarks/test/data/portugal_to_korea.json
765768
fi
766769
# we intentionally use scripts from PR branch to be able to update them and see results in the same PR
767-
./pr/scripts/ci/run_benchmarks.sh -f /opt/benchmarks -r $(pwd)/base_results -s $(pwd)/pr -b /opt/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
768-
sudo umount /opt/benchmarks
770+
sudo cset shield --exec -- cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks -r $(pwd)/base_results -s $(pwd)/pr -b ~/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
771+
sudo umount ~/benchmarks
772+
sudo cset shield --reset
769773
- name: Post Benchmark Results
770774
run: |
771775
python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Unreleased
22
- Changes from 5.27.1
33
- Features
4+
- ADDED: Route pedestrians over highway=platform [#6993](https://github.com/Project-OSRM/osrm-backend/pull/6993)
45
- REMOVED: Remove all core-CH left-overs [#6920](https://github.com/Project-OSRM/osrm-backend/pull/6920)
56
- ADDED: Add support for a keepalive_timeout flag. [#6674](https://github.com/Project-OSRM/osrm-backend/pull/6674)
67
- ADDED: Add support for a default_radius flag. [#6575](https://github.com/Project-OSRM/osrm-backend/pull/6575)
@@ -24,6 +25,7 @@
2425
- NodeJS:
2526
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
2627
- Misc:
28+
- CHANGED: Use std::string_view for key type in json::Object. [#7062](https://github.com/Project-OSRM/osrm-backend/pull/7062)
2729
- CHANGED: Use thread_local instead of boost::thread_specific_ptr. [#6991](https://github.com/Project-OSRM/osrm-backend/pull/6991)
2830
- CHANGED: Bump flatbuffers to v24.3.25 version. [#6988](https://github.com/Project-OSRM/osrm-backend/pull/6988)
2931
- CHANGED: Add .reserve(...) to assembleGeometry function. [#6983](https://github.com/Project-OSRM/osrm-backend/pull/6983)
@@ -78,6 +80,7 @@
7880
- ADDED: Extract prerelease/build information from package semver [#6839](https://github.com/Project-OSRM/osrm-backend/pull/6839)
7981
- Profiles:
8082
- FIXED: Bicycle and foot profiles now don't route on proposed ways [#6615](https://github.com/Project-OSRM/osrm-backend/pull/6615)
83+
- ADDED: Add optional support of cargo bike exclusion and width to bicyle profile [#7044](https://github.com/Project-OSRM/osrm-backend/pull/7044)
8184
- Routing:
8285
- FIXED: Fix adding traffic signal penalties during compression [#6419](https://github.com/Project-OSRM/osrm-backend/pull/6419)
8386
- FIXED: Correctly handle compressed traffic signals. [#6724](https://github.com/Project-OSRM/osrm-backend/pull/6724)

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ endif()
5656
if (POLICY CMP0074)
5757
cmake_policy(SET CMP0074 NEW)
5858
endif()
59+
if (POLICY CMP0167)
60+
cmake_policy(SET CMP0167 NEW)
61+
endif()
5962
project(OSRM C CXX)
6063

6164

docker/Dockerfile-alpine

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
1-
FROM alpine:3.20.0 as alpine-mimalloc
1+
FROM alpine:3.21.2 AS alpine-mimalloc
22

3-
RUN apk add --no-cache mimalloc
3+
RUN apk update && \
4+
apk upgrade && \
5+
apk add --no-cache \
6+
boost-iostreams \
7+
boost-program_options \
8+
boost-thread \
9+
mimalloc
410

511
ENV LD_PRELOAD=/usr/lib/libmimalloc.so.2
612
ENV MIMALLOC_LARGE_OS_PAGES=1
713

814

9-
FROM alpine-mimalloc as builder
15+
FROM alpine-mimalloc AS builder
1016
ARG DOCKER_TAG
1117
ARG BUILD_CONCURRENCY
12-
RUN mkdir -p /src && mkdir -p /opt
1318

14-
RUN apk add --no-cache \
15-
cmake make git clang libbz2 libxml2 \
16-
boost-dev boost-program_options boost-filesystem boost-iostreams boost-thread \
17-
lua5.4-dev onetbb-dev expat-dev
19+
RUN mkdir -p /src /opt && \
20+
apk add --no-cache \
21+
boost-dev \
22+
boost-filesystem \
23+
clang \
24+
cmake \
25+
expat-dev \
26+
git \
27+
libbz2 \
28+
libxml2 \
29+
lua5.4-dev \
30+
make \
31+
onetbb-dev
1832

1933
COPY . /src
2034
WORKDIR /src
@@ -39,16 +53,18 @@ RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
3953
rm -rf /src
4054

4155

42-
# Multistage build to reduce image size - https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds
56+
# Multistage build to reduce image size - https://docs.docker.com/build/building/multi-stage/#use-multi-stage-builds
4357
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
44-
FROM alpine-mimalloc as runstage
58+
FROM alpine-mimalloc AS runstage
4559

4660
COPY --from=builder /usr/local /usr/local
4761
COPY --from=builder /opt /opt
4862

4963
RUN apk add --no-cache \
50-
boost-program_options boost-date_time boost-iostreams boost-thread \
51-
expat lua5.4 onetbb && \
64+
boost-date_time \
65+
expat \
66+
lua5.4 \
67+
onetbb && \
5268
ldconfig /usr/local/lib
5369

5470
RUN /usr/local/bin/osrm-extract --help && \
@@ -60,3 +76,4 @@ RUN /usr/local/bin/osrm-extract --help && \
6076
WORKDIR /opt
6177

6278
EXPOSE 5000
79+

docker/Dockerfile-debian

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
FROM debian:bookworm-slim as builder
1+
FROM debian:bookworm-slim AS builder
22
ARG DOCKER_TAG
33
ARG BUILD_CONCURRENCY
4-
RUN mkdir -p /src && mkdir -p /opt
54

6-
RUN apt-get update && \
7-
apt-get -y --no-install-recommends install ca-certificates cmake make git gcc g++ libbz2-dev libxml2-dev wget \
8-
libzip-dev libboost1.81-all-dev lua5.4 liblua5.4-dev pkg-config -o APT::Install-Suggests=0 -o APT::Install-Recommends=0
9-
10-
RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
11-
ldconfig /usr/local/lib && \
12-
git clone --branch v2021.12.0 --single-branch https://github.com/oneapi-src/oneTBB.git && \
13-
cd oneTBB && \
14-
mkdir build && \
15-
cd build && \
16-
cmake -DTBB_TEST=OFF -DCMAKE_BUILD_TYPE=Release .. && \
17-
cmake --build . && \
18-
cmake --install .
5+
RUN mkdir -p /src /opt && \
6+
apt-get update && \
7+
apt-get -y --no-install-recommends --no-install-suggests install \
8+
ca-certificates \
9+
cmake \
10+
g++ \
11+
gcc \
12+
git \
13+
libboost1.81-all-dev \
14+
libbz2-dev \
15+
liblua5.4-dev \
16+
libtbb-dev \
17+
libxml2-dev \
18+
libzip-dev \
19+
lua5.4 \
20+
make \
21+
pkg-config
1922

2023
COPY . /src
2124
WORKDIR /src
@@ -41,19 +44,24 @@ RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
4144
rm -rf /src
4245

4346

44-
# Multistage build to reduce image size - https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds
47+
# Multistage build to reduce image size - https://docs.docker.com/build/building/multi-stage/#use-multi-stage-builds
4548
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
46-
FROM debian:bookworm-slim as runstage
49+
FROM debian:bookworm-slim AS runstage
4750

4851
COPY --from=builder /usr/local /usr/local
4952
COPY --from=builder /opt /opt
5053

5154
RUN apt-get update && \
52-
apt-get install -y --no-install-recommends \
53-
libboost-program-options1.81.0 libboost-date-time1.81.0 libboost-iostreams1.81.0 libboost-thread1.81.0 \
54-
expat liblua5.4-0 && \
55+
apt-get install -y --no-install-recommends --no-install-suggests \
56+
expat \
57+
libboost-date-time1.81.0 \
58+
libboost-iostreams1.81.0 \
59+
libboost-program-options1.81.0 \
60+
libboost-thread1.81.0 \
61+
liblua5.4-0 \
62+
libtbb12 && \
5563
rm -rf /var/lib/apt/lists/* && \
56-
# add /usr/local/lib to ldconfig to allow loading libraries from there
64+
# Add /usr/local/lib to ldconfig to allow loading libraries from there
5765
ldconfig /usr/local/lib
5866

5967
RUN /usr/local/bin/osrm-extract --help && \
@@ -65,3 +73,4 @@ RUN /usr/local/bin/osrm-extract --help && \
6573
WORKDIR /opt
6674

6775
EXPOSE 5000
76+

features/foot/access.feature

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ Feature: Foot - Access tags on ways
2626
| motorway | no | | |
2727
| motorway | no | yes | x |
2828
| motorway | no | no | |
29-
29+
| platform | | | x |
30+
| platform | | yes | x |
31+
| platform | | no | |
32+
| platform | yes | | x |
33+
| platform | yes | yes | x |
34+
| platform | yes | no | |
35+
| platform | no | | |
36+
| platform | no | yes | x |
37+
| platform | no | no | |
3038

3139
Scenario: Foot - Overwriting implied acccess on ways
3240
Then routability should be

0 commit comments

Comments
 (0)