wip
This commit is contained in:
parent
ce1259790a
commit
4b4f0e4b57
170
.github/workflows/osrm-backend.yml
vendored
170
.github/workflows/osrm-backend.yml
vendored
@ -20,90 +20,90 @@ env:
|
|||||||
ENABLE_NODE_BINDINGS: "ON"
|
ENABLE_NODE_BINDINGS: "ON"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# windows:
|
windows:
|
||||||
# needs: format-taginfo-docs
|
needs: format-taginfo-docs
|
||||||
# runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
# continue-on-error: false
|
continue-on-error: false
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
# - run: pip install conan==1.51.3
|
- run: pip install conan==1.51.3
|
||||||
# - run: conan --version
|
- run: conan --version
|
||||||
# - run: cmake --version
|
- run: cmake --version
|
||||||
# - uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
# with:
|
with:
|
||||||
# node-version: 16
|
node-version: 16
|
||||||
# - run: node --version
|
- run: node --version
|
||||||
# - run: npm --version
|
- run: npm --version
|
||||||
# - run: npm install --ignore-scripts
|
- run: npm install --ignore-scripts
|
||||||
# - run: npm link --ignore-scripts
|
- run: npm link --ignore-scripts
|
||||||
# - uses: microsoft/setup-msbuild@v1.1
|
- uses: microsoft/setup-msbuild@v1.1
|
||||||
# - name: Build
|
- name: Build
|
||||||
# run: |
|
run: |
|
||||||
# .\scripts\ci\windows-build.bat
|
.\scripts\ci\windows-build.bat
|
||||||
|
|
||||||
# format-taginfo-docs:
|
format-taginfo-docs:
|
||||||
# runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
# - name: Use Node.js
|
- name: Use Node.js
|
||||||
# uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
# with:
|
with:
|
||||||
# node-version: 12
|
node-version: 12
|
||||||
# - name: Enable Node.js cache
|
- name: Enable Node.js cache
|
||||||
# uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
# with:
|
with:
|
||||||
# path: ~/.npm
|
path: ~/.npm
|
||||||
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
# restore-keys: |
|
restore-keys: |
|
||||||
# ${{ runner.os }}-node-
|
${{ runner.os }}-node-
|
||||||
# - name: Prepare environment
|
- name: Prepare environment
|
||||||
# run: |
|
run: |
|
||||||
# npm ci --ignore-scripts
|
npm ci --ignore-scripts
|
||||||
# export MASON=${GITHUB_WORKSPACE}/scripts/mason.sh
|
export MASON=${GITHUB_WORKSPACE}/scripts/mason.sh
|
||||||
# ${MASON} install clang-format 10.0.0
|
${MASON} install clang-format 10.0.0
|
||||||
# echo "$(${MASON} prefix clang-format 10.0.0)/bin" >> $GITHUB_PATH
|
echo "$(${MASON} prefix clang-format 10.0.0)/bin" >> $GITHUB_PATH
|
||||||
# - name: Run checks
|
- name: Run checks
|
||||||
# run: |
|
run: |
|
||||||
# ./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
||||||
# ./scripts/format.sh && ./scripts/error_on_dirty.sh
|
./scripts/format.sh && ./scripts/error_on_dirty.sh
|
||||||
# node ./scripts/validate_changelog.js
|
node ./scripts/validate_changelog.js
|
||||||
# npm run docs && ./scripts/error_on_dirty.sh
|
npm run docs && ./scripts/error_on_dirty.sh
|
||||||
|
|
||||||
# docker-image:
|
docker-image:
|
||||||
# needs: format-taginfo-docs
|
needs: format-taginfo-docs
|
||||||
# runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
# continue-on-error: false
|
continue-on-error: false
|
||||||
# steps:
|
steps:
|
||||||
# - name: Check out the repo
|
- name: Check out the repo
|
||||||
# uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
# - name: Enable osm.pbf cache
|
- name: Enable osm.pbf cache
|
||||||
# uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
# with:
|
with:
|
||||||
# path: berlin-latest.osm.pbf
|
path: berlin-latest.osm.pbf
|
||||||
# key: v1-berlin-osm-pbf
|
key: v1-berlin-osm-pbf
|
||||||
# restore-keys: |
|
restore-keys: |
|
||||||
# v1-berlin-osm-pbf
|
v1-berlin-osm-pbf
|
||||||
# - name: Docker build
|
- name: Docker build
|
||||||
# run: |
|
run: |
|
||||||
# docker build -t osrm-backend-local -f docker/Dockerfile .
|
docker build -t osrm-backend-local -f docker/Dockerfile .
|
||||||
# - name: Test Docker image
|
- name: Test Docker image
|
||||||
# run: |
|
run: |
|
||||||
# if [ ! -f "${PWD}/berlin-latest.osm.pbf" ]; then
|
if [ ! -f "${PWD}/berlin-latest.osm.pbf" ]; then
|
||||||
# wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
|
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
|
||||||
# fi
|
fi
|
||||||
# TAG=osrm-backend-local
|
TAG=osrm-backend-local
|
||||||
# # when `--memory-swap` value equals `--memory` it means container won't use swap
|
# when `--memory-swap` value equals `--memory` it means container won't use swap
|
||||||
# # see https://docs.docker.com/config/containers/resource_constraints/#--memory-swap-details
|
# see https://docs.docker.com/config/containers/resource_constraints/#--memory-swap-details
|
||||||
# MEMORY_ARGS="--memory=1g --memory-swap=1g"
|
MEMORY_ARGS="--memory=1g --memory-swap=1g"
|
||||||
# docker run $MEMORY_ARGS -t -v "${PWD}:/data" "${TAG}" osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf
|
docker run $MEMORY_ARGS -t -v "${PWD}:/data" "${TAG}" osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf
|
||||||
# docker run $MEMORY_ARGS -t -v "${PWD}:/data" "${TAG}" osrm-partition /data/berlin-latest.osrm
|
docker run $MEMORY_ARGS -t -v "${PWD}:/data" "${TAG}" osrm-partition /data/berlin-latest.osrm
|
||||||
# docker run $MEMORY_ARGS -t -v "${PWD}:/data" "${TAG}" osrm-customize /data/berlin-latest.osrm
|
docker run $MEMORY_ARGS -t -v "${PWD}:/data" "${TAG}" osrm-customize /data/berlin-latest.osrm
|
||||||
# docker run $MEMORY_ARGS --name=osrm-container -t -p 5000:5000 -v "${PWD}:/data" "${TAG}" osrm-routed --algorithm mld /data/berlin-latest.osrm &
|
docker run $MEMORY_ARGS --name=osrm-container -t -p 5000:5000 -v "${PWD}:/data" "${TAG}" osrm-routed --algorithm mld /data/berlin-latest.osrm &
|
||||||
# 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"
|
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"
|
||||||
# docker stop osrm-container
|
docker stop osrm-container
|
||||||
|
|
||||||
build-test-publish:
|
build-test-publish:
|
||||||
# needs: format-taginfo-docs
|
needs: format-taginfo-docs
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@ -677,8 +677,8 @@ jobs:
|
|||||||
replacesArtifacts: true
|
replacesArtifacts: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# ci-complete:
|
ci-complete:
|
||||||
# runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
# needs: [build-test-publish, docker-image, windows]
|
needs: [build-test-publish, docker-image, windows]
|
||||||
# steps:
|
steps:
|
||||||
# - run: echo "CI complete"
|
- run: echo "CI complete"
|
||||||
|
|||||||
@ -89,8 +89,7 @@ struct DiyFp
|
|||||||
return DiyFp(h, e + rhs.e + 64);
|
return DiyFp(h, e + rhs.e + 64);
|
||||||
#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__)
|
#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__)
|
||||||
__extension__ using uint128 = unsigned __int128;
|
__extension__ using uint128 = unsigned __int128;
|
||||||
uint128 p =
|
uint128 p = static_cast<uint128>(f) * static_cast<uint128>(rhs.f);
|
||||||
static_cast<uint128>(f) * static_cast<uint128>(rhs.f);
|
|
||||||
uint64_t h = p >> 64;
|
uint64_t h = p >> 64;
|
||||||
uint64_t l = static_cast<uint64_t>(p);
|
uint64_t l = static_cast<uint64_t>(p);
|
||||||
if (l & (uint64_t(1) << 63)) // rounding
|
if (l & (uint64_t(1) << 63)) // rounding
|
||||||
|
|||||||
@ -146,8 +146,9 @@ inline void async(const Nan::FunctionCallbackInfo<v8::Value> &info,
|
|||||||
ServiceMemFn service,
|
ServiceMemFn service,
|
||||||
Nan::Callback *callback,
|
Nan::Callback *callback,
|
||||||
PluginParameters pluginParams_)
|
PluginParameters pluginParams_)
|
||||||
: Nan::AsyncWorker(callback, "osrm:async"), osrm{std::move(osrm_)}, service{std::move(service)},
|
: Nan::AsyncWorker(callback, "osrm:async"), osrm{std::move(osrm_)},
|
||||||
params{std::move(params_)}, pluginParams{std::move(pluginParams_)}
|
service{std::move(service)}, params{std::move(params_)}, pluginParams{
|
||||||
|
std::move(pluginParams_)}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user