This commit is contained in:
Siarhei Fedartsou 2022-09-09 15:15:53 +02:00
parent ce1259790a
commit 4b4f0e4b57
3 changed files with 89 additions and 89 deletions

View File

@ -20,90 +20,90 @@ env:
ENABLE_NODE_BINDINGS: "ON"
jobs:
# windows:
# needs: format-taginfo-docs
# runs-on: windows-2022
# continue-on-error: false
# steps:
# - uses: actions/checkout@v3
# - run: pip install conan==1.51.3
# - run: conan --version
# - run: cmake --version
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# - run: node --version
# - run: npm --version
# - run: npm install --ignore-scripts
# - run: npm link --ignore-scripts
# - uses: microsoft/setup-msbuild@v1.1
# - name: Build
# run: |
# .\scripts\ci\windows-build.bat
windows:
needs: format-taginfo-docs
runs-on: windows-2022
continue-on-error: false
steps:
- uses: actions/checkout@v3
- run: pip install conan==1.51.3
- run: conan --version
- run: cmake --version
- uses: actions/setup-node@v3
with:
node-version: 16
- run: node --version
- run: npm --version
- run: npm install --ignore-scripts
- run: npm link --ignore-scripts
- uses: microsoft/setup-msbuild@v1.1
- name: Build
run: |
.\scripts\ci\windows-build.bat
# format-taginfo-docs:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js
# uses: actions/setup-node@v3
# with:
# node-version: 12
# - name: Enable Node.js cache
# uses: actions/cache@v2
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
# - name: Prepare environment
# run: |
# npm ci --ignore-scripts
# export MASON=${GITHUB_WORKSPACE}/scripts/mason.sh
# ${MASON} install clang-format 10.0.0
# echo "$(${MASON} prefix clang-format 10.0.0)/bin" >> $GITHUB_PATH
# - name: Run checks
# run: |
# ./scripts/check_taginfo.py taginfo.json profiles/car.lua
# ./scripts/format.sh && ./scripts/error_on_dirty.sh
# node ./scripts/validate_changelog.js
# npm run docs && ./scripts/error_on_dirty.sh
format-taginfo-docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 12
- name: Enable Node.js cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Prepare environment
run: |
npm ci --ignore-scripts
export MASON=${GITHUB_WORKSPACE}/scripts/mason.sh
${MASON} install clang-format 10.0.0
echo "$(${MASON} prefix clang-format 10.0.0)/bin" >> $GITHUB_PATH
- name: Run checks
run: |
./scripts/check_taginfo.py taginfo.json profiles/car.lua
./scripts/format.sh && ./scripts/error_on_dirty.sh
node ./scripts/validate_changelog.js
npm run docs && ./scripts/error_on_dirty.sh
# docker-image:
# needs: format-taginfo-docs
# runs-on: ubuntu-22.04
# continue-on-error: false
# steps:
# - name: Check out the repo
# uses: actions/checkout@v3
# - name: Enable osm.pbf cache
# uses: actions/cache@v2
# with:
# path: berlin-latest.osm.pbf
# key: v1-berlin-osm-pbf
# restore-keys: |
# v1-berlin-osm-pbf
# - name: Docker build
# run: |
# docker build -t osrm-backend-local -f docker/Dockerfile .
# - name: Test Docker image
# run: |
# if [ ! -f "${PWD}/berlin-latest.osm.pbf" ]; then
# wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
# fi
# TAG=osrm-backend-local
# # 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
# 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-partition /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 &
# 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-image:
needs: format-taginfo-docs
runs-on: ubuntu-22.04
continue-on-error: false
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Enable osm.pbf cache
uses: actions/cache@v2
with:
path: berlin-latest.osm.pbf
key: v1-berlin-osm-pbf
restore-keys: |
v1-berlin-osm-pbf
- name: Docker build
run: |
docker build -t osrm-backend-local -f docker/Dockerfile .
- name: Test Docker image
run: |
if [ ! -f "${PWD}/berlin-latest.osm.pbf" ]; then
wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
fi
TAG=osrm-backend-local
# 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
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-partition /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 &
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
build-test-publish:
# needs: format-taginfo-docs
needs: format-taginfo-docs
strategy:
matrix:
include:
@ -677,8 +677,8 @@ jobs:
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
# ci-complete:
# runs-on: ubuntu-22.04
# needs: [build-test-publish, docker-image, windows]
# steps:
# - run: echo "CI complete"
ci-complete:
runs-on: ubuntu-22.04
needs: [build-test-publish, docker-image, windows]
steps:
- run: echo "CI complete"

View File

@ -89,8 +89,7 @@ struct DiyFp
return DiyFp(h, e + rhs.e + 64);
#elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__)
__extension__ using uint128 = unsigned __int128;
uint128 p =
static_cast<uint128>(f) * static_cast<uint128>(rhs.f);
uint128 p = static_cast<uint128>(f) * static_cast<uint128>(rhs.f);
uint64_t h = p >> 64;
uint64_t l = static_cast<uint64_t>(p);
if (l & (uint64_t(1) << 63)) // rounding

View File

@ -146,8 +146,9 @@ inline void async(const Nan::FunctionCallbackInfo<v8::Value> &info,
ServiceMemFn service,
Nan::Callback *callback,
PluginParameters pluginParams_)
: Nan::AsyncWorker(callback, "osrm:async"), osrm{std::move(osrm_)}, service{std::move(service)},
params{std::move(params_)}, pluginParams{std::move(pluginParams_)}
: Nan::AsyncWorker(callback, "osrm:async"), osrm{std::move(osrm_)},
service{std::move(service)}, params{std::move(params_)}, pluginParams{
std::move(pluginParams_)}
{
}