Skip to content

Commit

Permalink
clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerjw committed Mar 24, 2021
1 parent 3ffd736 commit 8e886fd
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 12 deletions.
58 changes: 46 additions & 12 deletions .github/workflows/industrial_ci_action.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,67 @@
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)

# ros2 run industrial_ci rerun_ci ~/code/moveit2/ws_moveit2/src/moveit_calibration \
# DOCKER_IMAGE='moveit/moveit:melodic-source' \
# UPSTREAM_WORKSPACE='upstream.rosinstall' \
# BEFORE_INSTALL_UPSTREAM_DEPENDENCIES_EMBED='set +u && source /root/ws_moveit/install/setup.bash && set -u' \
# UNDERLAY='/root/ws_moveit' \
# TARGET_CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=1" \
# CCACHE_DIR=".ccache" \
# CLANG_TIDY=true \
# CLANG_TIDY_BASE_REF=master

name: BuildAndTest

on: [push, pull_request]
on:
workflow_dispatch:
pull_request:
push:
branches:
- master

jobs:
industrial_ci:
env:
DOCKER_IMAGE: 'moveit/moveit:melodic-source'
UPSTREAM_WORKSPACE: 'upstream.rosinstall'
AFTER_RUN_TARGET_TEST: './.ci.prepare_codecov'
TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage' -DCMAKE_CXX_FLAGS='--coverage'"
TARGET_CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage' -DCMAKE_CXX_FLAGS='--coverage' -DCMAKE_EXPORT_COMPILE_COMMANDS=1"
ADDITIONAL_DEBS: 'lcov'
CCACHE_DIR: "${{ github.workspace }}/.ccache"
BASEDIR: ${{ github.workspace }}/.work
UNDERLAY: /root/ws_moveit
CLANG_TIDY: true
CLANG_TIDY_BASE_REF: 'master'

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cache ccache
uses: actions/cache@v2
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ github.sha }}
restore-keys: |
ccache-
- name: cache upstream_ws
uses: pat-s/always-upload-cache@v2.1.3
with:
path: ${{ env.BASEDIR }}/upstream_ws
key: upstream_ws-${{ hashFiles('upstream.rosinstall') }}-${{ github.run_id }}
key: upstream_ws-${{ hashFiles('upstream.repos') }}-${{ github.run_id }}
restore-keys: |
upstream_ws-${{ hashFiles('upstream.repos') }}
- name: cache target_ws
if: ${{ ! env.CCOV }}
uses: pat-s/always-upload-cache@v2.1.3
with:
path: ${{ env.BASEDIR }}/target_ws
key: target_ws-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }}
restore-keys: |
target_ws-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}
- name: cache ccache
uses: pat-s/always-upload-cache@v2.1.3
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ github.sha }}-${{ github.run_id }}
restore-keys: |
upstream_ws-${{ hashFiles('upstream.rosinstall') }}
ccache-${{ github.sha }}
ccache
- name: industrial_ci
uses: 'ros-industrial/industrial_ci@master'
uses: 'tylerjw/industrial_ci@clang-tidy-modified-filter'
- name: upload test artifacts (on failure)
uses: actions/upload-artifact@v2
if: failure()
Expand All @@ -44,5 +70,13 @@ jobs:
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
- name: upload codecov report
uses: codecov/codecov-action@v1
if: ${{ env.CCOV }}
with:
files: ${{ env.BASEDIR }}/coverage.info
- name: prepare target_ws for cache
if: ${{ always() && ! env.CCOV }}
run: |
du -sh ${{ env.BASEDIR }}/target_ws
sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src
du -sh ${{ env.BASEDIR }}/target_ws
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
namespace moveit_handeye_calibration
{
const std::string LOGNAME = "handeye_solver_default";
const std::string EXTRA_WORDS = "handeye_solver_default";

void HandEyeSolverDefault::initialize()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ bool HandEyeCharucoTarget::initialize()
std::string dictionary_id;
double board_size_meters;
double marker_size_meters;
double not_used;

target_params_ready_ =
getParameter("squares, X", squares_x) && getParameter("squares, Y", squares_y) &&
Expand Down

0 comments on commit 8e886fd

Please sign in to comment.