diff --git a/.github/workflows/osrm-backend.yml b/.github/workflows/osrm-backend.yml new file mode 100644 index 000000000..41793473f --- /dev/null +++ b/.github/workflows/osrm-backend.yml @@ -0,0 +1,588 @@ +name: osrm-backend CI +on: + push: + branches: + - master + tags: + - v[1-9]+.[0-9]+.[0-9]+ + - v[1-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+ + - v[1-9]+.[0-9]+-[0-9a-zA-Z]+ + pull_request: + branches: + - master + +env: + CCACHE_TEMPDIR: /tmp/.ccache-temp + CCACHE_COMPRESS: 1 + CASHER_TIME_OUT: 599 # one second less than 10m to avoid 10m timeout error: https://github.com/Project-OSRM/osrm-backend/issues/2742 + CCACHE_VERSION: 3.3.1 + CMAKE_VERSION: 3.7.2 + ENABLE_NODE_BINDINGS: "ON" + +jobs: + format-taginfo-docs: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: 10 + - 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 + # See issue 4043 + #- npm run docs && ./scripts/error_on_dirty.sh + + build-test-publish: + needs: format-taginfo-docs + strategy: + matrix: + include: + - name: gcc-7-debug-cov + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Debug + CCOMPILER: gcc-7 + CUCUMBER_TIMEOUT: 20000 + CXXCOMPILER: g++-7 + ENABLE_COVERAGE: ON + + - name: gcc-7-debug-asan + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Debug + CCOMPILER: gcc-7 + CUCUMBER_TIMEOUT: 20000 + CXXCOMPILER: g++-7 + ENABLE_SANITIZER: ON + TARGET_ARCH: x86_64-asan + + - name: clang-5.0-debug + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Debug + CLANG_VERSION: 5.0.0 + CUCUMBER_TIMEOUT: 60000 + + - name: mason-linux-debug-asan + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CLANG_VERSION: 5.0.0 + ENABLE_MASON: ON + ENABLE_SANITIZER: ON + + - name: mason-linux-release + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CLANG_VERSION: 5.0.0 + ENABLE_MASON: ON + + - name: gcc-9-release + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CCOMPILER: gcc-9 + CXXCOMPILER: g++-9 + CXXFLAGS: -Wno-cast-function-type + + - name: gcc-8-release + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CCOMPILER: gcc-8 + CXXCOMPILER: g++-8 + CXXFLAGS: -Wno-cast-function-type + + - name: gcc-7-release + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CCOMPILER: gcc-7 + CXXCOMPILER: g++-7 + + - name: gcc-7-release-i686 + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CCOMPILER: gcc-7 + CFLAGS: "-m32 -msse2 -mfpmath=sse" + CXXCOMPILER: g++-7 + CXXFLAGS: "-m32 -msse2 -mfpmath=sse" + TARGET_ARCH: i686 + + - name: gcc-5-release + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CCOMPILER: gcc-5 + CXXCOMPILER: g++-5 + + - name: gcc-6-release + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CCOMPILER: gcc-6 + CXXCOMPILER: g++-6 + + - name: mason-osx-release-node-10 + build_node_package: true + continue-on-error: false + node: 10 + runs-on: macos-10.15 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CCOMPILER: clang + CXXCOMPILER: clang++ + CUCUMBER_TIMEOUT: 60000 + ENABLE_ASSERTIONS: ON + ENABLE_MASON: ON + + - name: mason-osx-release-node-12 + build_node_package: true + continue-on-error: false + node: 12 + runs-on: macos-10.15 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CCOMPILER: clang + CXXCOMPILER: clang++ + CUCUMBER_TIMEOUT: 60000 + ENABLE_ASSERTIONS: ON + ENABLE_MASON: ON + + - name: mason-osx-release-node-14 + build_node_package: true + continue-on-error: false + node: 14 + runs-on: macos-10.15 + BUILD_TOOLS: ON + BUILD_TYPE: Release + CCOMPILER: clang + CXXCOMPILER: clang++ + CUCUMBER_TIMEOUT: 60000 + ENABLE_ASSERTIONS: ON + ENABLE_MASON: ON + + - name: gcc-7-release-shared + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TOOLS: ON + BUILD_TYPE: Release + BUILD_SHARED_LIBS: ON + CCOMPILER: gcc-7 + CXXCOMPILER: g++-7 + + - name: node-14-mason-linux-release + build_node_package: true + continue-on-error: false + node: 14 + runs-on: ubuntu-18.04 + BUILD_TYPE: Release + CLANG_VERSION: 5.0.0 + ENABLE_GLIBC_WORKAROUND: ON + ENABLE_MASON: ON + NODE_PACKAGE_TESTS_ONLY: ON + + - name: node-14-mason-linux-debug + build_node_package: true + continue-on-error: false + node: 14 + runs-on: ubuntu-18.04 + BUILD_TYPE: Debug + CLANG_VERSION: 5.0.0 + ENABLE_GLIBC_WORKAROUND: ON + ENABLE_MASON: ON + NODE_PACKAGE_TESTS_ONLY: ON + + - name: node-12-mason-linux-release + build_node_package: true + continue-on-error: false + node: 12 + runs-on: ubuntu-18.04 + BUILD_TYPE: Release + CLANG_VERSION: 5.0.0 + ENABLE_GLIBC_WORKAROUND: ON + ENABLE_MASON: ON + NODE_PACKAGE_TESTS_ONLY: ON + + - name: node-12-mason-linux-debug + build_node_package: true + continue-on-error: false + node: 12 + runs-on: ubuntu-18.04 + BUILD_TYPE: Debug + CLANG_VERSION: 5.0.0 + ENABLE_GLIBC_WORKAROUND: ON + ENABLE_MASON: ON + NODE_PACKAGE_TESTS_ONLY: ON + + - name: node-10-mason-linux-release + build_node_package: true + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TYPE: Release + CLANG_VERSION: 5.0.0 + ENABLE_GLIBC_WORKAROUND: ON + ENABLE_MASON: ON + NODE_PACKAGE_TESTS_ONLY: ON + + - name: node-10-mason-linux-debug + build_node_package: true + continue-on-error: false + node: 10 + runs-on: ubuntu-18.04 + BUILD_TYPE: Debug + CLANG_VERSION: 5.0.0 + ENABLE_GLIBC_WORKAROUND: ON + ENABLE_MASON: ON + NODE_PACKAGE_TESTS_ONLY: ON + + - name: mason-osx-release-node-latest + build_node_package: true + continue-on-error: true + # TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257 + node: 16 + runs-on: macos-10.15 + BUILD_TYPE: Release + CCOMPILER: clang + CXXCOMPILER: clang++ + CUCUMBER_TIMEOUT: 60000 + ENABLE_ASSERTIONS: ON + ENABLE_MASON: ON + + - name: node-latest-mason-linux-release + build_node_package: true + continue-on-error: true + # TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257 + node: 16 + runs-on: ubuntu-18.04 + BUILD_TYPE: Release + CLANG_VERSION: 5.0.0 + ENABLE_GLIBC_WORKAROUND: ON + ENABLE_MASON: ON + NODE_PACKAGE_TESTS_ONLY: ON + + - name: node-latest-mason-linux-debug + build_node_package: true + continue-on-error: true + # TODO: Use node 'latest' once supported: https://github.com/actions/setup-node/issues/257 + node: 16 + runs-on: ubuntu-18.04 + BUILD_TYPE: Debug + CLANG_VERSION: 5.0.0 + ENABLE_GLIBC_WORKAROUND: ON + ENABLE_MASON: ON + NODE_PACKAGE_TESTS_ONLY: ON + + - name: mason-osx-release-node-lts + build_node_package: true + continue-on-error: true + node: "lts/*" + runs-on: macos-10.15 + BUILD_TYPE: Release + CCOMPILER: clang + CXXCOMPILER: clang++ + CUCUMBER_TIMEOUT: 60000 + ENABLE_ASSERTIONS: ON + ENABLE_MASON: ON + + - name: node-lts-mason-linux-release + build_node_package: true + continue-on-error: true + node: "lts/*" + runs-on: ubuntu-18.04 + BUILD_TYPE: Release + CLANG_VERSION: 5.0.0 + ENABLE_GLIBC_WORKAROUND: ON + ENABLE_MASON: ON + NODE_PACKAGE_TESTS_ONLY: ON + + - name: node-lts-mason-linux-debug + build_node_package: true + continue-on-error: true + node: "lts/*" + runs-on: ubuntu-18.04 + BUILD_TYPE: Debug + CLANG_VERSION: 5.0.0 + ENABLE_GLIBC_WORKAROUND: ON + ENABLE_MASON: ON + NODE_PACKAGE_TESTS_ONLY: ON + + + name: ${{ matrix.name}} + continue-on-error: ${{ matrix.continue-on-error }} + runs-on: ${{ matrix.runs-on }} + env: + BUILD_TOOLS: ${{ matrix.BUILD_TOOLS }} + BUILD_TYPE: ${{ matrix.BUILD_TYPE }} + BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }} + CCOMPILER: ${{ matrix.CCOMPILER }} + CFLAGS: ${{ matrix.CFLAGS }} + CLANG_VERSION: ${{ matrix.CLANG_VERSION }} + CUCUMBER_TIMEOUT: ${{ matrix.CUCUMBER_TIMEOUT }} + CXXCOMPILER: ${{ matrix.CXXCOMPILER }} + CXXFLAGS: ${{ matrix.CXXFLAGS }} + ENABLE_ASSERTIONS: ${{ matrix.ENABLE_ASSERTIONS }} + ENABLE_COVERAGE: ${{ matrix.ENABLE_COVERAGE }} + ENABLE_GLIBC_WORKAROUND: ${{ matrix.ENABLE_GLIBC_WORKAROUND }} + ENABLE_MASON: ${{ matrix.ENABLE_MASON }} + ENABLE_SANITIZER: ${{ matrix.ENABLE_SANITIZER }} + NODE_PACKAGE_TESTS_ONLY: ${{ matrix.NODE_PACKAGE_TESTS_ONLY }} + TARGET_ARCH: ${{ matrix.TARGET_ARCH }} + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + - 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: Enable compiler cache + uses: actions/cache@v2 + with: + path: ~/.ccache + key: ccache-${{ matrix.name }}-${{ github.sha }} + restore-keys: | + ccache-${{ matrix.name }}- + - name: Enable test cache + uses: actions/cache@v2 + with: + path: ${{github.workspace}}/test/cache + key: test-${{ matrix.name }}-${{ github.sha }} + restore-keys: | + test-${{ matrix.name }}- + + - name: Prepare environment + run: | + PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)") + echo PUBLISH=$([[ "${GITHUB_REF:-}" == "refs/tags/v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") >> $GITHUB_ENV + + echo "OSRM_INSTALL_DIR=${GITHUB_WORKSPACE}/install-osrm" >> $GITHUB_ENV + echo "OSRM_BUILD_DIR=${GITHUB_WORKSPACE}/build-osrm" >> $GITHUB_ENV + + if [[ "$ENABLE_SANITIZER" == 'ON' ]]; then + # We can only set this after checkout once we know the workspace directory + echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/scripts/ci/leaksanitizer.conf" >> $GITHUB_ENV + fi + + if [[ "${RUNNER_OS}" == "Linux" ]]; then + echo "JOBS=$((`nproc` + 1))" >> $GITHUB_ENV + export MASON_OS=linux + elif [[ "${RUNNER_OS}" == "macOS" ]]; then + echo "JOBS=$((`sysctl -n hw.ncpu` + 1))" >> $GITHUB_ENV + sudo mdutil -i off / + export MASON_OS=osx + fi + + echo "MASON=${GITHUB_WORKSPACE}/scripts/mason.sh" >> $GITHUB_ENV + echo "CMAKE_URL=https://mason-binaries.s3.amazonaws.com/${MASON_OS}-x86_64/cmake/${CMAKE_VERSION}.tar.gz" >> $GITHUB_ENV + echo "CMAKE_DIR=mason_packages/${MASON_OS}-x86_64/cmake/${CMAKE_VERSION}}" >> $GITHUB_ENV + + + - name: Install dev dependencies + run: | + # CMake + mkdir -p ${CMAKE_DIR} + wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_DIR} + echo "${CMAKE_DIR}/bin" >> $GITHUB_PATH + + # TBB + ${MASON} install tbb 2017_U7 + echo "LD_LIBRARY_PATH=$(${MASON} prefix tbb 2017_U7)/lib/:${LD_LIBRARY_PATH}" >> $GITHUB_ENV + + # ccache + ${MASON} install ccache ${CCACHE_VERSION} + echo "$(${MASON} prefix ccache ${CCACHE_VERSION})/bin" >> $GITHUB_PATH + + # clang + if [[ -n ${CLANG_VERSION} ]]; then + echo "CCOMPILER=clang" >> $GITHUB_ENV + echo "CXXCOMPILER=clang++" >> $GITHUB_ENV + ${MASON} install clang++ ${CLANG_VERSION} + echo "$(${MASON} prefix clang++ ${CLANG_VERSION})/bin" >> $GITHUB_PATH + # we only enable lto for release builds + # and therefore don't need to us ld.gold or llvm tools for linking + # for debug builds + if [[ ${BUILD_TYPE} == 'Release' ]]; then + ${MASON} install binutils 2.27 + echo "$(${MASON} prefix binutils 2.27)/bin" >> $GITHUB_PATH + fi + fi + + # Linux dev packages + if [ "${TARGET_ARCH}" != "i686" ] && [ "${ENABLE_MASON}" != "ON" ]; then + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt-get update -y + sudo apt-get install -y libbz2-dev libxml2-dev libzip-dev liblua5.2-dev libtbb-dev libboost-all-dev + if [[ -z "${CLANG_VERSION}" ]]; then + sudo apt-get install -y ${CXXCOMPILER} + fi + if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then + sudo apt-get install -y lcov + fi + elif [[ $TARGET_ARCH == "i686" ]]; then + source ./scripts/ci/before_install.${TARGET_ARCH}.sh + fi + + - name: Prepare build + run: | + mkdir ${OSRM_BUILD_DIR} + ccache --max-size=256M + npm ci --ignore-scripts + if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then + lcov --directory . --zerocounters # clean cached files + fi + echo "CC=${CCOMPILER}" >> $GITHUB_ENV + echo "CXX=${CXXCOMPILER}" >> $GITHUB_ENV + + - name: Build and install OSRM + run: | + echo "Using ${JOBS} jobs" + pushd ${OSRM_BUILD_DIR} + cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ + -DENABLE_MASON=${ENABLE_MASON:-OFF} \ + -DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF}} \ + -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} \ + -DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} \ + -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ + -DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} \ + -DBUILD_TOOLS=${BUILD_TOOLS:-OFF} \ + -DENABLE_CCACHE=ON \ + -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ + -DENABLE_GLIBC_WORKAROUND=${ENABLE_GLIBC_WORKAROUND:-OFF} + make --jobs=${JOBS} + + if [[ "${NODE_PACKAGE_TESTS_ONLY}" != "ON" ]]; then + make tests --jobs=${JOBS} + make benchmarks --jobs=${JOBS} + ccache -s + sudo make install + if [[ "${RUNNER_OS}" == "Linux" ]]; then + echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${OSRM_INSTALL_DIR}/lib" >> $GITHUB_ENV + fi + echo "PKG_CONFIG_PATH=${OSRM_INSTALL_DIR}/lib/pkgconfig" >> $GITHUB_ENV + fi + popd + - name: Build example + if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' }} + run: | + mkdir example/build && pushd example/build + cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} + make --jobs=${JOBS} + popd + + - name: Run all tests + if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' }} + run: | + make -C test/data benchmark + + # macOS SIP strips the linker path. Reset this inside the running shell + export LD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }} + ./example/build/osrm-example test/data/mld/monaco.osrm + + # All tests assume to be run from the build directory + pushd ${OSRM_BUILD_DIR} + ./unit_tests/library-tests + ./unit_tests/extractor-tests + ./unit_tests/contractor-tests + ./unit_tests/engine-tests + ./unit_tests/util-tests + ./unit_tests/server-tests + ./unit_tests/partitioner-tests + ./unit_tests/customizer-tests + if [ -z "${ENABLE_SANITIZER}" ] && [ "$TARGET_ARCH" != "i686" ]; then + npm run nodejs-tests + fi + popd + npm test + - name: Run Node package tests only + if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' }} + run: | + npm run nodejs-tests + + - name: Generate code coverage + if: ${{ matrix.ENABLE_COVERAGE == 'ON' }} + run: | + lcov --directory . --capture --output-file coverage.info # capture coverage info + lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system + lcov --list coverage.info #debug info + # Uploading report to CodeCov + - name: Upload code coverage + if: ${{ matrix.ENABLE_COVERAGE == 'ON' }} + uses: codecov/codecov-action@v1 + with: + files: coverage.info + name: codecov-osrm-backend + fail_ci_if_error: true + verbose: true + + - name: Build Node package + if: ${{ matrix.build_node_package && env.PUBLISH == 'On' }} + run: ./scripts/ci/node_package.sh + - name: Publish Node package + if: ${{ matrix.build_node_package && env.PUBLISH == 'On' }} + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + artifactErrorsFailBuild: true + artifacts: build/stage/**/*.tar.gz + omitBody: true + omitBodyDuringUpdate: true + omitName: true + omitNameDuringUpdate: true + replacesArtifacts: true + token: ${{ secrets.GITHUB_TOKEN }} + + ci-complete: + runs-on: ubuntu-18.04 + needs: build-test-publish + steps: + - run: echo "CI complete" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 33cbdeeba..000000000 --- a/.travis.yml +++ /dev/null @@ -1,585 +0,0 @@ -language: cpp - -git: - depth: 10 - -# sudo:required is needed for trusty images -sudo: required -dist: trusty - -notifications: - email: false - -branches: - only: - - master - # enable building tags - - /^v\d+\.\d+(\.\d+)?(-\S*)?$/ - -cache: - npm: true - ccache: true - apt: true - directories: - - test/cache - -env: - global: - - CCACHE_TEMPDIR=/tmp/.ccache-temp - - CCACHE_COMPRESS=1 - - CASHER_TIME_OUT=599 # one second less than 10m to avoid 10m timeout error: https://github.com/Project-OSRM/osrm-backend/issues/2742 - - CCACHE_VERSION=3.3.1 - - CMAKE_VERSION=3.7.2 - - MASON="$(pwd)/scripts/mason.sh" - - ENABLE_NODE_BINDINGS=On - - NODE="10" - -stages: - - core - - optional - -matrix: - fast_finish: true - - # We override the compiler names here to yield better ccache behavior, which uses this as key - include: - - # Debug Builds - - stage: core - os: linux - compiler: "format-taginfo-docs" - env: NODE=10 - sudo: false - before_install: - install: - - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash - - source $NVM_DIR/nvm.sh - - nvm install $NODE - - nvm use $NODE - - npm --version - - npm ci --ignore-scripts - script: - - ./scripts/check_taginfo.py taginfo.json profiles/car.lua - - ${MASON} install clang-format 10.0.0 - - PATH=$(${MASON} prefix clang-format 10.0.0)/bin:${PATH} ./scripts/format.sh && ./scripts/error_on_dirty.sh - - node ./scripts/validate_changelog.js - # See issue 4043 - #- npm run docs && ./scripts/error_on_dirty.sh - after_success: - - - os: linux - compiler: "gcc-7-debug-cov" - addons: &gcc7 - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-7', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev', 'lcov'] - env: CCOMPILER='gcc-7' CXXCOMPILER='g++-7' BUILD_TYPE='Debug' ENABLE_COVERAGE=ON CUCUMBER_TIMEOUT=20000 - before_script: - - cd ${TRAVIS_BUILD_DIR} - - lcov --directory . --zerocounters # clean cached da files - after_success: - # Creating report - - cd ${TRAVIS_BUILD_DIR} - - lcov --directory . --capture --output-file coverage.info # capture coverage info - - lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system - - lcov --list coverage.info #debug info - # Uploading report to CodeCov - - bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" - - - os: linux - compiler: "gcc-7-debug-asan" - addons: &gcc7 - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-7', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev'] - env: CCOMPILER='gcc-7' CXXCOMPILER='g++-7' BUILD_TYPE='Debug' TARGET_ARCH='x86_64-asan' ENABLE_SANITIZER=ON CUCUMBER_TIMEOUT=20000 LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/scripts/travis/leaksanitizer.conf" - - - os: linux - compiler: "clang-5.0-debug" - addons: &clang50 - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-5-dev', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' CUCUMBER_TIMEOUT=60000 - - - os: linux - compiler: "mason-linux-debug-asan" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_SANITIZER=ON LSAN_OPTIONS="suppressions=$TRAVIS_BUILD_DIR/scripts/travis/leaksanitizer.conf" - - # Release Builds - - os: linux - compiler: "mason-linux-release" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON RUN_CLANG_FORMAT=ON ENABLE_LTO=ON - - - os: linux - compiler: "gcc-9-release" - addons: &gcc9 - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-9', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev'] - env: CCOMPILER='gcc-9' CXXCOMPILER='g++-9' BUILD_TYPE='Release' CXXFLAGS='-Wno-cast-function-type' - - - os: linux - compiler: "gcc-8-release" - addons: &gcc8 - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-8', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev'] - env: CCOMPILER='gcc-8' CXXCOMPILER='g++-8' BUILD_TYPE='Release' CXXFLAGS='-Wno-cast-function-type' - - - os: linux - compiler: "gcc-7-release" - addons: &gcc7 - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-7', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev'] - env: CCOMPILER='gcc-7' CXXCOMPILER='g++-7' BUILD_TYPE='Release' - - - os: linux - compiler: "gcc-7-release-i686" - env: > - TARGET_ARCH='i686' CCOMPILER='gcc-7' CXXCOMPILER='g++-7' BUILD_TYPE='Release' - CFLAGS='-m32 -msse2 -mfpmath=sse' CXXFLAGS='-m32 -msse2 -mfpmath=sse' - - - os: linux - compiler: "gcc-5-release" - addons: &gcc49 - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-5', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev', 'ccache'] - env: CCOMPILER='gcc-5' CXXCOMPILER='g++-5' BUILD_TYPE='Release' - - - os: linux - compiler: "gcc-6-release" - addons: &gcc49 - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-6', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev', 'ccache'] - env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release' - - - os: osx - osx_image: xcode9.2 - compiler: "mason-osx-release-node-10" - # we use the xcode provides clang and don't install our own - env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="10" - after_success: - - ./scripts/travis/node_package.sh - - - os: osx - osx_image: xcode9.2 - compiler: "mason-osx-release-node-12" - # we use the xcode provides clang and don't install our own - env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="12" - after_success: - - ./scripts/travis/node_package.sh - - - os: osx - osx_image: xcode9.2 - compiler: "mason-osx-release-node-14" - # we use the xcode provides clang and don't install our own - env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="14" - after_success: - - ./scripts/travis/node_package.sh - - # Shared Library - - os: linux - compiler: "gcc-7-release-shared" - addons: &gcc7 - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-7', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev'] - env: CCOMPILER='gcc-7' CXXCOMPILER='g++-7' BUILD_TYPE='Release' BUILD_SHARED_LIBS=ON - - # Node build jobs. These skip running the tests. - - os: linux - sudo: false - compiler: "node-14-mason-linux-release" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="14" - install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=ON - - make --jobs=${JOBS} - - popd - script: - - npm run nodejs-tests - after_success: - - ./scripts/travis/node_package.sh - - - os: linux - sudo: false - compiler: "node-14-mason-linux-debug" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="14" - install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=ON - - make --jobs=${JOBS} - - popd - script: - - npm run nodejs-tests - after_success: - - ./scripts/travis/node_package.sh - - - os: linux - sudo: false - compiler: "node-12-mason-linux-release" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="12" - install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=ON - - make --jobs=${JOBS} - - popd - script: - - npm run nodejs-tests - after_success: - - ./scripts/travis/node_package.sh - - - os: linux - sudo: false - compiler: "node-12-mason-linux-debug" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="12" - install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=ON - - make --jobs=${JOBS} - - popd - script: - - npm run nodejs-tests - after_success: - - ./scripts/travis/node_package.sh - - - os: linux - sudo: false - compiler: "node-10-mason-linux-release" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="10" - install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=ON - - make --jobs=${JOBS} - - popd - script: - - npm run nodejs-tests - after_success: - - ./scripts/travis/node_package.sh - - - os: linux - sudo: false - compiler: "node-10-mason-linux-debug" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="10" - install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=ON - - make --jobs=${JOBS} - - popd - script: - - npm run nodejs-tests - after_success: - - ./scripts/travis/node_package.sh - - - os: osx - stage: optional - osx_image: xcode9.2 - compiler: "mason-osx-release-node-latest" - # we use the xcode provides clang and don't install our own - env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="node" - after_success: - - ./scripts/travis/node_package.sh - - - os: linux - sudo: false - compiler: "node-latest-mason-linux-release" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="node" - install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=ON - - make --jobs=${JOBS} - - popd - script: - - npm run nodejs-tests - after_success: - - ./scripts/travis/node_package.sh - - - os: linux - sudo: false - compiler: "node-latest-mason-linux-debug" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="node" - install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=ON - - make --jobs=${JOBS} - - popd - script: - - npm run nodejs-tests - after_success: - - ./scripts/travis/node_package.sh - - - os: osx - osx_image: xcode9.2 - compiler: "mason-osx-release-node-lts" - # we use the xcode provides clang and don't install our own - env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="--lts" - after_success: - - ./scripts/travis/node_package.sh - - - os: linux - sudo: false - compiler: "node-lts-mason-linux-release" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="--lts" - install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=ON - - make --jobs=${JOBS} - - popd - script: - - npm run nodejs-tests - after_success: - - ./scripts/travis/node_package.sh - - - os: linux - sudo: false - compiler: "node-lts-mason-linux-debug" - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['libstdc++-4.9-dev'] - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="--lts" - install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=ON - - make --jobs=${JOBS} - - popd - script: - - npm run nodejs-tests - after_success: - - ./scripts/travis/node_package.sh - - allow_failures: - - compiler: "mason-osx-release-node-latest" - env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="node" - - compiler: "node-latest-mason-linux-release" - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="node" - - compiler: "node-latest-mason-linux-debug" - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="node" - - compiler: "mason-osx-release-node-lts" - env: ENABLE_MASON=ON BUILD_TYPE='Release' CUCUMBER_TIMEOUT=60000 CCOMPILER='clang' CXXCOMPILER='clang++' ENABLE_ASSERTIONS=ON ENABLE_LTO=ON NODE="--lts" - - compiler: "node-lts-mason-linux-release" - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="--lts" - - compiler: "node-lts-mason-linux-debug" - env: CLANG_VERSION='5.0.0' BUILD_TYPE='Debug' ENABLE_MASON=ON ENABLE_LTO=ON JOBS=3 NODE="--lts" - -before_install: - - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash - - source $NVM_DIR/nvm.sh - - nvm install $NODE - - nvm use $NODE - - node --version - - if [[ ! -z $TARGET_ARCH ]] ; then source ./scripts/travis/before_install.$TARGET_ARCH.sh ; fi - - | - if [[ -z $JOBS ]]; then - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then - export JOBS=$((`nproc` + 1)) - elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then - export JOBS=$((`sysctl -n hw.ncpu` + 1)) - fi - fi - - | - if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then - sudo mdutil -i off / - fi - - export PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)") - - export PUBLISH=$([[ "${TRAVIS_TAG:-}" == "v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") - - echo "Using ${JOBS} jobs" - - npm ci --ignore-scripts - # Bootstrap cmake to be able to run mason - - CMAKE_URL="https://mason-binaries.s3.amazonaws.com/${TRAVIS_OS_NAME}-x86_64/cmake/${CMAKE_VERSION}.tar.gz" - - CMAKE_DIR="mason_packages/${TRAVIS_OS_NAME}-x86_64/cmake/${CMAKE_VERSION}" - - mkdir -p ${CMAKE_DIR} - - travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C ${CMAKE_DIR} || travis_terminate 1 - - export PATH=${CMAKE_DIR}/bin:${PATH} - - ${MASON} install tbb 2017_U7 && export LD_LIBRARY_PATH=$(${MASON} prefix tbb 2017_U7)/lib/:${LD_LIBRARY_PATH} - - ${MASON} install ccache ${CCACHE_VERSION} && export PATH=$(${MASON} prefix ccache ${CCACHE_VERSION})/bin:${PATH} - - | - if [[ ! -z ${CLANG_VERSION} ]]; then - export CCOMPILER='clang' - export CXXCOMPILER='clang++' - ${MASON} install clang++ ${CLANG_VERSION} && export PATH=$(${MASON} prefix clang++ ${CLANG_VERSION})/bin:${PATH} || travis_terminate 1 - # we only enable lto for release builds - # and therefore don't need to us ld.gold or llvm tools for linking - # for debug builds - if [[ ${BUILD_TYPE} == 'Release' ]]; then - ${MASON} install binutils 2.27 && export PATH=$(${MASON} prefix binutils 2.27)/bin:${PATH} || travis_terminate 1 - fi - fi - - ccache --max-size=256M # limiting the cache's size to roughly the previous job's object sizes - - export OSRM_INSTALL_DIR="$(pwd)/install-osrm" - - export OSRM_BUILD_DIR="$(pwd)/build-osrm" - - export CC=${CCOMPILER} CXX=${CXXCOMPILER} - - mkdir ${OSRM_BUILD_DIR} - -install: - - pushd ${OSRM_BUILD_DIR} - - | - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -DENABLE_MASON=${ENABLE_MASON:-OFF} \ - -DENABLE_ASSERTIONS=${ENABLE_ASSERTIONS:-OFF} \ - -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-OFF} \ - -DENABLE_COVERAGE=${ENABLE_COVERAGE:-OFF} \ - -DENABLE_NODE_BINDINGS=${ENABLE_NODE_BINDINGS:-OFF} \ - -DENABLE_SANITIZER=${ENABLE_SANITIZER:-OFF} \ - -DBUILD_TOOLS=ON \ - -DENABLE_CCACHE=ON \ - -DCMAKE_INSTALL_PREFIX=${OSRM_INSTALL_DIR} \ - -DENABLE_GLIBC_WORKAROUND=${ENABLE_GLIBC_WORKAROUND:-OFF} - - echo "travis_fold:start:MAKE" - - make --jobs=${JOBS} - - make tests --jobs=${JOBS} - - make benchmarks --jobs=${JOBS} - - echo "travis_fold:end:MAKE" - - ccache -s - - sudo make install - - | - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${OSRM_INSTALL_DIR}/lib - fi - - popd - - mkdir example/build && pushd example/build - - export PKG_CONFIG_PATH=${OSRM_INSTALL_DIR}/lib/pkgconfig - - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} - - make --jobs=${JOBS} - - popd - -script: - - if [[ $TARGET_ARCH == armhf ]] ; then echo "Skip tests for $TARGET_ARCH" && exit 0 ; fi - - make -C test/data benchmark - - ./example/build/osrm-example test/data/mld/monaco.osrm - # All tests assume to be run from the build directory - - pushd ${OSRM_BUILD_DIR} - - ./unit_tests/library-tests - - ./unit_tests/extractor-tests - - ./unit_tests/contractor-tests - - ./unit_tests/engine-tests - - ./unit_tests/util-tests - - ./unit_tests/server-tests - - ./unit_tests/partitioner-tests - - ./unit_tests/customizer-tests - - | - if [ -z "${ENABLE_SANITIZER}" ] && [ "$TARGET_ARCH" != "i686" ]; then - npm run nodejs-tests - fi - - | - - popd - - npm test - -deploy: - provider: releases - api_key: - secure: "Ej7tPd+XhAlBvA0SnYghYakO6QUwUI+oOtjlkPmy0UfKtIQ4bIzoIm1BDbPwrmNiCSKB7lLZYZpKz68PBRtblfqvTjhzXSzlvFk36pyywgkuNY13N3VQZo2c5CShLCy41nx4+uLkjhLfKYOALSE3OivdJJHLZEsSwx60Csx7owU=" - skip_cleanup: true - file_glob: true - file: build/stage/**/*.tar.gz - on: - tags: true - condition: "$PUBLISH = 'On'" diff --git a/CHANGELOG.md b/CHANGELOG.md index a77e0018c..5fce49c43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,15 @@ # Unreleased - Changes from 5.25.0 - - Misc: + - API: + - FIXED: Allow for special characters in the profile/method as part of the HTTP URL. [#6090](https://github.com/Project-OSRM/osrm-backend/pull/6090) + - FIXED: Set osrm-routed to immediately close bad connections [#6112](https://github.com/Project-OSRM/osrm-backend/pull/6112) + - Build: + - CHANGED: Replace Travis with Github Actions for CI builds [#6071](https://github.com/Project-OSRM/osrm-backend/pull/6071) + - FIXED: Fixed Boost link flags in pkg-config file. [#6083](https://github.com/Project-OSRM/osrm-backend/pull/6083) + - NodeJS - FIXED: Support `skip_waypoints` in Node bindings [#6060](https://github.com/Project-OSRM/osrm-backend/pull/6060) + - Routing: + - FIXED: Fix generation of inefficient MLD partitions [#6084](https://github.com/Project-OSRM/osrm-backend/pull/6084) # 5.25.0 - Changes from 5.24.0 @@ -120,7 +128,7 @@ ](https://github.com/Project-OSRM/osrm-backend/pull/5076/) - CHANGED: Foot profile now blacklists barriers instead of whitelisting them [#5077 ](https://github.com/Project-OSRM/osrm-backend/pull/5077/) - - CHANGED: Support maxlength and maxweight in car profile [#5101](https://github.com/Project-OSRM/osrm-backend/pull/5101] + - CHANGED: Support maxlength and maxweight in car profile [#5101](https://github.com/Project-OSRM/osrm-backend/pull/5101) - Bugfixes: - FIXED: collapsing of ExitRoundabout instructions [#5114](https://github.com/Project-OSRM/osrm-backend/issues/5114) - Misc: diff --git a/CMakeLists.txt b/CMakeLists.txt index e6feb6de9..e49fac29a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.2) if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR AND NOT MSVC_IDE) message(FATAL_ERROR "In-source builds are not allowed. @@ -514,7 +514,7 @@ if(ENABLE_MASON) set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${LINKER_FLAGS}") # current mason packages target -D_GLIBCXX_USE_CXX11_ABI=0 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0") + add_dependency_defines(-D_GLIBCXX_USE_CXX11_ABI=0) # note: we avoid calling find_package(Osmium ...) here to ensure that the # expat and bzip2 are used from mason rather than the system @@ -802,9 +802,25 @@ set(PKGCONFIG_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include") list(APPEND DEPENDENCIES_INCLUDE_DIRS "${PKGCONFIG_INCLUDE_DIR}") list(APPEND DEPENDENCIES_INCLUDE_DIRS "${PKGCONFIG_INCLUDE_DIR}/osrm") JOIN("-I${DEPENDENCIES_INCLUDE_DIRS}" " -I" PKGCONFIG_OSRM_INCLUDE_FLAGS) -JOIN("${ENGINE_LIBRARIES}" " " PKGCONFIG_OSRM_DEPENDENT_LIBRARIES) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkgconfig.in libosrm.pc @ONLY) +# Boost uses imported targets, we need to use a generator expression to extract +# the link libraries to be written to the pkg-config file. +foreach(engine_lib ${ENGINE_LIBRARIES}) + if("${engine_lib}" MATCHES "^Boost.*") + list(APPEND PKGCONFIG_DEPENDENT_LIBRARIES "$") + else() + list(APPEND PKGCONFIG_DEPENDENT_LIBRARIES "${engine_lib}") + endif() +endforeach(engine_lib) +JOIN("${PKGCONFIG_DEPENDENT_LIBRARIES}" " " PKGCONFIG_OSRM_DEPENDENT_LIBRARIES) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/pkgconfig.in pkgconfig.configured @ONLY) +file(GENERATE + OUTPUT + ${PROJECT_BINARY_DIR}/libosrm.pc + INPUT + ${PROJECT_BINARY_DIR}/pkgconfig.configured) + install(FILES ${PROJECT_BINARY_DIR}/libosrm.pc DESTINATION ${PKGCONFIG_LIBRARY_DIR}/pkgconfig) # uninstall target @@ -862,4 +878,4 @@ if (ENABLE_NODE_BINDINGS) endforeach() add_library(check-headers STATIC EXCLUDE_FROM_ALL ${sources}) set_target_properties(check-headers PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${check_headers_dir}) -endif() \ No newline at end of file +endif() diff --git a/cmake/FindLua.cmake b/cmake/FindLua.cmake index 2b732ca21..237dca8e6 100644 --- a/cmake/FindLua.cmake +++ b/cmake/FindLua.cmake @@ -44,7 +44,7 @@ unset(_lua_append_versions) # this is a function only to have all the variables inside go away automatically function(_lua_set_version_vars) - set(LUA_VERSIONS5 5.3 5.2 5.1 5.0) + set(LUA_VERSIONS5 5.4 5.3 5.2 5.1 5.0) if (Lua_FIND_VERSION_EXACT) if (Lua_FIND_VERSION_COUNT GREATER 1) diff --git a/docs/nodejs/api.md b/docs/nodejs/api.md index 9bff3ada8..72b463f0b 100644 --- a/docs/nodejs/api.md +++ b/docs/nodejs/api.md @@ -244,9 +244,16 @@ osrm.match(options, function(err, response) { Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** containing `tracepoints` and `matchings`. **`tracepoints`** Array of [`Ẁaypoint`](#waypoint) objects representing all points of the trace in order. If the trace point was ommited by map matching because it is an outlier, the entry will be null. - Each `Waypoint` object includes two additional properties, 1) `matchings_index`: Index to the - [`Route`](#route) object in matchings the sub-trace was matched to, 2) `waypoint_index`: Index of + Each `Waypoint` object has the following additional properties, + + 1) `matchings_index`: Index to the + [`Route`](#route) object in matchings the sub-trace was matched to, + + 2) `waypoint_index`: Index of the waypoint inside the matched route. + + 3) `alternatives_count`: Number of probable alternative matchings for this trace point. A value of zero indicate that this point was matched unambiguously. Split the trace at these points for incremental map matching. + **`matchings`** is an array of [`Route`](#route) objects that assemble the trace. Each `Route` object has an additional `confidence` property, which is the confidence of the matching. float value between `0` and `1`. `1` is very confident that the matching is correct. diff --git a/include/server/server.hpp b/include/server/server.hpp index 53098fa61..06d2ec8e9 100644 --- a/include/server/server.hpp +++ b/include/server/server.hpp @@ -101,6 +101,10 @@ class Server new_connection->socket(), boost::bind(&Server::HandleAccept, this, boost::asio::placeholders::error)); } + else + { + util::Log(logERROR) << "HandleAccept error: " << e.message(); + } } unsigned thread_pool_size; diff --git a/scripts/travis/before_install.armhf.sh b/scripts/ci/before_install.armhf.sh similarity index 100% rename from scripts/travis/before_install.armhf.sh rename to scripts/ci/before_install.armhf.sh diff --git a/scripts/travis/before_install.i686.sh b/scripts/ci/before_install.i686.sh similarity index 100% rename from scripts/travis/before_install.i686.sh rename to scripts/ci/before_install.i686.sh diff --git a/scripts/travis/before_install.x86_64-asan.sh b/scripts/ci/before_install.x86_64-asan.sh similarity index 100% rename from scripts/travis/before_install.x86_64-asan.sh rename to scripts/ci/before_install.x86_64-asan.sh diff --git a/scripts/travis/is_pr_merge.sh b/scripts/ci/is_pr_merge.sh similarity index 100% rename from scripts/travis/is_pr_merge.sh rename to scripts/ci/is_pr_merge.sh diff --git a/scripts/travis/leaksanitizer.conf b/scripts/ci/leaksanitizer.conf similarity index 100% rename from scripts/travis/leaksanitizer.conf rename to scripts/ci/leaksanitizer.conf diff --git a/scripts/travis/node_package.sh b/scripts/ci/node_package.sh similarity index 100% rename from scripts/travis/node_package.sh rename to scripts/ci/node_package.sh diff --git a/scripts/travis/travis_helper.sh b/scripts/ci/travis_helper.sh similarity index 100% rename from scripts/travis/travis_helper.sh rename to scripts/ci/travis_helper.sh diff --git a/src/extractor/edge_based_graph_factory.cpp b/src/extractor/edge_based_graph_factory.cpp index 7bd359de1..edef3d589 100644 --- a/src/extractor/edge_based_graph_factory.cpp +++ b/src/extractor/edge_based_graph_factory.cpp @@ -412,6 +412,13 @@ EdgeBasedGraphFactory::GenerateEdgeExpandedNodes(const WayRestrictionMap &way_re m_edge_based_node_distances.push_back( m_edge_based_node_distances[nbe_to_ebn_mapping[eid]]); + // Include duplicate nodes in cnbg to ebg mapping. This means a + // compressed node pair (u,v) can appear multiple times in this list. + // This is needed by the MLD partition step to ensure duplicate nodes + // are also assigned to partitions (the MLD partitioner is currently + // the only consumer of this mapping). + mapping.push_back(NBGToEBG{node_u, node_v, edge_based_node_id, SPECIAL_NODEID}); + edge_based_node_id++; progress.PrintStatus(progress_counter++); } diff --git a/src/extractor/maneuver_override_relation_parser.cpp b/src/extractor/maneuver_override_relation_parser.cpp index a414c0150..5a48adfb4 100644 --- a/src/extractor/maneuver_override_relation_parser.cpp +++ b/src/extractor/maneuver_override_relation_parser.cpp @@ -1,14 +1,8 @@ #include "extractor/maneuver_override_relation_parser.hpp" #include "extractor/maneuver_override.hpp" -#include "util/log.hpp" - -#include -#include -#include #include #include -#include #include #include diff --git a/src/extractor/restriction_parser.cpp b/src/extractor/restriction_parser.cpp index 28ff24a57..c81f4331d 100644 --- a/src/extractor/restriction_parser.cpp +++ b/src/extractor/restriction_parser.cpp @@ -5,10 +5,8 @@ #include "util/log.hpp" #include -#include #include #include -#include #include #include @@ -244,14 +242,15 @@ bool RestrictionParser::ShouldIgnoreRestriction(const std::string &except_tag_st // Be warned, this is quadratic work here, but we assume that // only a few exceptions are actually defined. - std::vector exceptions; - boost::algorithm::split_regex(exceptions, except_tag_string, boost::regex("[;][ ]*")); + const std::regex delimiter_re("[;][ ]*"); + std::sregex_token_iterator except_tags_begin( + except_tag_string.begin(), except_tag_string.end(), delimiter_re, -1); + std::sregex_token_iterator except_tags_end; - return std::any_of( - std::begin(exceptions), std::end(exceptions), [&](const std::string ¤t_string) { - return std::end(restrictions) != - std::find(std::begin(restrictions), std::end(restrictions), current_string); - }); + return std::any_of(except_tags_begin, except_tags_end, [&](const std::string ¤t_string) { + return std::end(restrictions) != + std::find(std::begin(restrictions), std::end(restrictions), current_string); + }); } } // namespace extractor } // namespace osrm diff --git a/src/partitioner/partitioner.cpp b/src/partitioner/partitioner.cpp index 29f6395a3..f01ea966c 100644 --- a/src/partitioner/partitioner.cpp +++ b/src/partitioner/partitioner.cpp @@ -118,6 +118,10 @@ int Partitioner::Run(const PartitionerConfig &config) edge_based_partition_ids[backward_node] = node_based_partition_ids[v]; } + BOOST_ASSERT(std::none_of(edge_based_partition_ids.begin(), + edge_based_partition_ids.end(), + [](auto x) { return x == SPECIAL_NODEID; })); + std::vector partitions; std::vector level_to_num_cells; std::tie(partitions, level_to_num_cells) = diff --git a/src/server/api/url_parser.cpp b/src/server/api/url_parser.cpp index b5da6fcce..1a10f66c3 100644 --- a/src/server/api/url_parser.cpp +++ b/src/server/api/url_parser.cpp @@ -26,15 +26,15 @@ struct URLParser final : qi::grammar { using boost::spirit::repository::qi::iter_pos; - alpha_numeral = qi::char_("a-zA-Z0-9"); + identifier = qi::char_("a-zA-Z0-9_.~:-"); percent_encoding = qi::char_('%') > qi::uint_parser()[qi::_val = qi::_1]; - polyline_chars = qi::char_("a-zA-Z0-9_.--[]{}@?|\\~`^") | percent_encoding; - all_chars = polyline_chars | qi::char_("=,;:&()."); + polyline_chars = qi::char_("a-zA-Z0-9_[]{}@?|\\~`^") | percent_encoding; + all_chars = polyline_chars | qi::char_("=,;:&().-"); - service = +alpha_numeral; + service = +identifier; version = qi::uint_; - profile = +alpha_numeral; + profile = +identifier; query = +all_chars; // Example input: /route/v1/driving/7.416351,43.731205;7.420363,43.736189 @@ -54,7 +54,7 @@ struct URLParser final : qi::grammar qi::rule profile; qi::rule query; - qi::rule alpha_numeral; + qi::rule identifier; qi::rule all_chars; qi::rule polyline_chars; qi::rule percent_encoding; diff --git a/src/server/connection.cpp b/src/server/connection.cpp index d6441977f..31fed90e8 100644 --- a/src/server/connection.cpp +++ b/src/server/connection.cpp @@ -3,13 +3,10 @@ #include "server/request_parser.hpp" #include -#include #include #include #include -#include -#include #include namespace osrm @@ -48,6 +45,12 @@ void Connection::handle_read(const boost::system::error_code &error, std::size_t { if (error) { + if (error != boost::asio::error::operation_aborted) + { + // Error not triggered by timer expiry, commence connection shutdown. + util::Log(logDEBUG) << "Connection read error: " << error.message(); + handle_shutdown(); + } return; } @@ -73,6 +76,7 @@ void Connection::handle_read(const boost::system::error_code &error, std::size_t current_request.endpoint = TCP_socket.remote_endpoint(ec).address(); if (ec) { + util::Log(logDEBUG) << "Socket remote endpoint error: " << ec.message(); handle_shutdown(); return; } @@ -165,6 +169,10 @@ void Connection::handle_write(const boost::system::error_code &error) handle_shutdown(); } } + else + { + util::Log(logDEBUG) << "Connection write error: " << error.message(); + } } /// Handle completion of a timeout timer.. @@ -183,6 +191,8 @@ void Connection::handle_timeout(boost::system::error_code ec) void Connection::handle_shutdown() { + // Cancel timer to ensure all resources are released immediately on shutdown. + timer.cancel(); // Initiate graceful connection closure. boost::system::error_code ignore_error; TCP_socket.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignore_error); diff --git a/unit_tests/library/json.cpp b/unit_tests/library/json.cpp index 537eecc94..1b0b36a86 100644 --- a/unit_tests/library/json.cpp +++ b/unit_tests/library/json.cpp @@ -6,7 +6,6 @@ #include "engine/api/json_factory.hpp" #include "osrm/coordinate.hpp" -#include #include using namespace osrm; @@ -27,7 +26,7 @@ BOOST_AUTO_TEST_CASE(test_json_linestring) const auto coords = geom.values["coordinates"].get().values; BOOST_CHECK_EQUAL(coords.size(), 3); // array of three location arrays - for (const auto each : coords) + for (const auto &each : coords) { const auto loc = each.get().values; BOOST_CHECK_EQUAL(loc.size(), 2); @@ -53,7 +52,7 @@ BOOST_AUTO_TEST_CASE(test_json_single_point) const auto coords = geom.values["coordinates"].get().values; BOOST_CHECK_EQUAL(coords.size(), 2); // array of two location arrays - for (const auto each : coords) + for (const auto &each : coords) { const auto loc = each.get().values; BOOST_CHECK_EQUAL(loc.size(), 2); diff --git a/unit_tests/library/match.cpp b/unit_tests/library/match.cpp index 2302012c7..70be34472 100644 --- a/unit_tests/library/match.cpp +++ b/unit_tests/library/match.cpp @@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(test_match_fb_serialization) const auto matchings = fb->routes(); const auto &number_of_matchings = matchings->size(); - for (const auto &waypoint : *waypoints) + for (const auto waypoint : *waypoints) { BOOST_CHECK(waypoint_check(waypoint)); const auto matchings_index = waypoint->matchings_index(); diff --git a/unit_tests/library/nearest.cpp b/unit_tests/library/nearest.cpp index 5ad451445..249e19387 100644 --- a/unit_tests/library/nearest.cpp +++ b/unit_tests/library/nearest.cpp @@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_fb_serialization) auto waypoints = fb->waypoints(); BOOST_CHECK(waypoints->size() > 0); // the dataset has at least one nearest coordinate - for (const auto &waypoint : *waypoints) + for (const auto waypoint : *waypoints) { BOOST_CHECK(waypoint->distance() >= 0); BOOST_CHECK(waypoint->nodes()->first() != 0); diff --git a/unit_tests/library/route.cpp b/unit_tests/library/route.cpp index 44fcb877b..0e4798523 100644 --- a/unit_tests/library/route.cpp +++ b/unit_tests/library/route.cpp @@ -263,7 +263,7 @@ void test_route_same_coordinates(bool use_json_only_api) const auto &entries = intersection_object.at("entry").get().values; BOOST_CHECK(bearings.size() == entries.size()); - for (const auto bearing : bearings) + for (const auto &bearing : bearings) BOOST_CHECK(0. <= bearing.get().value && bearing.get().value <= 360.); @@ -619,7 +619,7 @@ BOOST_AUTO_TEST_CASE(test_route_serialize_fb) const auto waypoints = fb->waypoints(); BOOST_CHECK(waypoints->size() == params.coordinates.size()); - for (const auto &waypoint : *waypoints) + for (const auto waypoint : *waypoints) { const auto longitude = waypoint->location()->longitude(); const auto latitude = waypoint->location()->latitude(); @@ -633,7 +633,7 @@ BOOST_AUTO_TEST_CASE(test_route_serialize_fb) const auto routes = fb->routes(); BOOST_REQUIRE_GT(routes->size(), 0); - for (const auto &route : *routes) + for (const auto route : *routes) { BOOST_CHECK_EQUAL(route->distance(), 0); BOOST_CHECK_EQUAL(route->duration(), 0); @@ -641,7 +641,7 @@ BOOST_AUTO_TEST_CASE(test_route_serialize_fb) const auto &legs = route->legs(); BOOST_CHECK(legs->size() > 0); - for (const auto &leg : *legs) + for (const auto leg : *legs) { BOOST_CHECK_EQUAL(leg->distance(), 0); @@ -720,7 +720,7 @@ BOOST_AUTO_TEST_CASE(test_route_serialize_fb_skip_waypoints) const auto routes = fb->routes(); BOOST_REQUIRE_GT(routes->size(), 0); - for (const auto &route : *routes) + for (const auto route : *routes) { BOOST_CHECK_EQUAL(route->distance(), 0); BOOST_CHECK_EQUAL(route->duration(), 0); diff --git a/unit_tests/library/table.cpp b/unit_tests/library/table.cpp index 74801f2c7..0fa27d9a1 100644 --- a/unit_tests/library/table.cpp +++ b/unit_tests/library/table.cpp @@ -332,14 +332,14 @@ BOOST_AUTO_TEST_CASE(test_table_serialiaze_fb) // check destinations array of waypoint objects const auto &destinations_array = fb->table()->destinations(); BOOST_CHECK_EQUAL(destinations_array->size(), params.destinations.size()); - for (const auto &destination : *destinations_array) + for (const auto destination : *destinations_array) { BOOST_CHECK(waypoint_check(destination)); } // check sources array of waypoint objects const auto &sources_array = fb->waypoints(); BOOST_CHECK_EQUAL(sources_array->size(), params.sources.size()); - for (const auto &source : *sources_array) + for (const auto source : *sources_array) { BOOST_CHECK(waypoint_check(source)); } diff --git a/unit_tests/library/trip.cpp b/unit_tests/library/trip.cpp index ba80cf542..6eb500e81 100644 --- a/unit_tests/library/trip.cpp +++ b/unit_tests/library/trip.cpp @@ -525,7 +525,7 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_fb_serialization) const auto trips = fb->routes(); BOOST_CHECK_EQUAL(trips->size(), 1); - for (const auto &waypoint : *waypoints) + for (const auto waypoint : *waypoints) { const auto longitude = waypoint->location()->longitude(); const auto latitude = waypoint->location()->latitude(); diff --git a/unit_tests/server/url_parser.cpp b/unit_tests/server/url_parser.cpp index 58f6f6496..4ac71efa3 100644 --- a/unit_tests/server/url_parser.cpp +++ b/unit_tests/server/url_parser.cpp @@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE(invalid_urls) BOOST_CHECK_EQUAL(testInvalidURL("/route/"), 7UL); BOOST_CHECK_EQUAL(testInvalidURL("/route/bla"), 7UL); BOOST_CHECK_EQUAL(testInvalidURL("/route/1/1,2;3;4"), 7UL); - BOOST_CHECK_EQUAL(testInvalidURL("/route/v1/pro_file/1,2;3,4"), 13UL); + BOOST_CHECK_EQUAL(testInvalidURL("/route/v1/pro[]file/1,2;3,4"), 13UL); BOOST_CHECK_EQUAL(testInvalidURL("/route/v1/profile"), 17UL); BOOST_CHECK_EQUAL(testInvalidURL("/route/v1/profile/"), 18UL); } @@ -124,6 +124,18 @@ BOOST_AUTO_TEST_CASE(valid_urls) BOOST_CHECK_EQUAL(reference_8.profile, result_8->profile); CHECK_EQUAL_RANGE(reference_8.query, result_8->query); BOOST_CHECK_EQUAL(reference_8.prefix_length, result_8->prefix_length); + + // profile with special characters + api::ParsedURL reference_9{ + "route", 1, "foo-bar_baz.profile", "0,1;2,3;4,5?options=value&foo=bar", 30UL}; + auto result_9 = + api::parseURL("/route/v1/foo-bar_baz.profile/0,1;2,3;4,5?options=value&foo=bar"); + BOOST_CHECK(result_9); + BOOST_CHECK_EQUAL(reference_9.service, result_9->service); + BOOST_CHECK_EQUAL(reference_9.version, result_9->version); + BOOST_CHECK_EQUAL(reference_9.profile, result_9->profile); + CHECK_EQUAL_RANGE(reference_9.query, result_9->query); + BOOST_CHECK_EQUAL(reference_9.prefix_length, result_9->prefix_length); } BOOST_AUTO_TEST_SUITE_END()