Skip to content

Commit 6e1e8f9

Browse files
authored
Merge branch 'master' into fix/invalid_contract_node
2 parents 7542f1a + f3615b4 commit 6e1e8f9

Some content is hidden

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

49 files changed

+724
-1591
lines changed

.github/workflows/osrm-backend.yml

Lines changed: 39 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@ concurrency:
2323
cancel-in-progress: true
2424

2525
jobs:
26-
windows-release-node:
26+
conan-windows-release-node:
2727
needs: format-taginfo-docs
2828
runs-on: windows-2022
2929
continue-on-error: false
3030
env:
3131
BUILD_TYPE: Release
3232
steps:
3333
- uses: actions/checkout@v4
34-
- run: pip install "conan<2.0.0"
35-
- run: conan --version
3634
- run: cmake --version
3735
- uses: actions/setup-node@v4
3836
with:
@@ -51,6 +49,12 @@ jobs:
5149
run: |
5250
mkdir build
5351
cd build
52+
53+
python3 -m venv .venv
54+
source .venv/Scripts/Activate
55+
python3 -m pip install conan==2.7.1
56+
conan profile detect --force
57+
5458
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON ..
5559
cmake --build . --config Release
5660
@@ -161,7 +165,7 @@ jobs:
161165
curl --retry-delay 3 --retry 10 --retry-all-errors "http://127.0.0.1:5000/route/v1/driving/13.388860,52.517037;13.385983,52.496891?steps=true"
162166
docker stop osrm-container
163167
164-
build-test-publish:
168+
build-matrix:
165169
needs: format-taginfo-docs
166170
strategy:
167171
matrix:
@@ -193,7 +197,7 @@ jobs:
193197

194198
- name: clang-18-release
195199
continue-on-error: false
196-
node: 18
200+
node: 20
197201
runs-on: ubuntu-24.04
198202
BUILD_TOOLS: ON
199203
BUILD_TYPE: Release
@@ -338,7 +342,7 @@ jobs:
338342
build_node_package: true
339343
continue-on-error: true
340344
node: 20
341-
runs-on: macos-14 # arm64
345+
runs-on: macos-15 # arm64
342346
BUILD_TYPE: Release
343347
CCOMPILER: clang
344348
CXXCOMPILER: clang++
@@ -393,10 +397,10 @@ jobs:
393397
- name: Enable Conan cache
394398
uses: actions/cache@v4
395399
with:
396-
path: ~/.conan
397-
key: v9-conan-${{ matrix.name }}-${{ github.sha }}
400+
path: ~/.conan2
401+
key: v10-conan-${{ matrix.name }}-${{ github.sha }}
398402
restore-keys: |
399-
v9-conan-${{ matrix.name }}-
403+
v10-conan-${{ matrix.name }}-
400404
- name: Enable test cache
401405
uses: actions/cache@v4
402406
with:
@@ -430,35 +434,16 @@ jobs:
430434
- name: Give tar root ownership
431435
if: runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON'
432436
run: sudo chown root /bin/tar && sudo chmod u+s /bin/tar
433-
- name: Cache Boost
434-
if: runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON'
435-
id: cache-boost
436-
uses: actions/cache@v4
437-
with:
438-
path: |
439-
/usr/local/include/boost
440-
/usr/local/lib/libboost*
441-
key: v1-boost-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runs-on }}
442-
restore-keys: |
443-
v1-boost-${{ runner.os }}-${{ runner.arch }}-${{ matrix.runs-on }}
444437

445-
- name: Install Boost
446-
if: steps.cache-boost.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON'
447-
run: |
448-
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}
453-
sudo ./bootstrap.sh
454-
sudo ./b2 install
455-
cd ..
456-
sudo rm -rf boost_${BOOST_VERSION_UNDERSCORE}*
438+
- name: Install boost
439+
if: ${{ matrix.ENABLE_CONAN != 'ON' }}
440+
uses: MarkusJx/install-boost@v2
441+
id: install-boost
442+
with:
443+
boost_version: 1.85.0
457444

458445
- name: Install dev dependencies
459446
run: |
460-
python3 -m pip install "conan<2.0.0" || python3 -m pip install "conan<2.0.0" --break-system-packages
461-
462447
# workaround for issue that GitHub Actions seems to not adding it to PATH after https://github.com/actions/runner-images/pull/6499
463448
# and that's why CI cannot find conan executable installed above
464449
if [[ "${RUNNER_OS}" == "macOS" ]]; then
@@ -495,20 +480,6 @@ jobs:
495480
tar zxvf onetbb.tgz
496481
sudo cp -a oneapi-tbb-${TBB_VERSION}/lib/. /usr/local/lib/
497482
sudo cp -a oneapi-tbb-${TBB_VERSION}/include/. /usr/local/include/
498-
- name: Add Clang 18 to list of Conan compilers # workaround for the issue that Conan 1.x doesn't know about Clang 18
499-
if: ${{ matrix.ENABLE_CONAN == 'ON' && matrix.CCOMPILER == 'clang-18' }}
500-
run: |
501-
sudo wget https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq
502-
503-
conan config init
504-
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"
512483
- name: Prepare build
513484
run: |
514485
mkdir ${OSRM_BUILD_DIR}
@@ -530,7 +501,14 @@ jobs:
530501
run: |
531502
echo "Using ${JOBS} jobs"
532503
pushd ${OSRM_BUILD_DIR}
533-
504+
505+
if [[ "${ENABLE_CONAN}" == "ON" ]]; then
506+
python3 -m venv .venv
507+
source .venv/bin/activate
508+
python3 -m pip install conan==2.7.1
509+
conan profile detect --force
510+
fi
511+
534512
ccache --zero-stats
535513
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
536514
-DENABLE_CONAN=${ENABLE_CONAN:-OFF} \
@@ -544,6 +522,7 @@ jobs:
544522
-DENABLE_CCACHE=ON \
545523
-DENABLE_LTO=${ENABLE_LTO:-ON} \
546524
-DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR}
525+
547526
make --jobs=${JOBS}
548527
549528
if [[ "${NODE_PACKAGE_TESTS_ONLY}" != "ON" ]]; then
@@ -557,11 +536,14 @@ jobs:
557536
echo "PKG_CONFIG_PATH=${OSRM_INSTALL_DIR}/lib/pkgconfig" >> $GITHUB_ENV
558537
fi
559538
popd
539+
env:
540+
Boost_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
560541
- name: Build example
561-
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' }}
542+
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' && matrix.ENABLE_CONAN != 'ON' }}
562543
run: |
563544
mkdir example/build && pushd example/build
564-
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
545+
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
546+
-DBoost_ROOT=${{ steps.install-boost.outputs.BOOST_ROOT }}
565547
make --jobs=${JOBS}
566548
popd
567549
- name: Run all tests
@@ -570,8 +552,10 @@ jobs:
570552
make -C test/data benchmark
571553
572554
# macOS SIP strips the linker path. Reset this inside the running shell
573-
export LD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }}
574-
./example/build/osrm-example test/data/mld/monaco.osrm
555+
if [[ "${ENABLE_CONAN}" == "OFF" ]]; then
556+
export LD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }}
557+
./example/build/osrm-example test/data/mld/monaco.osrm
558+
fi
575559
576560
# All tests assume to be run from the build directory
577561
pushd ${OSRM_BUILD_DIR}
@@ -657,130 +641,9 @@ jobs:
657641
ccache -p
658642
ccache -s
659643
660-
benchmarks:
661-
if: github.event_name == 'pull_request'
662-
needs: [format-taginfo-docs]
663-
runs-on: self-hosted
664-
env:
665-
CCOMPILER: clang-16
666-
CXXCOMPILER: clang++-16
667-
CC: clang-16
668-
CXX: clang++-16
669-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
670-
PR_NUMBER: ${{ github.event.pull_request.number }}
671-
GITHUB_REPOSITORY: ${{ github.repository }}
672-
RUN_BIG_BENCHMARK: ${{ contains(github.event.pull_request.labels.*.name, 'Performance') }}
673-
steps:
674-
- name: Checkout PR Branch
675-
uses: actions/checkout@v4
676-
with:
677-
ref: ${{ github.head_ref }}
678-
path: pr
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"
685-
- name: Prepare data
686-
run: |
687-
if [ "$RUN_BIG_BENCHMARK" = "true" ]; then
688-
rm -rf ~/data.osm.pbf
689-
wget http://download.geofabrik.de/europe/poland-latest.osm.pbf -O ~/data.osm.pbf --quiet
690-
gunzip -c ./pr/test/data/poland_gps_traces.csv.gz > ~/gps_traces.csv
691-
else
692-
if [ ! -f "~/data.osm.pbf" ]; then
693-
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf -O ~/data.osm.pbf
694-
else
695-
echo "Using cached data.osm.pbf"
696-
fi
697-
gunzip -c ./pr/test/data/berlin_gps_traces.csv.gz > ~/gps_traces.csv
698-
fi
699-
- name: Prepare environment
700-
run: |
701-
echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV
702-
mkdir -p $HOME/.ccache
703-
ccache --zero-stats
704-
ccache --max-size=256M
705-
- name: Checkout Base Branch
706-
uses: actions/checkout@v4
707-
with:
708-
ref: ${{ github.event.pull_request.base.ref }}
709-
path: base
710-
- name: Build Base Branch
711-
run: |
712-
cd base
713-
npm ci --ignore-scripts
714-
cd ..
715-
mkdir base/build
716-
cd base/build
717-
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=ON ..
718-
make -j$(nproc)
719-
make -j$(nproc) benchmarks
720-
cd ..
721-
make -C test/data
722-
- name: Build PR Branch
723-
run: |
724-
cd pr
725-
npm ci --ignore-scripts
726-
cd ..
727-
mkdir -p pr/build
728-
cd pr/build
729-
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=ON ..
730-
make -j$(nproc)
731-
make -j$(nproc) benchmarks
732-
cd ..
733-
make -C test/data
734-
# we run benchmarks in tmpfs to avoid impact of disk IO
735-
- name: Create folder for tmpfs
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
742-
- name: Run PR Benchmarks
743-
run: |
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
755-
- name: Run Base Benchmarks
756-
run: |
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
764-
765-
# TODO: remove it when base branch will have this file at needed location
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
768-
fi
769-
# we intentionally use scripts from PR branch to be able to update them and see results in the same PR
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
773-
- name: Post Benchmark Results
774-
run: |
775-
python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
776-
- name: Show CCache statistics
777-
run: |
778-
ccache -p
779-
ccache -s
780-
781644
ci-complete:
782-
runs-on: ubuntu-22.04
783-
needs: [build-test-publish, docker-image-matrix, windows-release-node, benchmarks]
645+
runs-on: ubuntu-latest
646+
needs: [build-matrix, conan-windows-release-node, docker-image-matrix]
784647
steps:
785648
- run: echo "CI complete"
786649

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- ADDED: Add support for opposite approach request parameter. [#6842](https://github.com/Project-OSRM/osrm-backend/pull/6842)
1010
- ADDED: Add support for accessing edge flags in `process_segment` [#6658](https://github.com/Project-OSRM/osrm-backend/pull/6658)
1111
- Build:
12+
- CHANGED: Fix compilation with upcoming Boost 1.87.0 [#7073](https://github.com/Project-OSRM/osrm-backend/pull/7073)
1213
- CHANGED: Upgrade clang-format to version 15. [#6919](https://github.com/Project-OSRM/osrm-backend/pull/6919)
1314
- CHANGED: Use Debian Bookworm as base Docker image [#6904](https://github.com/Project-OSRM/osrm-backend/pull/6904)
1415
- CHANGED: Upgrade CI actions to latest versions [#6893](https://github.com/Project-OSRM/osrm-backend/pull/6893)
@@ -25,6 +26,7 @@
2526
- NodeJS:
2627
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
2728
- Misc:
29+
- CHANGED: Migrate to Conan 2.x. [#7042](https://github.com/Project-OSRM/osrm-backend/pull/7042)
2830
- CHANGED: Use std::string_view for key type in json::Object. [#7062](https://github.com/Project-OSRM/osrm-backend/pull/7062)
2931
- CHANGED: Use thread_local instead of boost::thread_specific_ptr. [#6991](https://github.com/Project-OSRM/osrm-backend/pull/6991)
3032
- CHANGED: Bump flatbuffers to v24.3.25 version. [#6988](https://github.com/Project-OSRM/osrm-backend/pull/6988)
@@ -78,6 +80,8 @@
7880
- FIXED: Ensure required file check in osrm-routed is correctly enforced. [#6655](https://github.com/Project-OSRM/osrm-backend/pull/6655)
7981
- FIXED: Correct HTTP docs to reflect summary output dependency on steps parameter. [#6655](https://github.com/Project-OSRM/osrm-backend/pull/6655)
8082
- ADDED: Extract prerelease/build information from package semver [#6839](https://github.com/Project-OSRM/osrm-backend/pull/6839)
83+
- FIXED: Segfault in `UnresolvedManeuverOverride::Turns()` on Australia extracts [#7112](https://github.com/Project-OSRM/osrm-backend/pull/7112)
84+
- CHANGED: Replaced PL:trunk with PL:expressway to match the latest changes in Polish tagging [#7079](https://github.com/Project-OSRM/osrm-backend/pull/7079)
8185
- Profiles:
8286
- FIXED: Bicycle and foot profiles now don't route on proposed ways [#6615](https://github.com/Project-OSRM/osrm-backend/pull/6615)
8387
- ADDED: Add optional support of cargo bike exclusion and width to bicyle profile [#7044](https://github.com/Project-OSRM/osrm-backend/pull/7044)

0 commit comments

Comments
 (0)