Skip to content

Commit

Permalink
PR #12864: Merge v2.55.1 to master
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel authored Apr 21, 2024
2 parents 4673a37 + 488c6ec commit ff8a9fb
Show file tree
Hide file tree
Showing 1,069 changed files with 102,192 additions and 198,528 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/build-ROS2-package-CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,23 @@ jobs:

build_lrs_ros2_package:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
ros_distribution:
- foxy
- galactic
- humble
- iron
- rolling

include:
# Foxy Fitzroy
- docker_image: ubuntu:focal
ros_distribution: foxy

# Galactic Geochelone
- docker_image: ubuntu:focal
ros_distribution: galactic

# Humble Hawksbill
- docker_image: ubuntu:jammy
ros_distribution: humble

# Iron Irwini
- docker_image: ubuntu:jammy
ros_distribution: iron

# Rolling Ridley
- docker_image: ubuntu:jammy
ros_distribution: rolling
Expand All @@ -42,12 +38,12 @@ jobs:
steps:

- name: setup ROS environment
uses: ros-tooling/setup-ros@v0.4
uses: ros-tooling/setup-ros@v0.7
with:
required-ros-distributions: ${{ matrix.ros_distribution }}

- name: build librealsense ROS 2
uses: ros-tooling/action-ros-ci@v0.2
uses: ros-tooling/action-ros-ci@v0.3
with:
target-ros2-distro: ${{ matrix.ros_distribution }}
skip-tests: true
Expand Down
111 changes: 83 additions & 28 deletions .github/workflows/buildsCI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,50 @@ jobs:
shell: bash
run: |
cd ${{env.WIN_BUILD_DIR}}
cmake --build . --config ${{env.LRS_RUN_CONFIG}} -- -m
cmake --build . --config ${{env.LRS_RUN_CONFIG}} -- -m
#--------------------------------------------------------------------------------
Win_SH_EX_No_Logs: # Windows, shared, with Examples & Tools, no EasyLogging and no Check for Updates
runs-on: windows-2019
timeout-minutes: 60
steps:
- uses: actions/checkout@v3

- name: Enable Long Paths
shell: powershell
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
- name: Check_API
shell: bash
run: |
cd scripts
./api_check.sh
cd ..
- name: PreBuild
shell: bash
run: |
mkdir ${{env.WIN_BUILD_DIR}}
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
shell: bash
run: |
LRS_SRC_DIR=$(pwd)
cd ${{env.WIN_BUILD_DIR}}
pwd
ls
cmake ${LRS_SRC_DIR} -G "Visual Studio 16 2019" -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=true -DBUILD_TOOLS=true -DCHECK_FOR_UPDATES=false -DBUILD_EASYLOGGINGPP=false
- name: Build
# Build your program with the given configuration
shell: bash
run: |
cd ${{env.WIN_BUILD_DIR}}
cmake --build . --config ${{env.LRS_RUN_CONFIG}} -- -m
#--------------------------------------------------------------------------------
Win_ST_Py_CI: # Windows, Static, Python, Tools, libCI with executables
runs-on: windows-2019
Expand All @@ -91,15 +132,16 @@ jobs:
shell: bash
run: |
mkdir ${{env.WIN_BUILD_DIR}}
python3 -m pip install numpy
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
shell: bash
run: |
LRS_SRC_DIR=$(pwd)
LRS_SRC_DIR=$(pwd)
cd ${{env.WIN_BUILD_DIR}}
cmake ${LRS_SRC_DIR} -G "Visual Studio 16 2019" -DBUILD_SHARED_LIBS=false -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=true -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=false -DPYTHON_EXECUTABLE=${{env.PYTHON_PATH}} -DBUILD_PYTHON_BINDINGS=true
cmake ${LRS_SRC_DIR} -G "Visual Studio 16 2019" -DBUILD_SHARED_LIBS=false -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=true -DUNIT_TESTS_ARGS="--not-live --context=windows" -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=false -DPYTHON_EXECUTABLE=${{env.PYTHON_PATH}} -DBUILD_PYTHON_BINDINGS=true
- name: Build
# Build your program with the given configuration
Expand All @@ -114,6 +156,15 @@ jobs:
run: |
python3 unit-tests/run-unit-tests.py --no-color --debug --stdout --not-live --context "windows" ${{env.WIN_BUILD_DIR}}/Release
- name: Client for realsense2-all
shell: bash
run: |
mkdir ${{env.WIN_BUILD_DIR}}/rs-all-client
cd ${{env.WIN_BUILD_DIR}}/rs-all-client
cmake $GITHUB_WORKSPACE/.github/workflows/rs-all-client -G "Visual Studio 16 2019"
cmake --build . --config Release -- -m
./Release/rs-all-client
#--------------------------------------------------------------------------------
Win_SH_Py_DDS_CI: # Windows, Shared, Python, Tools, DDS, libCI without executables
Expand All @@ -129,7 +180,7 @@ jobs:
shell: powershell
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
- name: Check_API
shell: bash
run: |
Expand All @@ -140,7 +191,8 @@ jobs:
- name: PreBuild
shell: bash
run: |
mkdir ${{env.WIN_BUILD_DIR}}
mkdir ${{env.WIN_BUILD_DIR}}
python3 -m pip install numpy
- name: Configure CMake
shell: bash
Expand Down Expand Up @@ -208,8 +260,8 @@ jobs:
#--------------------------------------------------------------------------------
U20_ST_Py_EX_CfU_LiveTest: # Ubuntu 2020, Static, Python, Examples & Tools, Check for Updates, Legacy Live-Tests
runs-on: ubuntu-20.04
U22_ST_Py_EX_CfU_LiveTest: # Ubuntu 2022, Static, Python, Examples & Tools, Check for Updates, Legacy Live-Tests
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
Expand All @@ -220,15 +272,11 @@ jobs:
cd scripts && ./api_check.sh && cd ..
mkdir build && cd build
export LRS_LOG_LEVEL="DEBUG";
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
sudo apt-get install -qq libusb-1.0-0-dev;
sudo apt-get install -qq libgtk-3-dev;
sudo apt-get install libglfw3-dev libglfw3;
# We force compiling with GCC 7 because the default installed GCC 9 compiled with LTO and gives an internal compiler error
sudo apt-get install gcc-7 g++-7;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7;
- name: Build
shell: bash
Expand All @@ -251,7 +299,7 @@ jobs:
- name: Upload RS log artifact
uses: actions/upload-artifact@v3
with:
name: Log file - U20_ST_Py_EX_CfU_LiveTest
name: Log file - U22_ST_Py_EX_CfU_LiveTest
path: build/*.log

- name: Provide correct exit status for job
Expand All @@ -275,7 +323,6 @@ jobs:
- name: Prebuild
shell: bash
run: |
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
sudo apt-get install -qq libusb-1.0-0-dev;
Expand All @@ -284,6 +331,7 @@ jobs:
# We force compiling with GCC 7 because the default installed GCC 9 compiled with LTO and gives an internal compiler error
sudo apt-get install gcc-7 g++-7;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7;
python3 -m pip install numpy
- name: Check_API
shell: bash
Expand All @@ -298,7 +346,7 @@ jobs:
shell: bash
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{env.LRS_RUN_CONFIG}} -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=true -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=false -DBUILD_PYTHON_BINDINGS=true -DPYTHON_EXECUTABLE=$(which python3)
cmake .. -DCMAKE_BUILD_TYPE=${{env.LRS_RUN_CONFIG}} -DBUILD_SHARED_LIBS=true -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=true -DUNIT_TESTS_ARGS="--not-live --context=linux" -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=false -DBUILD_PYTHON_BINDINGS=true -DPYTHON_EXECUTABLE=$(which python3)
cmake --build . -- -j4
- name: LibCI
Expand All @@ -309,7 +357,7 @@ jobs:
#--------------------------------------------------------------------------------
U20_ST_Py_DDS_CI: # Ubuntu 2020, Static, Python, DDS, LibCI without executables
U20_ST_Py_DDS_RSUSB_CI: # Ubuntu 2020, Static, Python, DDS, RSUSB, LibCI without executables
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
Expand All @@ -318,7 +366,6 @@ jobs:
- name: Prebuild
shell: bash
run: |
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
sudo apt-get install -qq libusb-1.0-0-dev;
Expand All @@ -327,6 +374,7 @@ jobs:
# We force compiling with GCC 7 because the default installed GCC 9 compiled with LTO and gives an internal compiler error
sudo apt-get install gcc-7 g++-7;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7;
python3 -m pip install numpy
- name: Check_API
shell: bash
Expand All @@ -338,28 +386,40 @@ jobs:
mkdir build
- name: Build
# Note: we force RSUSB because, on Linux, the context creation will fail on GHA:
# (backend-v4l2.cpp:555) Cannot access /sys/class/video4linux)
# And, well, we don't need any specific platform for DDS!
shell: bash
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{env.LRS_RUN_CONFIG}} -DBUILD_SHARED_LIBS=false -DBUILD_EXAMPLES=false -DBUILD_TOOLS=true -DBUILD_UNIT_TESTS=false -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=true -DBUILD_PYTHON_BINDINGS=true -DPYTHON_EXECUTABLE=$(which python3)
cmake --build . -- -j4
cmake .. -DCMAKE_BUILD_TYPE=${{env.LRS_RUN_CONFIG}} -DBUILD_SHARED_LIBS=false -DBUILD_EXAMPLES=false -DBUILD_TOOLS=false -DBUILD_UNIT_TESTS=false -DCHECK_FOR_UPDATES=false -DBUILD_WITH_DDS=true -DBUILD_PYTHON_BINDINGS=true -DPYTHON_EXECUTABLE=$(which python3) -DFORCE_RSUSB_BACKEND=true
cmake --build . -- -j4
- name: Client for realsense2-all
shell: bash
run: |
mkdir build/rs-all-client
cd build/rs-all-client
cmake ../../.github/workflows/rs-all-client -DBUILD_WITH_DDS=ON -DFORCE_RSUSB_BACKEND=ON
cmake --build . -- -j4
./rs-all-client
- name: LibCI
# Note: we specifically disable BUILD_UNIT_TESTS so the executable C++ unit-tests won't run
# This is to save time as DDS already lengthens the build...
shell: bash
run: |
python3 unit-tests/run-unit-tests.py --no-color --debug --stdout --not-live --context "dds linux"
python3 unit-tests/run-unit-tests.py --no-color --debug --stdout --not-live --context "dds linux" --tag dds

#--------------------------------------------------------------------------------
U20_SH_RSUSB_LiveTest: # Ubuntu 2020, Shared, Legacy live-tests
runs-on: ubuntu-20.04
U22_SH_RSUSB_LiveTest: # Ubuntu 2022, Shared, Legacy live-tests
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
LRS_BUILD_NODEJS: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Check_API
shell: bash
Expand All @@ -374,15 +434,11 @@ jobs:
set -x
mkdir build
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
sudo apt-get install -qq libusb-1.0-0-dev;
sudo apt-get install -qq libgtk-3-dev;
sudo apt-get install libglfw3-dev libglfw3;
# We force compiling with GCC 7 because the default installed GCC 9 compiled with LTO and gives an internal compiler error
sudo apt-get install gcc-7 g++-7;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7;
- name: Build
shell: bash
Expand All @@ -405,7 +461,7 @@ jobs:
- name: Upload RS log artifact
uses: actions/upload-artifact@v3
with:
name: Log file - U20_SH_RSUSB_LiveTest
name: Log file - U22_SH_RSUSB_LiveTest
path: build/*.log

- name: Provide correct exit status for job
Expand Down Expand Up @@ -473,7 +529,6 @@ jobs:
mkdir build
wget https://dl.google.com/android/repository/android-ndk-r20b-linux-x86_64.zip;
unzip -q android-ndk-r20b-linux-x86_64.zip -d ./;
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
sudo apt-get update;
sudo apt-get install -qq build-essential xorg-dev libgl1-mesa-dev libglu1-mesa-dev libglew-dev libglm-dev;
sudo apt-get install -qq libusb-1.0-0-dev;
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/cppcheck-parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__( self, message, line=None ):
global line_number, logfile
if line is None:
line = line_number
super().__init__( f'{logile}+{line}: {message}' )
super().__init__( f'{logfile}+{line}: {message}' )


handle = open( logfile, "r" )
Expand All @@ -54,32 +54,34 @@ def nextline():
if not line.startswith( '<error ' ):
raise LineError( 'unexpected line' )

#print( f'-D-{line_number}- {line}' )
e = dict( re.findall( '(\w+)="(.*?)"', line ) )
severity = e['severity'][0].capitalize()
id = e['id']
cwe = e.get('cwe') or '-'
file0 = e['file0']
cwe = e.get( 'cwe', '-' )
file0 = e.get( 'file0', '' )
msg = e['msg'].replace( '&apos;', "'" )

line = nextline()
printed = False
while( line.startswith( '<location ' )):
l = dict( re.findall( '(\w+)="(.*?)"', line ) )
file = l['file']
line = l['line']
column = l['column']
info = l.get('info') or ''
info = l.get( 'info', '' )
if severity in severities:
if 'l' in severities:
if file0:
if not printed:
print( f'{severity} {id:30} {file0:50} {msg}' )
print( f'| {"-":30} {file+"+"+line+"."+column:50} {info}' )
elif file0:
elif not printed:
print( f'{severity} {id:30} {file+"+"+line:50} {msg}' )
file0 = None
printed = True
line = nextline()
if file0: # no locations!?
if not printed: # no locations!?
if severity in severities:
print( f'{severity} {id:30} {file0:50} {msg}' )
print( f'{severity} {id:30} {file0 or file:50} {msg}' )

if line != '</error>':
raise LineError( 'unknown error line' )
Expand Down
Loading

0 comments on commit ff8a9fb

Please sign in to comment.