Merge branch 'Project-OSRM:master' into patch-1
This commit is contained in:
commit
0e778d88e3
10
.github/workflows/osrm-backend.yml
vendored
10
.github/workflows/osrm-backend.yml
vendored
@ -446,14 +446,14 @@ jobs:
|
|||||||
if: steps.cache-boost.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON'
|
if: steps.cache-boost.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ENABLE_CONAN != 'ON'
|
||||||
run: |
|
run: |
|
||||||
BOOST_VERSION="1.85.0"
|
BOOST_VERSION="1.85.0"
|
||||||
BOOST_VERSION_UNDERSCORE="${BOOST_VERSION//./_}"
|
BOOST_VERSION_FLAVOR="${BOOST_VERSION}-b2-nodocs"
|
||||||
wget -q https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDERSCORE}.tar.gz
|
wget -q https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION_FLAVOR}.tar.gz
|
||||||
tar xzf boost_${BOOST_VERSION_UNDERSCORE}.tar.gz
|
tar xzf boost-${BOOST_VERSION_FLAVOR}.tar.gz
|
||||||
cd boost_${BOOST_VERSION_UNDERSCORE}
|
cd boost-${BOOST_VERSION}
|
||||||
sudo ./bootstrap.sh
|
sudo ./bootstrap.sh
|
||||||
sudo ./b2 install
|
sudo ./b2 install
|
||||||
cd ..
|
cd ..
|
||||||
sudo rm -rf boost_${BOOST_VERSION_UNDERSCORE}*
|
sudo rm -rf boost-${BOOST_VERSION}*
|
||||||
|
|
||||||
- name: Install dev dependencies
|
- name: Install dev dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -56,6 +56,9 @@ endif()
|
|||||||
if (POLICY CMP0074)
|
if (POLICY CMP0074)
|
||||||
cmake_policy(SET CMP0074 NEW)
|
cmake_policy(SET CMP0074 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
if (POLICY CMP0167)
|
||||||
|
cmake_policy(SET CMP0167 NEW)
|
||||||
|
endif()
|
||||||
project(OSRM C CXX)
|
project(OSRM C CXX)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,20 +1,34 @@
|
|||||||
FROM alpine:3.20.0 as alpine-mimalloc
|
FROM alpine:3.21.2 AS alpine-mimalloc
|
||||||
|
|
||||||
RUN apk add --no-cache mimalloc
|
RUN apk update && \
|
||||||
|
apk upgrade && \
|
||||||
|
apk add --no-cache \
|
||||||
|
boost-iostreams \
|
||||||
|
boost-program_options \
|
||||||
|
boost-thread \
|
||||||
|
mimalloc
|
||||||
|
|
||||||
ENV LD_PRELOAD=/usr/lib/libmimalloc.so.2
|
ENV LD_PRELOAD=/usr/lib/libmimalloc.so.2
|
||||||
ENV MIMALLOC_LARGE_OS_PAGES=1
|
ENV MIMALLOC_LARGE_OS_PAGES=1
|
||||||
|
|
||||||
|
|
||||||
FROM alpine-mimalloc as builder
|
FROM alpine-mimalloc AS builder
|
||||||
ARG DOCKER_TAG
|
ARG DOCKER_TAG
|
||||||
ARG BUILD_CONCURRENCY
|
ARG BUILD_CONCURRENCY
|
||||||
RUN mkdir -p /src && mkdir -p /opt
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN mkdir -p /src /opt && \
|
||||||
cmake make git clang libbz2 libxml2 \
|
apk add --no-cache \
|
||||||
boost-dev boost-program_options boost-filesystem boost-iostreams boost-thread \
|
boost-dev \
|
||||||
lua5.4-dev onetbb-dev expat-dev
|
boost-filesystem \
|
||||||
|
clang \
|
||||||
|
cmake \
|
||||||
|
expat-dev \
|
||||||
|
git \
|
||||||
|
libbz2 \
|
||||||
|
libxml2 \
|
||||||
|
lua5.4-dev \
|
||||||
|
make \
|
||||||
|
onetbb-dev
|
||||||
|
|
||||||
COPY . /src
|
COPY . /src
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
@ -39,16 +53,18 @@ RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
|
|||||||
rm -rf /src
|
rm -rf /src
|
||||||
|
|
||||||
|
|
||||||
# Multistage build to reduce image size - https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds
|
# Multistage build to reduce image size - https://docs.docker.com/build/building/multi-stage/#use-multi-stage-builds
|
||||||
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
|
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
|
||||||
FROM alpine-mimalloc as runstage
|
FROM alpine-mimalloc AS runstage
|
||||||
|
|
||||||
COPY --from=builder /usr/local /usr/local
|
COPY --from=builder /usr/local /usr/local
|
||||||
COPY --from=builder /opt /opt
|
COPY --from=builder /opt /opt
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
boost-program_options boost-date_time boost-iostreams boost-thread \
|
boost-date_time \
|
||||||
expat lua5.4 onetbb && \
|
expat \
|
||||||
|
lua5.4 \
|
||||||
|
onetbb && \
|
||||||
ldconfig /usr/local/lib
|
ldconfig /usr/local/lib
|
||||||
|
|
||||||
RUN /usr/local/bin/osrm-extract --help && \
|
RUN /usr/local/bin/osrm-extract --help && \
|
||||||
@ -60,3 +76,4 @@ RUN /usr/local/bin/osrm-extract --help && \
|
|||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
|
@ -1,21 +1,24 @@
|
|||||||
FROM debian:bookworm-slim as builder
|
FROM debian:bookworm-slim AS builder
|
||||||
ARG DOCKER_TAG
|
ARG DOCKER_TAG
|
||||||
ARG BUILD_CONCURRENCY
|
ARG BUILD_CONCURRENCY
|
||||||
RUN mkdir -p /src && mkdir -p /opt
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN mkdir -p /src /opt && \
|
||||||
apt-get -y --no-install-recommends install ca-certificates cmake make git gcc g++ libbz2-dev libxml2-dev wget \
|
apt-get update && \
|
||||||
libzip-dev libboost1.81-all-dev lua5.4 liblua5.4-dev pkg-config -o APT::Install-Suggests=0 -o APT::Install-Recommends=0
|
apt-get -y --no-install-recommends --no-install-suggests install \
|
||||||
|
ca-certificates \
|
||||||
RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
|
cmake \
|
||||||
ldconfig /usr/local/lib && \
|
g++ \
|
||||||
git clone --branch v2021.12.0 --single-branch https://github.com/oneapi-src/oneTBB.git && \
|
gcc \
|
||||||
cd oneTBB && \
|
git \
|
||||||
mkdir build && \
|
libboost1.81-all-dev \
|
||||||
cd build && \
|
libbz2-dev \
|
||||||
cmake -DTBB_TEST=OFF -DCMAKE_BUILD_TYPE=Release .. && \
|
liblua5.4-dev \
|
||||||
cmake --build . && \
|
libtbb-dev \
|
||||||
cmake --install .
|
libxml2-dev \
|
||||||
|
libzip-dev \
|
||||||
|
lua5.4 \
|
||||||
|
make \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
COPY . /src
|
COPY . /src
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
@ -41,19 +44,24 @@ RUN NPROC=${BUILD_CONCURRENCY:-$(nproc)} && \
|
|||||||
rm -rf /src
|
rm -rf /src
|
||||||
|
|
||||||
|
|
||||||
# Multistage build to reduce image size - https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds
|
# Multistage build to reduce image size - https://docs.docker.com/build/building/multi-stage/#use-multi-stage-builds
|
||||||
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
|
# Only the content below ends up in the image, this helps remove /src from the image (which is large)
|
||||||
FROM debian:bookworm-slim as runstage
|
FROM debian:bookworm-slim AS runstage
|
||||||
|
|
||||||
COPY --from=builder /usr/local /usr/local
|
COPY --from=builder /usr/local /usr/local
|
||||||
COPY --from=builder /opt /opt
|
COPY --from=builder /opt /opt
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends --no-install-suggests \
|
||||||
libboost-program-options1.81.0 libboost-date-time1.81.0 libboost-iostreams1.81.0 libboost-thread1.81.0 \
|
expat \
|
||||||
expat liblua5.4-0 && \
|
libboost-date-time1.81.0 \
|
||||||
|
libboost-iostreams1.81.0 \
|
||||||
|
libboost-program-options1.81.0 \
|
||||||
|
libboost-thread1.81.0 \
|
||||||
|
liblua5.4-0 \
|
||||||
|
libtbb12 && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
# add /usr/local/lib to ldconfig to allow loading libraries from there
|
# Add /usr/local/lib to ldconfig to allow loading libraries from there
|
||||||
ldconfig /usr/local/lib
|
ldconfig /usr/local/lib
|
||||||
|
|
||||||
RUN /usr/local/bin/osrm-extract --help && \
|
RUN /usr/local/bin/osrm-extract --help && \
|
||||||
@ -65,3 +73,4 @@ RUN /usr/local/bin/osrm-extract --help && \
|
|||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
|
3
third_party/sol2/include/sol/sol.hpp
vendored
3
third_party/sol2/include/sol/sol.hpp
vendored
@ -6752,7 +6752,8 @@ namespace sol {
|
|||||||
static_assert(std::is_constructible<T, Args&&...>::value, "T must be constructible with Args");
|
static_assert(std::is_constructible<T, Args&&...>::value, "T must be constructible with Args");
|
||||||
|
|
||||||
*this = nullopt;
|
*this = nullopt;
|
||||||
this->construct(std::forward<Args>(args)...);
|
new (static_cast<void*>(this)) optional(std::in_place, std::forward<Args>(args)...);
|
||||||
|
return **this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Swaps this optional with the other.
|
/// Swaps this optional with the other.
|
||||||
|
Loading…
Reference in New Issue
Block a user