Migrate GCC CI jobs to run on GCC 11, 12, and 13 (#6865)
This commit is contained in:
parent
dff76d31d5
commit
70969186f6
99
.github/workflows/osrm-backend.yml
vendored
99
.github/workflows/osrm-backend.yml
vendored
@ -148,26 +148,26 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: gcc-9-debug-cov
|
- name: gcc-13-debug-cov
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
node: 18
|
node: 20
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
BUILD_TOOLS: ON
|
BUILD_TOOLS: ON
|
||||||
BUILD_TYPE: Debug
|
BUILD_TYPE: Debug
|
||||||
CCOMPILER: gcc-9
|
CCOMPILER: gcc-13
|
||||||
CUCUMBER_TIMEOUT: 20000
|
CUCUMBER_TIMEOUT: 20000
|
||||||
CXXCOMPILER: g++-9
|
CXXCOMPILER: g++-13
|
||||||
ENABLE_COVERAGE: ON
|
ENABLE_COVERAGE: ON
|
||||||
|
|
||||||
- name: gcc-9-debug-asan-ubsan
|
- name: clang-15-debug-asan-ubsan
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
node: 18
|
node: 20
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
BUILD_TOOLS: ON
|
BUILD_TOOLS: ON
|
||||||
BUILD_TYPE: Debug
|
BUILD_TYPE: Debug
|
||||||
CCOMPILER: gcc-9
|
CCOMPILER: clang-15
|
||||||
CUCUMBER_TIMEOUT: 20000
|
CUCUMBER_TIMEOUT: 20000
|
||||||
CXXCOMPILER: g++-9
|
CXXCOMPILER: clang++-15
|
||||||
ENABLE_SANITIZER: ON
|
ENABLE_SANITIZER: ON
|
||||||
TARGET_ARCH: x86_64-asan-ubsan
|
TARGET_ARCH: x86_64-asan-ubsan
|
||||||
OSRM_CONNECTION_RETRIES: 10
|
OSRM_CONNECTION_RETRIES: 10
|
||||||
@ -245,9 +245,20 @@ jobs:
|
|||||||
CXXCOMPILER: clang++-15
|
CXXCOMPILER: clang++-15
|
||||||
ENABLE_CONAN: ON
|
ENABLE_CONAN: ON
|
||||||
|
|
||||||
|
- name: gcc-13-release
|
||||||
|
continue-on-error: false
|
||||||
|
node: 20
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
BUILD_TOOLS: ON
|
||||||
|
BUILD_TYPE: Release
|
||||||
|
CCOMPILER: gcc-13
|
||||||
|
CXXCOMPILER: g++-13
|
||||||
|
ENABLE_BENCHMARKS: ON
|
||||||
|
CXXFLAGS: '-Wno-array-bounds -Wno-uninitialized'
|
||||||
|
|
||||||
- name: gcc-12-release
|
- name: gcc-12-release
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
node: 18
|
node: 20
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
BUILD_TOOLS: ON
|
BUILD_TOOLS: ON
|
||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Release
|
||||||
@ -258,56 +269,14 @@ jobs:
|
|||||||
|
|
||||||
- name: gcc-11-release
|
- name: gcc-11-release
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
node: 18
|
node: 20
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
BUILD_TOOLS: ON
|
BUILD_TOOLS: ON
|
||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Release
|
||||||
CCOMPILER: gcc-11
|
CCOMPILER: gcc-11
|
||||||
CXXCOMPILER: g++-11
|
CXXCOMPILER: g++-11
|
||||||
ENABLE_BENCHMARKS: ON
|
ENABLE_BENCHMARKS: ON
|
||||||
|
|
||||||
- name: gcc-10-release
|
|
||||||
continue-on-error: false
|
|
||||||
node: 18
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
BUILD_TOOLS: ON
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
CCOMPILER: gcc-10
|
|
||||||
CXXCOMPILER: g++-10
|
|
||||||
|
|
||||||
- name: gcc-9-release
|
|
||||||
continue-on-error: false
|
|
||||||
node: 18
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
BUILD_TOOLS: ON
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
CCOMPILER: gcc-9
|
|
||||||
CXXCOMPILER: g++-9
|
|
||||||
CXXFLAGS: -Wno-cast-function-type
|
|
||||||
|
|
||||||
- name: gcc-9-conan-release-i686
|
|
||||||
continue-on-error: false
|
|
||||||
node: 18
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
BUILD_TOOLS: ON
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
CCOMPILER: gcc-9
|
|
||||||
CFLAGS: "-m32 -msse2 -mfpmath=sse"
|
|
||||||
CXXCOMPILER: g++-9
|
|
||||||
CXXFLAGS: "-m32 -msse2 -mfpmath=sse"
|
|
||||||
TARGET_ARCH: i686
|
|
||||||
ENABLE_CONAN: ON
|
|
||||||
|
|
||||||
- name: gcc-8-release
|
|
||||||
continue-on-error: false
|
|
||||||
node: 18
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
BUILD_TOOLS: ON
|
|
||||||
BUILD_TYPE: Release
|
|
||||||
CCOMPILER: gcc-8
|
|
||||||
CXXCOMPILER: g++-8
|
|
||||||
CXXFLAGS: -Wno-cast-function-type
|
|
||||||
|
|
||||||
- name: conan-linux-release-node
|
- name: conan-linux-release-node
|
||||||
build_node_package: true
|
build_node_package: true
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
@ -422,6 +391,7 @@ jobs:
|
|||||||
# We can only set this after checkout once we know the workspace directory
|
# We can only set this after checkout once we know the workspace directory
|
||||||
echo "LSAN_OPTIONS=print_suppressions=0:suppressions=${GITHUB_WORKSPACE}/scripts/ci/leaksanitizer.conf" >> $GITHUB_ENV
|
echo "LSAN_OPTIONS=print_suppressions=0:suppressions=${GITHUB_WORKSPACE}/scripts/ci/leaksanitizer.conf" >> $GITHUB_ENV
|
||||||
echo "UBSAN_OPTIONS=symbolize=1:halt_on_error=1:print_stacktrace=1:suppressions=${GITHUB_WORKSPACE}/scripts/ci/undefinedsanitizer.conf" >> $GITHUB_ENV
|
echo "UBSAN_OPTIONS=symbolize=1:halt_on_error=1:print_stacktrace=1:suppressions=${GITHUB_WORKSPACE}/scripts/ci/undefinedsanitizer.conf" >> $GITHUB_ENV
|
||||||
|
echo "ASAN_OPTIONS=print_suppressions=0:suppressions=${GITHUB_WORKSPACE}/scripts/ci/addresssanitizer.conf" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${RUNNER_OS}" == "Linux" ]]; then
|
if [[ "${RUNNER_OS}" == "Linux" ]]; then
|
||||||
@ -448,7 +418,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Linux dev packages
|
# Linux dev packages
|
||||||
if [ "${TARGET_ARCH}" != "i686" ] && [ "${ENABLE_CONAN}" != "ON" ]; then
|
if [ "${ENABLE_CONAN}" != "ON" ]; then
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y libbz2-dev libxml2-dev libzip-dev liblua5.2-dev libboost-all-dev
|
sudo apt-get install -y libbz2-dev libxml2-dev libzip-dev liblua5.2-dev libboost-all-dev
|
||||||
if [[ "${CCOMPILER}" != clang-* ]]; then
|
if [[ "${CCOMPILER}" != clang-* ]]; then
|
||||||
@ -457,9 +427,6 @@ jobs:
|
|||||||
if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then
|
if [[ "${ENABLE_COVERAGE}" == "ON" ]]; then
|
||||||
sudo apt-get install -y lcov
|
sudo apt-get install -y lcov
|
||||||
fi
|
fi
|
||||||
elif [[ $TARGET_ARCH == "i686" ]]; then
|
|
||||||
source ./scripts/ci/before_install.${TARGET_ARCH}.sh
|
|
||||||
echo "PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}" >> $GITHUB_ENV
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TBB
|
# TBB
|
||||||
@ -539,7 +506,7 @@ jobs:
|
|||||||
# All tests assume to be run from the build directory
|
# All tests assume to be run from the build directory
|
||||||
pushd ${OSRM_BUILD_DIR}
|
pushd ${OSRM_BUILD_DIR}
|
||||||
for i in ./unit_tests/*-tests ; do echo Running $i ; $i ; done
|
for i in ./unit_tests/*-tests ; do echo Running $i ; $i ; done
|
||||||
if [ -z "${ENABLE_SANITIZER}" ] && [ "$TARGET_ARCH" != "i686" ]; then
|
if [ -z "${ENABLE_SANITIZER}" ]; then
|
||||||
npm run nodejs-tests
|
npm run nodejs-tests
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
@ -594,12 +561,12 @@ jobs:
|
|||||||
name: logs
|
name: logs
|
||||||
path: test/logs/
|
path: test/logs/
|
||||||
|
|
||||||
- name: Generate code coverage
|
# - name: Generate code coverage
|
||||||
if: ${{ matrix.ENABLE_COVERAGE == 'ON' }}
|
# if: ${{ matrix.ENABLE_COVERAGE == 'ON' }}
|
||||||
run: |
|
# run: |
|
||||||
lcov --directory . --capture --output-file coverage.info # capture coverage info
|
# lcov --directory . --capture --output-file coverage.info # capture coverage info
|
||||||
lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
|
# lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
|
||||||
lcov --list coverage.info #debug info
|
# lcov --list coverage.info #debug info
|
||||||
|
|
||||||
# # Uploading report to CodeCov
|
# # Uploading report to CodeCov
|
||||||
# - name: Upload code coverage
|
# - name: Upload code coverage
|
||||||
|
@ -115,7 +115,7 @@ include(GNUInstallDirs)
|
|||||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
message(STATUS "Building on a 64 bit system")
|
message(STATUS "Building on a 64 bit system")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Building on a 32 bit system")
|
message(FATAL_ERROR "Building on a 32 bit system is not supported")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include/)
|
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}/include/)
|
||||||
@ -223,7 +223,7 @@ endif()
|
|||||||
set(MAYBE_COVERAGE_LIBRARIES "")
|
set(MAYBE_COVERAGE_LIBRARIES "")
|
||||||
if (ENABLE_COVERAGE)
|
if (ENABLE_COVERAGE)
|
||||||
if (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
if (NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
message(ERROR "ENABLE_COVERAGE=ON only make sense with a Debug build")
|
message(ERROR "ENABLE_COVERAGE=ON only makes sense with a Debug build")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Enabling coverage")
|
message(STATUS "Enabling coverage")
|
||||||
set(MAYBE_COVERAGE_LIBRARIES "-lgcov")
|
set(MAYBE_COVERAGE_LIBRARIES "-lgcov")
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
#ifndef OSRM_GUIDANCE_TURN_INSTRUCTION_HPP_
|
#ifndef OSRM_GUIDANCE_TURN_INSTRUCTION_HPP_
|
||||||
#define OSRM_GUIDANCE_TURN_INSTRUCTION_HPP_
|
#define OSRM_GUIDANCE_TURN_INSTRUCTION_HPP_
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
#include "guidance/roundabout_type.hpp"
|
#include "guidance/roundabout_type.hpp"
|
||||||
#include "util/attributes.hpp"
|
#include "util/attributes.hpp"
|
||||||
#include "util/typedefs.hpp"
|
#include "util/typedefs.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <array>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
namespace osrm::guidance
|
namespace osrm::guidance
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -154,24 +155,23 @@ inline bool operator==(const TurnInstruction lhs, const TurnInstruction rhs)
|
|||||||
inline bool hasRoundaboutType(const TurnInstruction instruction)
|
inline bool hasRoundaboutType(const TurnInstruction instruction)
|
||||||
{
|
{
|
||||||
using namespace guidance::TurnType;
|
using namespace guidance::TurnType;
|
||||||
const constexpr TurnType::Enum valid_types[] = {TurnType::EnterRoundabout,
|
const constexpr std::array<TurnType::Enum, 13> valid_types = {
|
||||||
TurnType::EnterAndExitRoundabout,
|
TurnType::EnterRoundabout,
|
||||||
TurnType::EnterRotary,
|
TurnType::EnterAndExitRoundabout,
|
||||||
TurnType::EnterAndExitRotary,
|
TurnType::EnterRotary,
|
||||||
TurnType::EnterRoundaboutIntersection,
|
TurnType::EnterAndExitRotary,
|
||||||
TurnType::EnterAndExitRoundaboutIntersection,
|
TurnType::EnterRoundaboutIntersection,
|
||||||
TurnType::EnterRoundaboutAtExit,
|
TurnType::EnterAndExitRoundaboutIntersection,
|
||||||
TurnType::ExitRoundabout,
|
TurnType::EnterRoundaboutAtExit,
|
||||||
TurnType::EnterRotaryAtExit,
|
TurnType::ExitRoundabout,
|
||||||
TurnType::ExitRotary,
|
TurnType::EnterRotaryAtExit,
|
||||||
TurnType::EnterRoundaboutIntersectionAtExit,
|
TurnType::ExitRotary,
|
||||||
TurnType::ExitRoundaboutIntersection,
|
TurnType::EnterRoundaboutIntersectionAtExit,
|
||||||
TurnType::StayOnRoundabout};
|
TurnType::ExitRoundaboutIntersection,
|
||||||
|
TurnType::StayOnRoundabout};
|
||||||
|
|
||||||
const auto *first = valid_types;
|
return std::find(valid_types.cbegin(), valid_types.cend(), instruction.type) !=
|
||||||
const auto *last = first + sizeof(valid_types) / sizeof(valid_types[0]);
|
valid_types.cend();
|
||||||
|
|
||||||
return std::find(first, last, instruction.type) != last;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool entersRoundabout(const guidance::TurnInstruction instruction)
|
inline bool entersRoundabout(const guidance::TurnInstruction instruction)
|
||||||
|
0
scripts/ci/addresssanitizer.conf
Normal file
0
scripts/ci/addresssanitizer.conf
Normal file
@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh -ex
|
|
||||||
|
|
||||||
sudo dpkg --add-architecture i386
|
|
||||||
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test && ( sudo apt-get update -qq --yes || true )
|
|
||||||
|
|
||||||
sudo apt-get install -qq --yes --force-yes g++-9-multilib libxml2-dev:i386 libexpat1-dev:i386 libzip-dev:i386 libbz2-dev:i386 libtbb-dev:i386 lua5.2:i386 liblua5.2-dev:i386 libboost-date-time-dev:i386 libboost-filesystem-dev:i386 libboost-iostreams-dev:i386 libboost-program-options-dev:i386 libboost-regex-dev:i386 libboost-system-dev:i386 libboost-thread-dev:i386 libboost-test-dev:i386
|
|
@ -1,3 +1,4 @@
|
|||||||
|
alignment:src/contractor/graph_contractor.cpp
|
||||||
enum:include/tbb/pipeline.h
|
enum:include/tbb/pipeline.h
|
||||||
vptr:src/util/log.cpp
|
vptr:src/util/log.cpp
|
||||||
vptr:include/tbb/task.h
|
vptr:include/tbb/task.h
|
||||||
|
@ -96,11 +96,18 @@ struct to_lua_object : public boost::static_visitor<sol::object>
|
|||||||
// caught but instead should terminate the process. The point of having this error handler rather
|
// caught but instead should terminate the process. The point of having this error handler rather
|
||||||
// than just using unprotected Lua functions which terminate the process automatically is that this
|
// than just using unprotected Lua functions which terminate the process automatically is that this
|
||||||
// function provides more useful error messages including Lua tracebacks and line numbers.
|
// function provides more useful error messages including Lua tracebacks and line numbers.
|
||||||
void handle_lua_error(sol::protected_function_result &luares)
|
void handle_lua_error(const sol::protected_function_result &luares)
|
||||||
{
|
{
|
||||||
sol::error luaerr = luares;
|
sol::error luaerr = luares;
|
||||||
std::string msg = luaerr.what();
|
const auto msg = luaerr.what();
|
||||||
std::cerr << msg << std::endl;
|
if (msg != nullptr)
|
||||||
|
{
|
||||||
|
std::cerr << msg << "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << "unknown error\n";
|
||||||
|
}
|
||||||
throw util::exception("Lua error (see stderr for traceback)");
|
throw util::exception("Lua error (see stderr for traceback)");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1080,7 +1087,7 @@ Sol2ScriptingEnvironment::GetStringListsFromTable(const std::string &table_name)
|
|||||||
|
|
||||||
for (const auto &pair : *table)
|
for (const auto &pair : *table)
|
||||||
{
|
{
|
||||||
sol::table inner_table = pair.second;
|
const sol::table &inner_table = pair.second;
|
||||||
if (!inner_table.valid())
|
if (!inner_table.valid())
|
||||||
{
|
{
|
||||||
throw util::exception("Expected a sub-table at " + table_name + "[" +
|
throw util::exception("Expected a sub-table at " + table_name + "[" +
|
||||||
|
Loading…
Reference in New Issue
Block a user