From f54d72ecf62e5a16e6ad387888440622bc60f3ff Mon Sep 17 00:00:00 2001 From: Reinhard Biegel Date: Mon, 30 May 2022 11:40:07 +0200 Subject: [PATCH 01/13] fix(Common): Add missing array include and namespace fixes for gcc-11 compatibility Signed-off-by: Reinhard Biegel --- sim/include/signalInterface.h | 2 ++ sim/src/common/globalDefinitions.h | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sim/include/signalInterface.h b/sim/include/signalInterface.h index b2d36c02..f1cdd1cc 100644 --- a/sim/include/signalInterface.h +++ b/sim/include/signalInterface.h @@ -1,6 +1,7 @@ /******************************************************************************** * Copyright (c) 2016-2018 ITK Engineering GmbH * 2017-2019 in-tech GmbH + * 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -11,6 +12,7 @@ #pragma once +#include #include #include diff --git a/sim/src/common/globalDefinitions.h b/sim/src/common/globalDefinitions.h index 0f332324..257493b7 100644 --- a/sim/src/common/globalDefinitions.h +++ b/sim/src/common/globalDefinitions.h @@ -19,6 +19,7 @@ #pragma once #include "common/opMath.h" +#include #include #include #include @@ -110,7 +111,7 @@ static constexpr std::array AgentCategoryMapping{ constexpr const char *to_cstr(AgentCategory agentCategory) { - return AgentCategoryMapping[static_cast(agentCategory)]; + return AgentCategoryMapping[static_cast(agentCategory)]; } inline std::string to_string(AgentCategory agentCategory) noexcept @@ -150,8 +151,8 @@ static constexpr std::array AgentVehicleTypeMapping{ constexpr const char *to_cstr(AgentVehicleType agentVehicleType) { - return AgentVehicleTypeMapping[static_cast(agentVehicleType) - - static_cast(AgentVehicleType::NONE)]; + return AgentVehicleTypeMapping[static_cast(agentVehicleType) - + static_cast(AgentVehicleType::NONE)]; } inline std::string to_string(AgentVehicleType agentVehicleType) noexcept -- GitLab From e43b889020e17886474d48ade1ec9393965b1b11 Mon Sep 17 00:00:00 2001 From: Reinhard Biegel Date: Fri, 20 May 2022 16:22:17 +0200 Subject: [PATCH 02/13] feat(Utils): Provide build environment installer script Signed-off-by: Reinhard Biegel --- .../_static/msys2_packages.txt | 54 ++++--- doc/source/requirements.txt | 10 +- .../endToEndTests/pyOpenPASS/requirements.txt | 6 +- utils/ci/scripts/setup_env.cmd | 150 ++++++++++++++++++ 4 files changed, 187 insertions(+), 33 deletions(-) create mode 100644 utils/ci/scripts/setup_env.cmd diff --git a/doc/source/installation_guide/_static/msys2_packages.txt b/doc/source/installation_guide/_static/msys2_packages.txt index b1e26463..9248213f 100644 --- a/doc/source/installation_guide/_static/msys2_packages.txt +++ b/doc/source/installation_guide/_static/msys2_packages.txt @@ -1,33 +1,35 @@ # for simulator -pacman -S mingw-w64-x86_64-boost #Tested with 1.75.0-2 -pacman -S mingw-w64-x86_64-ccache #Tested with 3.7.9-1 -pacman -S mingw-w64-x86_64-cmake #Tested with 3.19.2-1 -pacman -S mingw-w64-x86_64-doxygen #Tested with 1.8.20-1 -pacman -S mingw-w64-x86_64-gcc #Tested with 10.2.0-6 -pacman -S mingw-w64-x86_64-gdb #Tested with 10.1-2 -pacman -S mingw-w64-x86_64-graphviz #Tested with 2.44.1-3 -pacman -S mingw-w64-x86_64-gtest #Tested with 1.11.0-4 -#pacman -S mingw-w64-x86_64-protobuf # currently uses custom build (3.17.3). See 'Installing the Source Packages' below. -pacman -S mingw-w64-x86_64-qt5 #Tested with 5.15.2-5 -pacman -S make #Tested with 4.3-1 +mingw-w64-x86_64-boost # Tested with 1.79.0-2 +mingw-w64-x86_64-ccache # Tested with 4.6-1 +mingw-w64-x86_64-cmake # Tested with 3.23.1-1 +mingw-w64-x86_64-doxygen # Tested with 1.9.3-2 +mingw-w64-x86_64-gcc # Tested with 11.2.0-10 +mingw-w64-x86_64-gdb # Tested with 11.2-2 +mingw-w64-x86_64-graphviz # Tested with 2.44.1-9 +mingw-w64-x86_64-gtest # Tested with 1.11.0-5 +mingw-w64-x86_64-qt5 # Tested with 5.15.2-15 +make # Tested with 4.3-3 # for documentation -pacman -S mingw-w64-x86_64-python #Tested with 3.9.6.2 -pacman -S mingw-w64-x86_64-python-pip #Tested with 21.1.3-2 -pacman -S mingw-w64-x86_64-python-lxml #Tested with 4.6.2-2 +mingw-w64-x86_64-python # Tested with 3.9.13-1 +mingw-w64-x86_64-python-pip # Tested with 22.0.4-1 +mingw-w64-x86_64-python-lxml # Tested with 4.8.0-1 -# get necessary latex style (assuming default paths for MSYS2) -wget -P /mingw64/share/texmf-dist/tex/latex/anyfontsize \ - http://mirrors.ctan.org/macros/latex/contrib/anyfontsize/anyfontsize.sty - -# fonts (picks up anyfontsize) and equation rendering in the documentation -pacman -S mingw-w64-x86_64-zziplib #Tested with 0.13.72-3 -pacman -S mingw-w64-x86_64-texlive-bin #Tested with 2021.20210424-5 -pacman -S mingw-w64-x86_64-texlive-core #Tested with 2021.20210519-2 -pacman -S mingw-w64-x86_64-texlive-font-utils #Tested with 2021.20210519-1 +# fonts and equation rendering in the documentation +mingw-w64-x86_64-texlive-bin # Tested with 2021.20210424-10 +mingw-w64-x86_64-texlive-core # Tested with 2021.20210906-1 +mingw-w64-x86_64-texlive-font-utils # Tested with 2021.20210906-1 +mingw-w64-x86_64-texlive-latex-extra # Tested with 2021.20210906-1 +mingw-w64-x86_64-zziplib # Tested with 0.13.72-3 # for sphinx/exhale -pacman -S libxslt-devel +libxslt-devel # Tested with 1.1.35-1 + +# additional recommendations +diffutils +dos2unix +git +patch +vim +mingw-w64-x86_64-ag -# additional python packages for documentation -pip3 install sphinx sphinx-rtd-theme sphinx-tabs breathe exhale sphinxcontrib-spelling diff --git a/doc/source/requirements.txt b/doc/source/requirements.txt index d967f0a1..5587d040 100644 --- a/doc/source/requirements.txt +++ b/doc/source/requirements.txt @@ -1,4 +1,6 @@ -sphinx==4.1.1 -sphinx-rtd-theme==0.5.2 -sphinxcontrib-spelling==7.2.1 -sphinx-tabs==3.1.0 \ No newline at end of file +breathe +exhale +sphinx +sphinx-rtd-theme +sphinx-tabs +sphinxcontrib-spelling diff --git a/sim/tests/endToEndTests/pyOpenPASS/requirements.txt b/sim/tests/endToEndTests/pyOpenPASS/requirements.txt index 12d75f83..364d0510 100644 --- a/sim/tests/endToEndTests/pyOpenPASS/requirements.txt +++ b/sim/tests/endToEndTests/pyOpenPASS/requirements.txt @@ -8,6 +8,6 @@ # SPDX-License-Identifier: EPL-2.0 ################################################################################ junitparser==2.0.0 -lxml==6.4.2 -pandas==1.3.0 -pytest==7.1.2 \ No newline at end of file +lxml==4.6.5 +pandas==1.4.2 +pytest<7 \ No newline at end of file diff --git a/utils/ci/scripts/setup_env.cmd b/utils/ci/scripts/setup_env.cmd new file mode 100644 index 00000000..d5cb27ed --- /dev/null +++ b/utils/ci/scripts/setup_env.cmd @@ -0,0 +1,150 @@ +::################################################################################ +::# Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +::# +::# This program and the accompanying materials are made available under the +::# terms of the Eclipse Public License 2.0 which is available at +::# http://www.eclipse.org/legal/epl-2.0. +::# +::# SPDX-License-Identifier: EPL-2.0 +::################################################################################ + +@echo off +set ME=%0 +set LC_ALL=C + +if [%1] == [] ( + call :showUsage + exit /b 1 +) + +set TARGET_PATH=%~f1 + +set MSYS2_TARGET_PATH=%TARGET_PATH%\msys64 +set MSYS2_SHELL=%MSYS2_TARGET_PATH%\usr\bin\bash.exe -lc +set MSYS2_PACKAGE=msys2-base-x86_64-latest.sfx.exe +set MSYS2_URL=https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/%MSYS2_PACKAGE% + +set PYTHON_TARGET_PATH=%TARGET_PATH%\Python +set PYTHON_VERSION=3.10.4 +set PYTHON_PACKAGE=python-%PYTHON_VERSION%-amd64.exe +set PYTHON_URL=https://www.python.org/ftp/python/%PYTHON_VERSION%/%PYTHON_PACKAGE% + +set MSVCRT_URL=https://aka.ms/highdpimfc2013x64enu +set MSVCRT_PACKAGE=vcredist_x64.exe + +set OLD_PATH=%PATH% +set MSYSTEM=MINGW64 +set CHERE_INVOKING=yes +set PATH=%MSYS2_TARGET_PATH%;%PATH% + +call :getAbsPath %~dp0..\.. +set REPO_ROOT=%ABS_PATH% + +echo. +echo ========================================== +echo openPASS development environment bootstrap +echo ========================================== +echo. + +pushd %TEMP% + +echo Installing MCVCRT120... +if not exist %MSVCRT_PACKAGE% ( + echo downloading... + powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile(${env:MSVCRT_URL}, ${env:MSVCRT_PACKAGE})" + if %ERRORLEVEL% neq 0 GOTO cleanup +) + +echo installing... +%MSVCRT_PACKAGE% /passive /quiet /norestart +if %ERRORLEVEL% neq 0 GOTO cleanup + +if not exist %MSYS2_TARGET_PATH% ( + echo Installing msys2... + if not exist %MSYS2_PACKAGE% ( + echo downloading... + rem curl -s -f -L -O %MSYS2_URL% + powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile(${env:MSYS2_URL}, ${env:MSYS2_PACKAGE})" + if %ERRORLEVEL% neq 0 GOTO cleanup + ) + + echo installing... + %MSYS2_PACKAGE% -y -o%TARGET_PATH% + if %ERRORLEVEL% neq 0 GOTO cleanup + + echo First launch of msys2... + %MSYS2_SHELL% "true" +) + +echo. +echo Running msys2 core update... +%MSYS2_SHELL% "pacman -Syuu --noconfirm" +if %ERRORLEVEL% neq 0 GOTO cleanup + +echo. +echo Running msys2 update... +%MSYS2_SHELL% "pacman -Syuu --noconfirm" +if %ERRORLEVEL% neq 0 GOTO cleanup + +echo. +echo Installing/upgrading required MSYS packages... +rem sed command strips comments from msys2_packages.txt file +%MSYS2_SHELL% "pacman -S --noconfirm --needed $(sed -e '/^\W*#/d;s/#.*//;/^$/d' $(cygpath -a $REPO_ROOT)doc/source/installation_guide/_static/msys2_packages.txt)" +if %ERRORLEVEL% neq 0 GOTO cleanup + +echo. +echo Upgrading pip... +%MSYS2_SHELL% "python -m pip install -U pip" +if %ERRORLEVEL% neq 0 GOTO cleanup + +echo. +echo Installing/upgrading Python packages for documentation build... +%MSYS2_SHELL% "pip install -U -r $(cygpath -a $REPO_ROOT)doc/source/requirements.txt" +if %ERRORLEVEL% neq 0 GOTO cleanup + +echo. +echo Installing Python for E2E tests... +if not exist %PYTHON_TARGET_PATH%\python.exe ( + if not exist %PYTHON_PACKAGE% ( + echo downloading... + rem curl -s -f -L -O %PYTHON_URL% + powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile(${env:PYTHON_URL}, ${env:PYTHON_PACKAGE})" + if %ERRORLEVEL% neq 0 GOTO cleanup + ) + + echo installing... + rem See https://docs.python.org/3/using/windows.html#installing-without-ui + %PYTHON_PACKAGE% InstallAllUsers=1 AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 Include_tcltk=0 Include_test=0 InstallLauncherAllUsers=0 DefaultAllUsersTargetDir=%PYTHON_TARGET_PATH% + if %ERRORLEVEL% neq 0 GOTO cleanup +) + +echo Upgrading pip... +"%PYTHON_TARGET_PATH%\python.exe" -m pip install -U pip +if %ERRORLEVEL% neq 0 GOTO cleanup + +echo Installing/upgrading Python packages for E2E tests... +"%PYTHON_TARGET_PATH%\python.exe" -m pip install -U -r %REPO_ROOT%\sim\tests\endToEndTests\pyOpenPASS\requirements.txt +if %ERRORLEVEL% neq 0 GOTO cleanup + +echo. +echo ==== +echo DONE +echo ==== +echo. + +set PATH=%OLD_PATH% +popd +exit /b 0 + +:showUsage +echo Usage: %ME% ^ +goto :eof + +:getAbsPath +SET ABS_PATH=%~dp1 +goto :eof + +:cleanup +set PATH=%OLD_PATH% +popd +exit /b 1 -- GitLab From 0e89712254105200381ee7c80fba59708d5290ba Mon Sep 17 00:00:00 2001 From: Raghunandan Netrapalli Madhusudhan Date: Mon, 22 Aug 2022 17:13:42 +0200 Subject: [PATCH 03/13] feat(Utils): Provide build environment installer script (Ubuntu 22.04) To minimize the gap between installed package versions in Linux and Windows an upgrade to Ubuntu 22.04 LTS is needed. Also-by: Reinhard Biegel --- utils/ci/scripts/setup_env.sh | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100755 utils/ci/scripts/setup_env.sh diff --git a/utils/ci/scripts/setup_env.sh b/utils/ci/scripts/setup_env.sh new file mode 100755 index 00000000..a99d2e68 --- /dev/null +++ b/utils/ci/scripts/setup_env.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +################################################################################ +# Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +################################################################################ + +for f in $(find /etc/apt -type f -name '*.list'); do + sed -i -e 's/focal/jammy/g' "$f" +done + +apt-get -qq update && apt-get -qq dist-upgrade && apt-get install -qq -y --no-install-recommends \ + build-essential \ + ca-certificates \ + ccache \ + cmake \ + dos2unix \ + doxygen \ + git \ + google-mock \ + googletest \ + graphviz \ + lcov \ + libgmock-dev \ + libgtest-dev \ + libprotobuf-dev \ + libqt5xmlpatterns5-dev \ + protobuf-compiler \ + python3 \ + python3-distutils \ + python3-pip \ + qtbase5-dev \ + && apt-get -qq clean + +apt-get install -qq -y --no-install-recommends \ + texlive-base \ + texlive-latex-extra + + +pip install \ + approvaltests==3.1.0 \ + empty-files \ + breathe \ + conan \ + exhale \ + junitparser \ + lxml \ + pandas \ + pytest \ + sphinx \ + sphinx-rtd-theme \ + sphinx-tabs \ + sphinxcontrib-spelling \ + watchdog + -- GitLab From 1f8cc7ddc4e292ea56130dddacf63d0adcc6a557 Mon Sep 17 00:00:00 2001 From: Reinhard Biegel Date: Wed, 30 Mar 2022 16:03:26 +0200 Subject: [PATCH 04/13] mod(CI): Dynamicly determine build concurrency Signed-off-by: Reinhard Biegel --- utils/ci/scripts/30_build.sh | 10 +++++++++- utils/ci/scripts/50_test.sh | 16 +++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/utils/ci/scripts/30_build.sh b/utils/ci/scripts/30_build.sh index 19ad2954..8a8acb36 100755 --- a/utils/ci/scripts/30_build.sh +++ b/utils/ci/scripts/30_build.sh @@ -17,5 +17,13 @@ MYDIR="$(dirname "$(readlink -f $0)")" cd "$MYDIR/../../../../build" || exit 1 -make -j4 install VERBOSE=1 +if hash nproc 2>/dev/null; then + # calculation is kept for reference + MAKE_JOB_COUNT=$(($(nproc)/1)) +else + # fallback, if nproc doesn't exist + MAKE_JOB_COUNT=2 +fi + +make -j$MAKE_JOB_COUNT install diff --git a/utils/ci/scripts/50_test.sh b/utils/ci/scripts/50_test.sh index bcfc67a1..46cb12ab 100755 --- a/utils/ci/scripts/50_test.sh +++ b/utils/ci/scripts/50_test.sh @@ -17,5 +17,19 @@ MYDIR="$(dirname "$(readlink -f $0)")" cd "$MYDIR/../../../../build" || exit 1 -make -j2 test ARGS="-j2 --output-on-failure" +if hash nproc 2>/dev/null; then + MAKE_JOB_COUNT=$(($(nproc)/2)) +else + # fallback, if nproc doesn't exist + MAKE_JOB_COUNT=2 +fi + +if [[ $MAKE_JOB_COUNT -eq 0 ]]; then + # fallback, if nproc == 1 + MAKE_JOB_COUNT=1 +fi + +export MAKEFLAGS=-j${MAKE_JOB_COUNT} + +ctest -j2 --output-on-failure -- GitLab From b7d26d25cf512bf020fa13c66ac846616fe5faf8 Mon Sep 17 00:00:00 2001 From: Reinhard Biegel Date: Wed, 6 Jul 2022 22:50:24 +0200 Subject: [PATCH 05/13] fix(CI): Avoid E2E test report directory clash Signed-off-by: Reinhard Biegel --- utils/ci/Jenkinsfile | 4 ++-- utils/ci/scripts/20_configure.sh | 2 +- utils/ci/scripts/90_pack_artifacts.sh | 26 ++++++++++++++++++++------ 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/utils/ci/Jenkinsfile b/utils/ci/Jenkinsfile index d73ceb22..44832bac 100644 --- a/utils/ci/Jenkinsfile +++ b/utils/ci/Jenkinsfile @@ -93,7 +93,7 @@ spec: } post { always { - archiveArtifacts allowEmptyArchive: true, artifacts: 'artifacts/**,dist/opSim/testreport/**', followSymlinks: false + archiveArtifacts allowEmptyArchive: true, artifacts: 'artifacts/**', followSymlinks: false junit allowEmptyResults: true, testResults: 'build/**/*Tests.xml,repo/sim/tests/endToEndTests/pyOpenPASS/result_*.xml' } } @@ -144,7 +144,7 @@ spec: post { always { bat 'subst W: /d' - archiveArtifacts allowEmptyArchive: true, artifacts: 'artifacts/**,dist/opSim/testreport/**', followSymlinks: false + archiveArtifacts allowEmptyArchive: true, artifacts: 'artifacts/**', followSymlinks: false junit allowEmptyResults: true, testResults: 'build/**/*Tests.xml,repo/sim/tests/endToEndTests/pyOpenPASS/result_*.xml' } } diff --git a/utils/ci/scripts/20_configure.sh b/utils/ci/scripts/20_configure.sh index 3aa299d4..b62bce41 100755 --- a/utils/ci/scripts/20_configure.sh +++ b/utils/ci/scripts/20_configure.sh @@ -70,7 +70,7 @@ cmake \ "$CMAKE_PYTHON_COMMAND_ARG" \ $CMAKE_VERSION_ARG \ -D CMAKE_PREFIX_PATH="$(join_paths ${DEPS[@]})" \ - -D CMAKE_INSTALL_PREFIX="$PWD/../dist/opSim" \ + -D CMAKE_INSTALL_PREFIX="$PWD/../dist/opSimulation" \ -D CMAKE_BUILD_TYPE=Release \ -D INSTALL_BIN_DIR:STRING=. \ -D INSTALL_EXTRA_RUNTIME_DEPS=ON \ diff --git a/utils/ci/scripts/90_pack_artifacts.sh b/utils/ci/scripts/90_pack_artifacts.sh index 5f12d26d..14f4f9bb 100755 --- a/utils/ci/scripts/90_pack_artifacts.sh +++ b/utils/ci/scripts/90_pack_artifacts.sh @@ -2,6 +2,7 @@ ################################################################################ # Copyright (c) 2021 in-tech GmbH +# 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at @@ -15,14 +16,27 @@ ################################################################################ MYDIR="$(dirname "$(readlink -f $0)")" -cd "$MYDIR/../../../../dist/opSim" || exit 1 +cd "$MYDIR/../../../../dist" || exit 1 -mkdir -p ../../artifacts || exit 1 +SIM_NAME=openPASS_SIM +E2E_NAME=openPASS_EndToEndTests + +mkdir -p ../artifacts/testreport || exit 1 if [[ "${OSTYPE}" = "msys" ]]; then - $MYDIR/util_zip.sh ../../artifacts/openPASS_SIM.zip doc gui modules schemas opSimulation.exe opSimulationManager.exe openPASS.exe *.dll - $MYDIR/util_zip.sh ../../artifacts/openPASS_EndToEndTests.zip artifacts + mv opSimulation/testreport ../artifacts/testreport/linux + $MYDIR/util_zip.sh ../artifacts/${E2E_NAME}.zip opSimulation/artifacts else - $MYDIR/util_tar.sh ../../artifacts/openPASS_SIM.tar.gz doc gui lib modules schemas opSimulation opSimulationManager openPASS *.so* --ignore-failed-read - $MYDIR/util_tar.sh ../../artifacts/openPASS_EndToEndTests.tar.gz artifacts --ignore-failed-read + mv opSimulation/testreport ../artifacts/testreport/windows + $MYDIR/util_tar.sh ../artifacts/${E2E_NAME}.tar.gz opSimulation/artifacts fi + +rm -rf opSimulation/artifacts opSimulation/configs opSimulation/results +mkdir opSimulation/configs + +if [[ "${OSTYPE}" = "msys" ]]; then + $MYDIR/util_zip.sh ../artifacts/${SIM_NAME}.zip opSimulation +else + $MYDIR/util_tar.sh ../artifacts/${SIM_NAME}.tar.gz opSimulation +fi + -- GitLab From 0579dcb211ab97bb68453e5dbcabff4b36a2c238 Mon Sep 17 00:00:00 2001 From: theresahefele Date: Mon, 18 Jul 2022 10:29:10 +0200 Subject: [PATCH 06/13] Mod(Doc): Modified CMAKE_PREFIX_PATH to make build process more robust (#5) * Mod(Doc): Modified CMAKE_PREFIX_PATH to make build process more robust * fix warning doc build Co-authored-by: arundas --- doc/source/installation_guide/30_install_openpass.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/source/installation_guide/30_install_openpass.rst b/doc/source/installation_guide/30_install_openpass.rst index 9ef1fe55..84473890 100644 --- a/doc/source/installation_guide/30_install_openpass.rst +++ b/doc/source/installation_guide/30_install_openpass.rst @@ -169,7 +169,7 @@ The above directory structure will be created by following the instructions of t .. code-block:: cmake -G "MSYS Makefiles" \ - -D CMAKE_PREFIX_PATH="C:/msys64/mingw64/bin;C:/simopenpass/deps/thirdParty/FMILibrary;C:/simopenpass/deps/thirdParty/osi;C:/simopenpass/deps/thirdParty/protobuf;C:/simopenpass/deps/thirdParty/protobuf-shared" \ + -D CMAKE_PREFIX_PATH="C:/simopenpass/deps/thirdParty/FMILibrary;C:/simopenpass/deps/thirdParty/osi;C:/simopenpass/deps/thirdParty/protobuf;C:/simopenpass/deps/thirdParty/protobuf-shared;C:/msys64/mingw64/bin" \ -D CMAKE_INSTALL_PREFIX=C:/OpenPASS/bin/core \ -D CMAKE_BUILD_TYPE=Release \ -D USE_CCACHE=ON \ @@ -180,9 +180,11 @@ The above directory structure will be created by following the instructions of t -D CMAKE_CXX_COMPILER=g++ \ .. - .. note:: By specifying ``INSTALL_EXTRA_RUNTIME_DEPS=ON``, runtime dependencies will be copied to the installation directory when running ``make install``. - This applies to all dependencies located in the paths specified in ``CMAKE_PREFIX_PATH``. - + .. note:: + + - By specifying ``INSTALL_EXTRA_RUNTIME_DEPS=ON``, runtime dependencies will be copied to the installation directory when running ``make install``. This applies to all dependencies located in the paths specified in ``CMAKE_PREFIX_PATH``. + - Make sure that the path ``C:/msys64/mingw64/bin`` is the last path in the CMAKE_PREFIX_PATH. Otherwise cmake might find and use local versions of required libraries instead of the ones listed in the thirdparties folder. + .. tab:: Linux .. code-block:: -- GitLab From 0219e231d25b5f39c83fbb4ad3868c4168c9efc4 Mon Sep 17 00:00:00 2001 From: Reinhard Biegel Date: Wed, 27 Jul 2022 01:33:09 +0200 Subject: [PATCH 07/13] fix(AlgorithmAEB_UnitTests): Typo in CMakeLists.txt --- sim/tests/unitTests/components/AlgorithmAEB/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/tests/unitTests/components/AlgorithmAEB/CMakeLists.txt b/sim/tests/unitTests/components/AlgorithmAEB/CMakeLists.txt index 7efecea7..f30a1066 100644 --- a/sim/tests/unitTests/components/AlgorithmAEB/CMakeLists.txt +++ b/sim/tests/unitTests/components/AlgorithmAEB/CMakeLists.txt @@ -25,7 +25,7 @@ add_openpass_target( INCDIRS ${COMPONENT_SOURCE_DIR} - ${COMPONENT_SIMCORE_DIR}/core/opSimulation/modules/World_OSI + ${OPENPASS_SIMCORE_DIR}/core/opSimulation/modules/World_OSI LIBRARIES Qt5::Core -- GitLab From fa19471a59c22b651c0988c51368ffb26f1ec5e0 Mon Sep 17 00:00:00 2001 From: Reinhard Biegel Date: Wed, 27 Jul 2022 02:00:43 +0200 Subject: [PATCH 08/13] fix(EndToEndTests): Rename OSMP stepper FMUs to avoid path length limits --- ...taToTrafficUpdateStepper.fmu => OSMPSDToTUS.fmu} | Bin .../ProfilesCatalog.xml | 2 +- ...taToTrafficUpdateStepper.fmu => OSMPSDToTUS.fmu} | Bin .../SystemConfig.xml | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename sim/contrib/examples/Configurations/DynamicOSMPSensorDataToTUStepper/{OSMPSensorDataToTrafficUpdateStepper.fmu => OSMPSDToTUS.fmu} (100%) rename sim/contrib/examples/Configurations/StaticOSMPSensorDataToTUStepper/{OSMPSensorDataToTrafficUpdateStepper.fmu => OSMPSDToTUS.fmu} (100%) diff --git a/sim/contrib/examples/Configurations/DynamicOSMPSensorDataToTUStepper/OSMPSensorDataToTrafficUpdateStepper.fmu b/sim/contrib/examples/Configurations/DynamicOSMPSensorDataToTUStepper/OSMPSDToTUS.fmu similarity index 100% rename from sim/contrib/examples/Configurations/DynamicOSMPSensorDataToTUStepper/OSMPSensorDataToTrafficUpdateStepper.fmu rename to sim/contrib/examples/Configurations/DynamicOSMPSensorDataToTUStepper/OSMPSDToTUS.fmu diff --git a/sim/contrib/examples/Configurations/DynamicOSMPSensorDataToTUStepper/ProfilesCatalog.xml b/sim/contrib/examples/Configurations/DynamicOSMPSensorDataToTUStepper/ProfilesCatalog.xml index e8c001af..5a6cfe30 100644 --- a/sim/contrib/examples/Configurations/DynamicOSMPSensorDataToTUStepper/ProfilesCatalog.xml +++ b/sim/contrib/examples/Configurations/DynamicOSMPSensorDataToTUStepper/ProfilesCatalog.xml @@ -212,7 +212,7 @@ - + diff --git a/sim/contrib/examples/Configurations/StaticOSMPSensorDataToTUStepper/OSMPSensorDataToTrafficUpdateStepper.fmu b/sim/contrib/examples/Configurations/StaticOSMPSensorDataToTUStepper/OSMPSDToTUS.fmu similarity index 100% rename from sim/contrib/examples/Configurations/StaticOSMPSensorDataToTUStepper/OSMPSensorDataToTrafficUpdateStepper.fmu rename to sim/contrib/examples/Configurations/StaticOSMPSensorDataToTUStepper/OSMPSDToTUS.fmu diff --git a/sim/contrib/examples/Configurations/StaticOSMPSensorDataToTUStepper/SystemConfig.xml b/sim/contrib/examples/Configurations/StaticOSMPSensorDataToTUStepper/SystemConfig.xml index 6c80d7d9..2e224cca 100644 --- a/sim/contrib/examples/Configurations/StaticOSMPSensorDataToTUStepper/SystemConfig.xml +++ b/sim/contrib/examples/Configurations/StaticOSMPSensorDataToTUStepper/SystemConfig.xml @@ -441,7 +441,7 @@ FmuPath string - OSMPSensorDataToTrafficUpdateStepper.fmu + OSMPSDToTUS.fmu Logging -- GitLab From b4cad9c7fa76e5a8412fc457d68bd6d43e01b146 Mon Sep 17 00:00:00 2001 From: Weiss David Date: Tue, 12 Jul 2022 13:43:04 +0200 Subject: [PATCH 09/13] fix(World_OSI): Fix structured binding in lambda --- .../core/opSimulation/modules/World_OSI/WorldDataQuery.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sim/src/core/opSimulation/modules/World_OSI/WorldDataQuery.cpp b/sim/src/core/opSimulation/modules/World_OSI/WorldDataQuery.cpp index 54f9a148..de7aafa1 100644 --- a/sim/src/core/opSimulation/modules/World_OSI/WorldDataQuery.cpp +++ b/sim/src/core/opSimulation/modules/World_OSI/WorldDataQuery.cpp @@ -1261,7 +1261,11 @@ std::map WorldDataQuery::GetEdgeWeights(const RoadGraph& { std::map weights; const auto& turningRates = worldData.GetTurningRates(); - for (auto [edge, edgesEnd] = edges(roadGraph); edge != edgesEnd; ++edge) + + RoadGraph::edge_iterator edge; + RoadGraph::edge_iterator edgesEnd; + + for (std::tie(edge, edgesEnd) = edges(roadGraph); edge != edgesEnd; ++edge) { auto turningRate = std::find_if(turningRates.cbegin(), turningRates.cend(), [&](const TurningRate& turningRate) -- GitLab From c67f6050959023326cced8fa952d6305b1d7c5d4 Mon Sep 17 00:00:00 2001 From: Weiss David Date: Tue, 9 Aug 2022 09:48:45 +0200 Subject: [PATCH 10/13] doc(Core): Inline doc for RoadObject --- .../roadInterface/roadObjectInterface.h | 76 ++++++++++++++++- .../roadInterface/roadSignalInterface.h | 4 +- .../opSimulation/importer/road/roadObject.h | 81 ++++--------------- 3 files changed, 90 insertions(+), 71 deletions(-) diff --git a/sim/include/roadInterface/roadObjectInterface.h b/sim/include/roadInterface/roadObjectInterface.h index ff792997..6cd83c38 100644 --- a/sim/include/roadInterface/roadObjectInterface.h +++ b/sim/include/roadInterface/roadObjectInterface.h @@ -1,5 +1,6 @@ /******************************************************************************** * Copyright (c) 2017-2021 in-tech GmbH + * 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -12,7 +13,7 @@ #include #include "roadElementTypes.h" -class RoadObjectInterface// : public RoadElementInterface +class RoadObjectInterface { public: RoadObjectInterface() = default; @@ -22,19 +23,90 @@ public: RoadObjectInterface& operator=(RoadObjectInterface&&) = delete; virtual ~RoadObjectInterface() = default; + //----------------------------------------------------------------------------- + //! @brief Returns the type of the road object + //! @return type + //----------------------------------------------------------------------------- virtual RoadObjectType GetType() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the unique identification string of the road object + //! @return id + //----------------------------------------------------------------------------- virtual std::string GetId() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the s coordinate of the road object + //! @return s coordinate [m] + //----------------------------------------------------------------------------- virtual double GetS() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the t coordinate of the road object + //! @return t coordinate [m] + //----------------------------------------------------------------------------- virtual double GetT() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the zOffset of the road object + //! @return zOffset [m] + //----------------------------------------------------------------------------- virtual double GetZOffset() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Check, if road object is valid for provided lane id + //! + //! @param[in] laneId lane id to test validity for + //! + //! @return True if valid, false otherwise. + //----------------------------------------------------------------------------- virtual bool IsValidForLane(int laneId) const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the length of the road object + //! @return length [m] + //----------------------------------------------------------------------------- virtual double GetLength() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the width of the road object + //! @return width [m] + //----------------------------------------------------------------------------- virtual double GetWidth() const = 0; - virtual double GetHdg() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the height of the road object + //! @return height [m] + //----------------------------------------------------------------------------- virtual double GetHeight() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the heading of the road object (relative to road direction) + //! @return heading [rad] + //----------------------------------------------------------------------------- + virtual double GetHdg() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the pitch of the road object + //! @return pitch [rad] + //----------------------------------------------------------------------------- virtual double GetPitch() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the roll of the road object + //! @return roll [rad] + //----------------------------------------------------------------------------- virtual double GetRoll() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns wether this is a continuous object (e.g. guard rail) + //----------------------------------------------------------------------------- virtual bool IsContinuous() const = 0; + + //----------------------------------------------------------------------------- + //! @brief Returns the name of the road object + //! @return name + //----------------------------------------------------------------------------- virtual std::string GetName() const = 0; }; diff --git a/sim/include/roadInterface/roadSignalInterface.h b/sim/include/roadInterface/roadSignalInterface.h index 10b1c204..50895161 100644 --- a/sim/include/roadInterface/roadSignalInterface.h +++ b/sim/include/roadInterface/roadSignalInterface.h @@ -1,5 +1,6 @@ /******************************************************************************** * Copyright (c) 2019-2020 in-tech GmbH + * 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -11,10 +12,9 @@ #include #include "roadElementTypes.h" -//#include "RoadElementInterface.h" //! Represents a RoadSignal in OpenDrive -class RoadSignalInterface// : public RoadElementInterface +class RoadSignalInterface { public: RoadSignalInterface() = default; diff --git a/sim/src/core/opSimulation/importer/road/roadObject.h b/sim/src/core/opSimulation/importer/road/roadObject.h index d04151a2..66210538 100644 --- a/sim/src/core/opSimulation/importer/road/roadObject.h +++ b/sim/src/core/opSimulation/importer/road/roadObject.h @@ -1,6 +1,7 @@ /******************************************************************************** * Copyright (c) 2017-2018 ITK Engineering GmbH * 2017-2021 in-tech GmbH + * 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at @@ -22,74 +23,20 @@ public: object{object} {} - //----------------------------------------------------------------------------- - //! @brief Returns the unique identification string of the road object - //! @return id - //----------------------------------------------------------------------------- - std::string GetId() const; - - //----------------------------------------------------------------------------- - //! @brief Returns the s coordinate of the road object - //! @return s coordinate [m] - //----------------------------------------------------------------------------- - double GetS() const; - - //----------------------------------------------------------------------------- - //! @brief Returns the t coordinate of the road object - //! @return t coordinate [m] - //----------------------------------------------------------------------------- - double GetT() const; - - //----------------------------------------------------------------------------- - //! @brief Returns the zOffset of the road object - //! @return zOffset [m] - //----------------------------------------------------------------------------- - double GetZOffset() const; - - //----------------------------------------------------------------------------- - //! @brief Returns the heading of the road object (relative to road direction) - //! @return heading [rad] - //----------------------------------------------------------------------------- - double GetHdg() const; - - virtual double GetHeight() const; - virtual double GetPitch() const; - virtual double GetRoll() const; - - //----------------------------------------------------------------------------- - //! @brief Check, if road object is valid for provided lane id - //! - //! @param[in] laneId lane id to test validity for - //! - //! @return True if valid, false otherwise. - //----------------------------------------------------------------------------- - bool IsValidForLane(int laneId) const; - - //----------------------------------------------------------------------------- - //! @brief Returns the type of the road object - //! @return type - //----------------------------------------------------------------------------- - RoadObjectType GetType() const; - - //----------------------------------------------------------------------------- - //! @brief Returns the length of the road object - //! @return length [m] - //----------------------------------------------------------------------------- - double GetLength() const; - - //----------------------------------------------------------------------------- - //! @brief Returns the width of the road object - //! @return width [m] - //----------------------------------------------------------------------------- - double GetWidth() const; - + std::string GetId() const override; + double GetS() const override; + double GetT() const override; + double GetZOffset() const override; + double GetHdg() const override; + double GetHeight() const override; + double GetPitch() const override; + double GetRoll() const override; + bool IsValidForLane(int laneId) const override; + RoadObjectType GetType() const override; + double GetLength() const override; + double GetWidth() const override; bool IsContinuous() const override; - - //----------------------------------------------------------------------------- - //! @brief Returns the name of the road object - //! @return name - //----------------------------------------------------------------------------- - std::string GetName() const; + std::string GetName() const override; private: RoadInterface* road; -- GitLab From 70f4f0c74afbb44fe54cfc380daf2e25271ecf1c Mon Sep 17 00:00:00 2001 From: Weiss David Date: Tue, 9 Aug 2022 16:07:13 +0200 Subject: [PATCH 11/13] doc(Core): Add doc and example configs for TurningRates --- .../user_guide/configs/simulationconfig.rst | 25 ++ .../TurningRates/ProfilesCatalog.xml | 235 ++++++++++++ .../Configurations/TurningRates/Scenario.xosc | 103 +++++ .../TurningRates/SceneryConfiguration.xodr | 356 ++++++++++++++++++ .../TurningRates/simulationConfig.xml | 89 +++++ sim/tests/endToEndTests/test_end_to_end.json | 1 + 6 files changed, 809 insertions(+) create mode 100644 sim/contrib/examples/Configurations/TurningRates/ProfilesCatalog.xml create mode 100644 sim/contrib/examples/Configurations/TurningRates/Scenario.xosc create mode 100644 sim/contrib/examples/Configurations/TurningRates/SceneryConfiguration.xodr create mode 100644 sim/contrib/examples/Configurations/TurningRates/simulationConfig.xml diff --git a/doc/source/user_guide/configs/simulationconfig.rst b/doc/source/user_guide/configs/simulationconfig.rst index 98bb178a..bef40d09 100644 --- a/doc/source/user_guide/configs/simulationconfig.rst +++ b/doc/source/user_guide/configs/simulationconfig.rst @@ -1,6 +1,7 @@ .. ******************************************************************************* Copyright (c) 2021 in-tech GmbH + 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at @@ -116,6 +117,7 @@ All probabilities need to add up to 1.0. Friction Friction on the road. Used by DynamicsRegularDriving and LimiterAccelerationVehicleComponents. 1+ entry Weather **Currently unused.** Weather as string 1+ entry TrafficRules Defines which set of TrafficRules to use from the ProfilesCatalog yes + TurningRates Defines the turning rates for random route generation no =================== ============================================================================================== ========= **Example** @@ -129,6 +131,29 @@ Every invocation has sunny weather. :language: xml :start-at: :end-at: + +**TurningRates** + +If routes are not defined in the Scenario, they are randomly generated. +Starting at the current agent position at each junction a random connector is chosen based on the weights given in the TurningRates element, until the route terminates at a road without successors or a maximum depth is reached. +If for a pair of incoming road / connector no weight is given, it is defaulted to 1. +At the below example an agent coming from road "R1" has a 1/3 chance of selecting "R1-2" and a 2/3 chance of selecting "R1-3". + +.. table:: + :class: tight-table + + =================== ============================== + Attribute Description + =================== ============================== + Incoming Id of the incoming road + Outgoing Id of the connector + Weight Weight for this pair + =================== ============================== + +.. literalinclude:: @OP_REL_SIM@/contrib/examples/Configurations/TurningRates/simulationConfig.xml + :language: xml + :start-at: + :end-at: .. _simulationconfig_observations: diff --git a/sim/contrib/examples/Configurations/TurningRates/ProfilesCatalog.xml b/sim/contrib/examples/Configurations/TurningRates/ProfilesCatalog.xml new file mode 100644 index 00000000..bc13d348 --- /dev/null +++ b/sim/contrib/examples/Configurations/TurningRates/ProfilesCatalog.xml @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sim/contrib/examples/Configurations/TurningRates/Scenario.xosc b/sim/contrib/examples/Configurations/TurningRates/Scenario.xosc new file mode 100644 index 00000000..adbd0f95 --- /dev/null +++ b/sim/contrib/examples/Configurations/TurningRates/Scenario.xosc @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sim/contrib/examples/Configurations/TurningRates/SceneryConfiguration.xodr b/sim/contrib/examples/Configurations/TurningRates/SceneryConfiguration.xodr new file mode 100644 index 00000000..ae89ed7d --- /dev/null +++ b/sim/contrib/examples/Configurations/TurningRates/SceneryConfiguration.xodr @@ -0,0 +1,356 @@ + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + +
+
+ + + + + + +
+ + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sim/contrib/examples/Configurations/TurningRates/simulationConfig.xml b/sim/contrib/examples/Configurations/TurningRates/simulationConfig.xml new file mode 100644 index 00000000..5b3a8066 --- /dev/null +++ b/sim/contrib/examples/Configurations/TurningRates/simulationConfig.xml @@ -0,0 +1,89 @@ + + ProfilesCatalog.xml + + 123 + 1 + 532725206 + + World_OSI + + + + Scenario.xosc + + + + + + + + + + + + + + + + + + Germany + + + + + + + + + + + + Observation_Log + + + + + + + + + + + + + + Observation_EntityRepository + + + + + + + + + + + SpawnerScenario + PreRun + 1 + + + SpawnerPreRunCommon + PreRun + 0 + DefaultPreRunCommon + + + SpawnerRuntimeCommon + Runtime + 0 + DefaultRuntimeCommon + + + diff --git a/sim/tests/endToEndTests/test_end_to_end.json b/sim/tests/endToEndTests/test_end_to_end.json index 74b5fe05..1990d1ac 100644 --- a/sim/tests/endToEndTests/test_end_to_end.json +++ b/sim/tests/endToEndTests/test_end_to_end.json @@ -29,6 +29,7 @@ "Sensor_Latency", "StaticAgentCollision", "SupplementaryTrafficSigns", + "TurningRates", "TrafficJam", "TrafficLight" ], -- GitLab From 1dde415464feea60d21bda7a2bb7973c2aee37ef Mon Sep 17 00:00:00 2001 From: Reinhard Biegel Date: Fri, 23 Sep 2022 08:59:27 +0200 Subject: [PATCH 12/13] Reduce no. of concurrent make jobs There seems to be an OOM situation on the CI. This commit reduces the no. of concurrent make jobs to nproc/2. --- utils/ci/scripts/30_build.sh | 2 +- utils/ci/scripts/50_test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/ci/scripts/30_build.sh b/utils/ci/scripts/30_build.sh index 8a8acb36..f0c39db1 100755 --- a/utils/ci/scripts/30_build.sh +++ b/utils/ci/scripts/30_build.sh @@ -19,7 +19,7 @@ cd "$MYDIR/../../../../build" || exit 1 if hash nproc 2>/dev/null; then # calculation is kept for reference - MAKE_JOB_COUNT=$(($(nproc)/1)) + MAKE_JOB_COUNT=$(($(nproc)/2)) else # fallback, if nproc doesn't exist MAKE_JOB_COUNT=2 diff --git a/utils/ci/scripts/50_test.sh b/utils/ci/scripts/50_test.sh index 46cb12ab..2616f3a8 100755 --- a/utils/ci/scripts/50_test.sh +++ b/utils/ci/scripts/50_test.sh @@ -31,5 +31,5 @@ fi export MAKEFLAGS=-j${MAKE_JOB_COUNT} -ctest -j2 --output-on-failure +ctest -j1 --output-on-failure -- GitLab From e2558e25f36e9d346f103a5a564a25d480db508b Mon Sep 17 00:00:00 2001 From: Reinhard Biegel Date: Wed, 28 Sep 2022 20:48:37 +0200 Subject: [PATCH 13/13] Further reduction of concurrent make jobs due to OOM --- utils/ci/scripts/30_build.sh | 4 ++-- utils/ci/scripts/50_test.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/ci/scripts/30_build.sh b/utils/ci/scripts/30_build.sh index f0c39db1..ea2dbd3e 100755 --- a/utils/ci/scripts/30_build.sh +++ b/utils/ci/scripts/30_build.sh @@ -19,10 +19,10 @@ cd "$MYDIR/../../../../build" || exit 1 if hash nproc 2>/dev/null; then # calculation is kept for reference - MAKE_JOB_COUNT=$(($(nproc)/2)) + MAKE_JOB_COUNT=$(($(nproc)/4)) else # fallback, if nproc doesn't exist - MAKE_JOB_COUNT=2 + MAKE_JOB_COUNT=1 fi make -j$MAKE_JOB_COUNT install diff --git a/utils/ci/scripts/50_test.sh b/utils/ci/scripts/50_test.sh index 2616f3a8..9f3d45ba 100755 --- a/utils/ci/scripts/50_test.sh +++ b/utils/ci/scripts/50_test.sh @@ -18,10 +18,10 @@ MYDIR="$(dirname "$(readlink -f $0)")" cd "$MYDIR/../../../../build" || exit 1 if hash nproc 2>/dev/null; then - MAKE_JOB_COUNT=$(($(nproc)/2)) + MAKE_JOB_COUNT=$(($(nproc)/4)) else # fallback, if nproc doesn't exist - MAKE_JOB_COUNT=2 + MAKE_JOB_COUNT=1 fi if [[ $MAKE_JOB_COUNT -eq 0 ]]; then -- GitLab