Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: introduce Facebook Infer job #245

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 82 additions & 1 deletion .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1

- name: Build
id: build
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
Expand All @@ -39,7 +40,7 @@

- name: Test
id: test
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
if: ${{ steps.build.outcome == 'success' }}
uses: autowarefoundation/autoware-github-actions/colcon-test@v1
with:
rosdistro: ${{ matrix.rosdistro }}
Expand All @@ -55,3 +56,83 @@
fail_ci_if_error: false
verbose: true
flags: differential

fb-infer-differential:
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
include:
- rosdistro: humble
container: ros:humble
build-depends-repos: build_depends.repos
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Remove exec_depend
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1

- name: Get modified packages
id: get-modified-packages
uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1

- name: Install Clang-15
run: |
sudo apt-get -yqq update
sudo apt-get -yqq install --install-recommends clang-15 clang-tidy-15 clangd-15
sudo apt-get -yqq install clang-15-doc wasi-libc llvm-15-doc

Check warning on line 89 in .github/workflows/build-and-test-differential.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (wasi)
sudo apt-get -yqq install libomp-15-dev libomp-15-doc # For OpenMP support in Clang
sudo apt-get -yqq install libstdc++-12-dev
echo "CC=/usr/bin/clang-15" >> $GITHUB_ENV
echo "CXX=/usr/bin/clang++-15" >> $GITHUB_ENV


- name: Install FB Infer
id: fb-infer-install
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
env:
VERSION: 1.2.0
run: |
export BASENAME="infer-linux-x86_64-v${VERSION}"
export FILENAME="${BASENAME}.tar.xz"
sudo apt-get -yqq install curl tar
curl -sSLO "https://github.com/facebook/infer/releases/download/v${VERSION}/${FILENAME}"
tar -xf "$FILENAME"
rm "$FILENAME"
sudo mv "$BASENAME" /usr/local/infer
echo "PATH=/usr/local/infer/bin:$PATH" >> $GITHUB_ENV

- name: Build
id: build
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: ${{ matrix.build-depends-repos }}

- name: Debug log
run: |
pwd
ls -R

- name: Run FB Infer
id: fb-infer-run
if: ${{ steps.build.outcome == 'success' }}
run: |
infer run --compilation-database build/compile_commands.json

- name: Upload FB Infer Report
id: fb-infer-upload
if: ${{ steps.fb-infer-run.outcome == 'success' }}
uses: actions/upload-artifact@v4
with:
name: infer-report-diff-${{ github.sha }}
path: infer-out/report.*
if-no-files-found: error
2 changes: 2 additions & 0 deletions nebula_ros/src/hesai/hesai_ros_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <nebula_common/hesai/hesai_common.hpp>
#include <nebula_common/nebula_common.hpp>
#include <nebula_decoders/nebula_decoders_common/angles.hpp>
#include <rclcpp/logging.hpp>

#include <cstdint>
#include <filesystem>
Expand Down Expand Up @@ -268,6 +269,7 @@
decoder_wrapper_->on_config_change(new_config);
}

RCLCPP_DEBUG(get_logger(), "hi");

Check warning on line 272 in nebula_ros/src/hesai/hesai_ros_wrapper.cpp

View check run for this annotation

Codecov / codecov/patch

nebula_ros/src/hesai/hesai_ros_wrapper.cpp#L272

Added line #L272 was not covered by tests
sensor_cfg_ptr_ = new_config;
return Status::OK;
}
Expand Down
Loading