Merge remote-tracking branch 'origin/master' into replace_boost_stringref

This commit is contained in:
Dennis Luxen 2022-11-04 11:43:41 +01:00
commit 7359d6a21b
12 changed files with 19076 additions and 380 deletions

View File

@ -73,11 +73,11 @@ jobs:
format-taginfo-docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16
- name: Enable Node.js cache
uses: actions/cache@v3
with:
@ -146,7 +146,7 @@ jobs:
include:
- name: gcc-9-debug-cov
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
@ -157,7 +157,7 @@ jobs:
- name: gcc-9-debug-asan-ubsan
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
@ -171,7 +171,7 @@ jobs:
- name: clang-6.0-debug
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
@ -181,7 +181,7 @@ jobs:
- name: clang-11.0-debug-clang-tidy
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-22.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
@ -192,7 +192,7 @@ jobs:
- name: conan-linux-debug-asan-ubsan
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
@ -203,7 +203,7 @@ jobs:
- name: conan-linux-release
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
@ -213,7 +213,7 @@ jobs:
- name: gcc-11-release
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
@ -223,7 +223,7 @@ jobs:
- name: gcc-10-release
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
@ -232,7 +232,7 @@ jobs:
- name: gcc-9-release
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
@ -242,7 +242,7 @@ jobs:
- name: gcc-9-conan-release-i686
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
@ -255,7 +255,7 @@ jobs:
- name: gcc-8-release
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
@ -265,39 +265,13 @@ jobs:
- name: gcc-7-release
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: gcc-7
CXXCOMPILER: g++-7
- name: conan-macos-x64-release-node-12
build_node_package: true
continue-on-error: false
node: 12
runs-on: macos-11
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: clang
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_CONAN: ON
- name: conan-macos-x64-release-node-14
build_node_package: true
continue-on-error: false
node: 14
runs-on: macos-11
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: clang
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_CONAN: ON
- name: conan-macos-x64-release-node-16
build_node_package: true
continue-on-error: false
@ -325,9 +299,36 @@ jobs:
ENABLE_CONAN: ON
ENABLE_APPLE_SILICON: ON
- name: conan-macos-x64-release-node-18
build_node_package: true
continue-on-error: false
node: 18
runs-on: macos-11
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: clang
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_CONAN: ON
- name: conan-macos-arm64-release-node-18
build_node_package: true
continue-on-error: false
node: 18
runs-on: macos-11
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: clang
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_CONAN: ON
ENABLE_APPLE_SILICON: ON
- name: gcc-7-release-shared
continue-on-error: false
node: 12
node: 16
runs-on: ubuntu-20.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
@ -335,51 +336,6 @@ jobs:
CCOMPILER: gcc-7
CXXCOMPILER: g++-7
- name: node-12-conan-linux-release
build_node_package: true
continue-on-error: false
node: 12
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: node-12-conan-linux-debug
build_node_package: true
continue-on-error: false
node: 12
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: node-14-conan-linux-release
build_node_package: true
continue-on-error: false
node: 14
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: node-14-conan-linux-debug
build_node_package: true
continue-on-error: false
node: 14
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: node-16-conan-linux-release
build_node_package: true
continue-on-error: false
@ -402,6 +358,28 @@ jobs:
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: node-18-conan-linux-release
build_node_package: true
continue-on-error: false
node: 18
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: node-18-conan-linux-debug
build_node_package: true
continue-on-error: false
node: 18
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: conan-macos-x64-release-node-latest
build_node_package: true
continue-on-error: true
@ -449,53 +427,6 @@ jobs:
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: conan-macos-x64-release-node-lts
build_node_package: true
continue-on-error: true
node: "lts/*"
runs-on: macos-11
BUILD_TYPE: Release
CCOMPILER: clang
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_CONAN: ON
- name: conan-macos-arm64-release-node-lts
build_node_package: true
continue-on-error: true
node: "lts/*"
runs-on: macos-11
BUILD_TYPE: Release
CCOMPILER: clang
CXXCOMPILER: clang++
CUCUMBER_TIMEOUT: 60000
ENABLE_ASSERTIONS: ON
ENABLE_CONAN: ON
ENABLE_APPLE_SILICON: ON
- name: node-lts-conan-linux-release
build_node_package: true
continue-on-error: true
node: "lts/*"
runs-on: ubuntu-20.04
BUILD_TYPE: Release
CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
- name: node-lts-conan-linux-debug
build_node_package: true
continue-on-error: true
node: "lts/*"
runs-on: ubuntu-20.04
BUILD_TYPE: Debug
CCOMPILER: clang-6.0
CXXCOMPILER: clang++-6.0
ENABLE_CONAN: ON
NODE_PACKAGE_TESTS_ONLY: ON
name: ${{ matrix.name}}
continue-on-error: ${{ matrix.continue-on-error }}
runs-on: ${{ matrix.runs-on }}
@ -519,7 +450,7 @@ jobs:
OSRM_CONNECTION_RETRIES: ${{ matrix.OSRM_CONNECTION_RETRIES }}
OSRM_CONNECTION_EXP_BACKOFF_COEF: ${{ matrix.OSRM_CONNECTION_EXP_BACKOFF_COEF }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3

View File

@ -2,6 +2,7 @@
- Changes from 5.27.1
- Build:
- CHANGED: Update actions/cache to v3. [#6420](https://github.com/Project-OSRM/osrm-backend/pull/6420)
- REMOVED: Drop support of Node 12 & 14. [#6431](https://github.com/Project-OSRM/osrm-backend/pull/6431)
- Misc:
- FIXED: Handle snapping parameter for all plugins in NodeJs bindings, but not for Route only. [#6417](https://github.com/Project-OSRM/osrm-backend/pull/6417)
- FIXED: Fix annotations=true handling in NodeJS bindings & libosrm. [#6415](https://github.com/Project-OSRM/osrm-backend/pull/6415/)

View File

@ -1,75 +0,0 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "user for publishing to s3://mapbox-node-binary/osrm",
"Resources": {
"User": {
"Type": "AWS::IAM::User",
"Properties": {
"Policies": [
{
"PolicyName": "list",
"PolicyDocument": {
"Statement": [
{
"Action": [
"s3:ListBucket"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::mapbox-node-binary",
"Condition": {
"StringLike": {
"s3:prefix": [
"osrm/*"
]
}
}
}
]
}
},
{
"PolicyName": "publish",
"PolicyDocument": {
"Statement": [
{
"Action": [
"s3:DeleteObject",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:PutObject",
"s3:PutObjectAcl"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::mapbox-node-binary/osrm/*"
}
]
}
}
]
}
},
"AccessKey": {
"Type": "AWS::IAM::AccessKey",
"Properties": {
"UserName": {
"Ref": "User"
}
}
}
},
"Outputs": {
"AccessKeyId": {
"Value": {
"Ref": "AccessKey"
}
},
"SecretAccessKey": {
"Value": {
"Fn::GetAtt": [
"AccessKey",
"SecretAccessKey"
]
}
}
}
}

View File

@ -1,59 +0,0 @@
var cf = require('@mapbox/cloudfriend');
var package_json = require('../package.json')
module.exports = {
AWSTemplateFormatVersion: '2010-09-09',
Description: 'user for publishing to s3://mapbox-node-binary/' + package_json.name,
Resources: {
User: {
Type: 'AWS::IAM::User',
Properties: {
Policies: [
{
PolicyName: 'list',
PolicyDocument: {
Statement: [
{
Action: ['s3:ListBucket'],
Effect: 'Allow',
Resource: 'arn:aws:s3:::mapbox-node-binary',
Condition : {
StringLike : {
"s3:prefix": [ package_json.name + "/*"]
}
}
}
]
}
},
{
PolicyName: 'publish',
PolicyDocument: {
Statement: [
{
Action: ['s3:DeleteObject', 's3:GetObject', 's3:GetObjectAcl', 's3:PutObject', 's3:PutObjectAcl'],
Effect: 'Allow',
Resource: 'arn:aws:s3:::mapbox-node-binary/' + package_json.name + '/*'
}
]
}
}
]
}
},
AccessKey: {
Type: 'AWS::IAM::AccessKey',
Properties: {
UserName: cf.ref('User')
}
}
},
Outputs: {
AccessKeyId: {
Value: cf.ref('AccessKey')
},
SecretAccessKey: {
Value: cf.getAtt('AccessKey', 'SecretAccessKey')
}
}
};

View File

@ -6,8 +6,8 @@
#include "util/typedefs.hpp"
#include <boost/range/adaptor/filtered.hpp>
#include <boost/unordered_map.hpp>
#include <unordered_map>
#include <utility>
#include <vector>

View File

@ -2,11 +2,13 @@
#define OSRM_EXTRACTOR_RESTRICTION_GRAPH_HPP_
#include <boost/assert.hpp>
#include <boost/unordered_map.hpp>
#include "util/node_based_graph.hpp"
#include "util/std_hash.hpp"
#include "util/typedefs.hpp"
#include <unordered_map>
namespace osrm
{
namespace extractor
@ -112,10 +114,10 @@ struct RestrictionGraph
RestrictionRange GetRestrictions(RestrictionID id) const;
// A compressed node-based edge can only have one start node in the restriction graph.
boost::unordered_map<EdgeKey, RestrictionID> start_edge_to_node{};
std::unordered_map<EdgeKey, RestrictionID> start_edge_to_node{};
// A compressed node-based edge can have multiple via nodes in the restriction graph
// (as the compressed edge can appear in paths with different prefixes).
boost::unordered_multimap<EdgeKey, RestrictionID> via_edge_to_node{};
std::unordered_multimap<EdgeKey, RestrictionID> via_edge_to_node{};
std::vector<RestrictionNode> nodes;
// TODO: Investigate reusing DynamicGraph. Currently it requires specific attributes
// (e.g. reversed, weight) that would not make sense for restrictions.

View File

@ -2,9 +2,9 @@
#define OSRM_EXTRACTOR_TRAFFIC_SIGNALS_HPP
#include "util/typedefs.hpp"
#include <unordered_set>
#include <boost/unordered_set.hpp>
#include <boost/functional/hash.hpp>
#include <unordered_set>
namespace osrm
{

View File

@ -3,7 +3,7 @@
#include "util/typedefs.hpp"
#include <boost/unordered_map.hpp>
#include <unordered_map>
#include <vector>
namespace osrm
@ -43,9 +43,9 @@ class TurnPathCompressor
// via nodes are the same.
// Similarly, we do not compress the instruction via node in a maneuver override, as we need
// this to identify the location of the maneuver during routing path-processing.
boost::unordered_multimap<NodeID, TurnPath *> starts;
boost::unordered_multimap<NodeID, TurnPath *> vias;
boost::unordered_multimap<NodeID, TurnPath *> ends;
std::unordered_multimap<NodeID, TurnPath *> starts;
std::unordered_multimap<NodeID, TurnPath *> vias;
std::unordered_multimap<NodeID, TurnPath *> ends;
};
} // namespace extractor

View File

@ -1,17 +1,16 @@
#ifndef OSRM_EXTRACTOR_WAY_RESTRICTION_MAP_HPP_
#define OSRM_EXTRACTOR_WAY_RESTRICTION_MAP_HPP_
#include <utility>
#include <vector>
// to access the turn restrictions
#include <boost/unordered_map.hpp>
#include "extractor/restriction.hpp"
#include "extractor/restriction_graph.hpp"
#include "util/integer_range.hpp"
#include "util/typedefs.hpp"
// to access the turn restrictions
#include <unordered_map>
#include <utility>
#include <vector>
namespace osrm
{
namespace extractor

19067
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,11 +3,11 @@
#include "engine/datafacade/datafacade_base.hpp"
#include <boost/assert.hpp>
#include <boost/unordered_set.hpp>
#include <algorithm>
#include <iterator>
#include <tuple>
#include <unordered_set>
namespace osrm
{
@ -106,8 +106,8 @@ bool Hint::IsValid(const util::Coordinate new_input_coordinates,
// Check hints do not contain duplicate segment pairs
// We can't allow duplicates as search heaps do not support it.
boost::unordered_set<NodeID> forward_segments;
boost::unordered_set<NodeID> reverse_segments;
std::unordered_set<NodeID> forward_segments;
std::unordered_set<NodeID> reverse_segments;
for (const auto &seg_hint : segment_hints)
{
const auto forward_res = forward_segments.insert(seg_hint.phantom.forward_segment_id.id);

View File

@ -34,20 +34,6 @@
#include <tbb/parallel_for.h>
#include <tbb/parallel_pipeline.h>
namespace std
{
template <> struct hash<std::pair<NodeID, NodeID>>
{
std::size_t operator()(const std::pair<NodeID, NodeID> &mk) const noexcept
{
std::size_t seed = 0;
boost::hash_combine(seed, mk.first);
boost::hash_combine(seed, mk.second);
return seed;
}
};
} // namespace std
namespace osrm
{
namespace extractor
@ -1283,7 +1269,7 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
std::vector<ConditionalTurnPenalty>
EdgeBasedGraphFactory::IndexConditionals(std::vector<Conditional> &&conditionals) const
{
boost::unordered_multimap<std::pair<NodeID, NodeID>, ConditionalTurnPenalty *> index;
std::unordered_multimap<std::pair<NodeID, NodeID>, ConditionalTurnPenalty *> index;
// build and index of all conditional restrictions
for (auto &conditional : conditionals)