Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Unreleased
- Changes from 6.0.0
- Misc:
- CHANGED: Update fmt library to version 11.2.0 [#7238](https://github.com/Project-OSRM/osrm-backend/issues/7238)
- CHANGED: Upgrade protozero from v1.7.1 to v1.8.1 [#7239](https://github.com/Project-OSRM/osrm-backend/pull/7239)
- CHANGED: Replace std::is_trivial with std::is_trivially_default_constructible && std::is_trivially_copyable [#7245](https://github.com/Project-OSRM/osrm-backend/issues/7245)
- CHANGED: Replace `std::is_trivial` with `std::is_trivially_default_constructible && std::is_trivially_copyable` [#7245](https://github.com/Project-OSRM/osrm-backend/issues/7245)
- ADDED: Add husky pre-commit hook for compiling and linting staged JS files [#7228](https://github.com/Project-OSRM/osrm-backend/issues/7228)
- CHANGED: Standardize linting configuration with ESM-specific rules [#7229](https://github.com/Project-OSRM/osrm-backend/issues/7229)
- CHANGED: Convert scripts from CommonJS to modern ESM format [#7230](https://github.com/Project-OSRM/osrm-backend/pull/7230)
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# using Visual Studio C++
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") # avoid compiler error C1128 from scripting_environment_lua.cpp
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32_LEAN_AND_MEAN") # avoid compiler error C2011 from dual #include of winsock.h and winsock2.h
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8") # support Unicode in fmt library
add_dependency_defines(-DBOOST_LIB_DIAGNOSTIC)
add_dependency_defines(-D_CRT_SECURE_NO_WARNINGS)
add_dependency_defines(-DNOMINMAX) # avoid min and max macros that can break compilation
Expand Down
2 changes: 1 addition & 1 deletion scripts/update_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ VTZERO_PATH="mapbox/vtzero"
VTZERO_TAG=v1.1.0

FMT_PATH="fmtlib/fmt"
FMT_TAG=v10.2.1
FMT_TAG=11.2.0

FLATBUFFERS_PATH="google/flatbuffers"
FLATBUFFERS_TAG=v24.3.25
Expand Down
7 changes: 7 additions & 0 deletions third_party/fmt/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ IndentPPDirectives: AfterHash
IndentCaseLabels: false
AlwaysBreakTemplateDeclarations: false
DerivePointerAlignment: false
AllowShortCaseLabelsOnASingleLine: true
QualifierAlignment: Left
AlignConsecutiveShortCaseStatements:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
AlignCaseColons: false
4 changes: 2 additions & 2 deletions third_party/fmt/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2
updates:
- package-ecosystem: "github-actions" # Necessary to update action hashs
- package-ecosystem: "github-actions" # Necessary to update action hashes.
directory: "/"
schedule:
interval: "monthly"
# Allow up to 3 opened pull requests for github-actions versions
# Allow up to 3 opened pull requests for github-actions versions.
open-pull-requests-limit: 3
14 changes: 8 additions & 6 deletions third_party/fmt/.github/workflows/cifuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,24 @@ jobs:
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
- name: Build fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@061583ebb5a96653e42feb3a97ee513eedc18078 # master
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@92182553173581f871130c71c71b17f003d47b0a
with:
oss-fuzz-project-name: 'fmt'
dry-run: false
language: c++
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@061583ebb5a96653e42feb3a97ee513eedc18078 # master

- name: Run fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@92182553173581f871130c71c71b17f003d47b0a
with:
oss-fuzz-project-name: 'fmt'
fuzz-seconds: 300
dry-run: false
language: c++
- name: Upload Crash
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0

- name: Upload crash
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
Expand Down
25 changes: 16 additions & 9 deletions third_party/fmt/.github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,36 @@ permissions:

jobs:
build:
# Use Ubuntu 20.04 because doxygen 1.8.13 from Ubuntu 18.04 is broken.
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Add ubuntu mirrors
- name: Add Ubuntu mirrors
run: |
# Github Actions caching proxy is at times unreliable
# see https://github.com/actions/runner-images/issues/7048
printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
sudo sed -i 's~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:/etc/apt/mirrors.txt~' /etc/apt/sources.list

- name: Create Build Environment
- name: Create build environment
run: |
sudo apt update
sudo apt install doxygen python3-virtualenv
sudo npm install -g less clean-css
sudo apt install doxygen
pip install mkdocs-material==9.5.25 mkdocstrings==0.26.1 mike==2.1.1
cmake -E make_directory ${{runner.workspace}}/build
# Workaround https://github.com/actions/checkout/issues/13:
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"

- name: Build
working-directory: ${{runner.workspace}}/build
run: $GITHUB_WORKSPACE/support/mkdocs deploy dev

- name: Deploy
env:
KEY: ${{secrets.KEY}}
run: $GITHUB_WORKSPACE/support/build-docs.py
KEY: "${{secrets.KEY}}"
if: env.KEY != '' && github.ref == 'refs/heads/master'
working-directory: ${{runner.workspace}}/fmt/build/fmt.dev
run: git push https://[email protected]/fmtlib/fmt.dev.git
12 changes: 7 additions & 5 deletions third_party/fmt/.github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ jobs:
format_code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Install clang-format
uses: aminya/setup-cpp@v1
with:
clangformat: 17.0.5
run: |
wget https://apt.llvm.org/llvm.sh
sudo bash ./llvm.sh 17
sudo apt install clang-format-17

- name: Run clang-format
run: |
find include src -name '*.h' -o -name '*.cc' | xargs clang-format -i -style=file -fallback-style=none
find include src -name '*.h' -o -name '*.cc' | \
xargs clang-format-17 -i -style=file -fallback-style=none
git diff --exit-code
155 changes: 110 additions & 45 deletions third_party/fmt/.github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,80 +7,143 @@ permissions:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
cxx: [g++-4.8, g++-10, clang++-9]
cxx: [g++-4.9, g++-11, clang++-3.6, clang++-11]
build_type: [Debug, Release]
std: [11]
shared: [""]
include:
- cxx: g++-4.8
install: sudo apt install g++-4.8
- cxx: g++-8
- cxx: g++-4.9
- cxx: clang++-3.6
- cxx: g++-11
build_type: Debug
std: 14
install: sudo apt install g++-8
- cxx: g++-8
build_type: Debug
std: 17
install: sudo apt install g++-8
- cxx: g++-9
build_type: Debug
std: 17
- cxx: g++-10
install: sudo apt install g++-11
- cxx: g++-11
build_type: Debug
std: 17
- cxx: g++-11
build_type: Debug
std: 20
install: sudo apt install g++-11
- cxx: clang++-8
- cxx: g++-13
build_type: Release
std: 23
install: sudo apt install g++-13
shared: -DBUILD_SHARED_LIBS=ON
- cxx: clang++-11
build_type: Debug
std: 17
cxxflags: -stdlib=libc++
install: sudo apt install clang-8 libc++-8-dev libc++abi-8-dev
- cxx: clang++-9
install: sudo apt install clang-9
- cxx: clang++-9
install: sudo apt install clang-11 libc++-11-dev libc++abi-11-dev
- cxx: clang++-11
install: sudo apt install clang-11
- cxx: clang++-11
build_type: Debug
fuzz: -DFMT_FUZZ=ON -DFMT_FUZZ_LINKMAIN=ON
std: 17
install: sudo apt install clang-9
- cxx: clang++-11
install: sudo apt install clang-11
- cxx: clang++-14
build_type: Debug
std: 20
- cxx: clang++-11
- cxx: clang++-14
build_type: Debug
std: 20
cxxflags: -stdlib=libc++
install: sudo apt install libc++-11-dev libc++abi-11-dev
- shared: -DBUILD_SHARED_LIBS=ON
install: sudo apt install libc++-14-dev libc++abi-14-dev

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Set timezone
run: sudo timedatectl set-timezone 'Asia/Yekaterinburg'
run: sudo timedatectl set-timezone 'Europe/Kyiv'

- name: Install GCC 4.9
run: |
sudo apt update
sudo apt install libatomic1 libc6-dev libgomp1 libitm1 libmpc3
# https://launchpad.net/ubuntu/xenial/amd64/g++-4.9/4.9.3-13ubuntu2
wget --no-verbose \
http://launchpadlibrarian.net/230069137/libmpfr4_3.1.3-2_amd64.deb \
http://launchpadlibrarian.net/253728424/libasan1_4.9.3-13ubuntu2_amd64.deb \
http://launchpadlibrarian.net/445346135/libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/445346112/libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/253728426/libgcc-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
http://launchpadlibrarian.net/253728432/libstdc++-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
http://launchpadlibrarian.net/253728314/gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb \
http://launchpadlibrarian.net/445345919/gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/253728399/cpp-4.9_4.9.3-13ubuntu2_amd64.deb \
http://launchpadlibrarian.net/253728404/gcc-4.9_4.9.3-13ubuntu2_amd64.deb \
http://launchpadlibrarian.net/253728401/g++-4.9_4.9.3-13ubuntu2_amd64.deb
sudo dpkg -i \
libmpfr4_3.1.3-2_amd64.deb \
libasan1_4.9.3-13ubuntu2_amd64.deb \
libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
libgcc-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
libstdc++-4.9-dev_4.9.3-13ubuntu2_amd64.deb \
gcc-4.9-base_4.9.3-13ubuntu2_amd64.deb \
gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
cpp-4.9_4.9.3-13ubuntu2_amd64.deb \
gcc-4.9_4.9.3-13ubuntu2_amd64.deb \
g++-4.9_4.9.3-13ubuntu2_amd64.deb
if: ${{ matrix.cxx == 'g++-4.9' }}

- name: Install Clang 3.6
run: |
sudo apt update
sudo apt install libtinfo5
# https://code.launchpad.net/ubuntu/xenial/amd64/clang-3.6/1:3.6.2-3ubuntu2
wget --no-verbose \
http://launchpadlibrarian.net/230019046/libffi6_3.2.1-4_amd64.deb \
http://launchpadlibrarian.net/445346109/libasan2_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/445346135/libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/445346112/libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/445346128/libmpx0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/445346113/libgcc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/445346131/libstdc++-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/445346022/libobjc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/254405108/libllvm3.6v5_3.6.2-3ubuntu2_amd64.deb \
http://launchpadlibrarian.net/254405097/libclang-common-3.6-dev_3.6.2-3ubuntu2_amd64.deb \
http://launchpadlibrarian.net/254405101/libclang1-3.6_3.6.2-3ubuntu2_amd64.deb \
http://launchpadlibrarian.net/445345919/gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
http://launchpadlibrarian.net/254405091/clang-3.6_3.6.2-3ubuntu2_amd64.deb
sudo dpkg -i \
libffi6_3.2.1-4_amd64.deb \
libasan2_5.4.0-6ubuntu1~16.04.12_amd64.deb \
libubsan0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
libcilkrts5_5.4.0-6ubuntu1~16.04.12_amd64.deb \
libmpx0_5.4.0-6ubuntu1~16.04.12_amd64.deb \
libgcc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
libstdc++-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
libobjc-5-dev_5.4.0-6ubuntu1~16.04.12_amd64.deb \
libllvm3.6v5_3.6.2-3ubuntu2_amd64.deb \
libclang-common-3.6-dev_3.6.2-3ubuntu2_amd64.deb \
libclang1-3.6_3.6.2-3ubuntu2_amd64.deb \
gcc-5-base_5.4.0-6ubuntu1~16.04.12_amd64.deb \
clang-3.6_3.6.2-3ubuntu2_amd64.deb
if: ${{ matrix.cxx == 'clang++-3.6' }}

- name: Add repositories for older GCC
- name: Add repositories for newer GCC
run: |
# Below two repos provide GCC 4.8, 5.5 and 6.4
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic main'
sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic universe'
# Below two repos additionally update GCC 6 to 6.5
# sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic-updates main'
# sudo apt-add-repository 'deb http://azure.archive.ubuntu.com/ubuntu/ bionic-updates universe'
if: ${{ matrix.cxx == 'g++-4.8' }}
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
if: ${{ matrix.cxx == 'g++-13' }}

- name: Add ubuntu mirrors
- name: Add Ubuntu mirrors
run: |
# Github Actions caching proxy is at times unreliable
# see https://github.com/actions/runner-images/issues/7048
printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | sudo tee /etc/apt/mirrors.txt
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append /etc/apt/mirrors.txt
sudo sed -i 's~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:/etc/apt/mirrors.txt~' /etc/apt/sources.list
# GitHub Actions caching proxy is at times unreliable
# see https://github.com/actions/runner-images/issues/7048.
mirrors=/etc/apt/mirrors.txt
printf 'http://azure.archive.ubuntu.com/ubuntu\tpriority:1\n' | \
sudo tee $mirrors
curl http://mirrors.ubuntu.com/mirrors.txt | sudo tee --append $mirrors
sudo sed -i \
"s~http://azure.archive.ubuntu.com/ubuntu/~mirror+file:$mirrors~" \
/etc/apt/sources.list

- name: Create Build Environment
- name: Create build environment
run: |
sudo apt update
${{matrix.install}}
Expand All @@ -93,10 +156,12 @@ jobs:
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.fuzz}} ${{matrix.shared}} \
-DCMAKE_CXX_STANDARD=${{matrix.std}} -DFMT_DOC=OFF \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DFMT_PEDANTIC=ON -DFMT_WERROR=ON $GITHUB_WORKSPACE
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON \
${{matrix.fuzz}} ${{matrix.shared}} $GITHUB_WORKSPACE

- name: Build
working-directory: ${{runner.workspace}}/build
Expand Down
13 changes: 8 additions & 5 deletions third_party/fmt/.github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,26 @@ jobs:
build:
strategy:
matrix:
os: [macos-11, macos-13]
os: [macos-13, macos-14]
build_type: [Debug, Release]
std: [11, 17, 20]
shared: [""]
exclude:
- { os: macos-11, std: 20 }
- { os: macos-13, std: 11 }
- { os: macos-13, std: 17 }
include:
- shared: -DBUILD_SHARED_LIBS=ON
- os: macos-14
std: 23
build_type: Release
shared: -DBUILD_SHARED_LIBS=ON

runs-on: '${{ matrix.os }}'

steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Set timezone
run: sudo systemsetup -settimezone 'Asia/Yekaterinburg'
run: sudo systemsetup -settimezone 'Europe/Minsk'

- name: Select Xcode 14.3 (macOS 13)
run: sudo xcode-select -s "/Applications/Xcode_14.3.app"
Expand Down
Loading
Loading