@@ -36,48 +36,52 @@ jobs:
3636
3737 env :
3838 CATKIN_LINT : true
39+ CLANG_TIDY_ARGS : --fix --fix-errors --format-style=file
40+ DOCKER_IMAGE : moveit/moveit:${{ matrix.env.IMAGE }}
3941 UNDERLAY : /root/ws_moveit/install
4042 DOWNSTREAM_WORKSPACE : " github:ubi-agni/mtc_demos#master github:TAMS-Group/mtc_pour#master"
4143 CCACHE_DIR : ${{ github.workspace }}/.ccache
42- BASEDIR : /home/runner/work
43- DOCKER_IMAGE : moveit/moveit:${{ matrix.env.IMAGE }}
44+ BASEDIR : ${{ github.workspace }}/.work
4445 CACHE_PREFIX : " ${{ matrix.env.IMAGE }}${{ contains(matrix.env.TARGET_CMAKE_ARGS, '--coverage') && '-ccov' || '' }}"
4546 # perform full clang-tidy check only on manual trigger (workflow_dispatch), PRs do check changed files, otherwise nothing
4647 CLANG_TIDY_BASE_REF : ${{ github.event_name != 'workflow_dispatch' && (github.base_ref || github.ref) || '' }}
48+ CC : ${{ matrix.env.CLANG_TIDY && 'clang' }}
49+ CXX : ${{ matrix.env.CLANG_TIDY && 'clang++' }}
4750
4851 name : " ${{ matrix.env.IMAGE }}${{ matrix.env.NAME && ' • ' || ''}}${{ matrix.env.NAME }}${{ matrix.env.CATKIN_LINT && ' • catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' • clang-tidy' || '' }}"
4952 runs-on : ubuntu-latest
5053 steps :
5154 - uses : actions/checkout@v2
5255
5356 - name : Cache ccache
54- 57+ 5558 with :
5659 path : ${{ env.CCACHE_DIR }}
5760 key : ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
5861 restore-keys : |
5962 ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
6063 ccache-${{ env.CACHE_PREFIX }}
6164
62- - name : industrial_ci
65+ - id : ici
66+ name : Run industrial_ci
6367 uses : ros-industrial/industrial_ci@master
64- env : ${{ matrix.env || env }}
68+ env : ${{ matrix.env }}
6569
6670 - name : Upload test artifacts (on failure)
6771 uses : actions/upload-artifact@v2
68- if : failure()
72+ if : failure() && (steps.ici.outputs.run_target_test || steps.ici.outputs.target_test_results)
6973 with :
70- name : test-results
74+ name : test-results-${{ matrix.env.IMAGE }}
7175 path : ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
72- - name : Collect coverage information
73- uses : rhaschke/lcov-action@master
74- if : ${{ contains(matrix.env.TARGET_CMAKE_ARGS, '--coverage') }}
76+ - name : Generate codecov report
77+ uses : rhaschke/lcov-action@main
78+ if : contains(matrix.env.TARGET_CMAKE_ARGS, '--coverage') && steps.ici.outputs.target_test_results == '0'
7579 with :
76- workdir : ${{ env.BASEDIR }}
77- dir : target_ws
78- ignore : ' "/usr/*" "/opt/*" "/root/ws_moveit/*" " */target_ws/build/*" "*/target_ws/install/*" "*/test/*"'
80+ docker : $DOCKER_IMAGE
81+ workdir : ${{ env.BASEDIR }}/ target_ws
82+ ignore : ' "*/target_ws/build/*" "*/target_ws/install/*" "*/test/*"'
7983 - name : Upload codecov report
80- uses : codecov/codecov-action@v1
81- if : ${{ contains(matrix.env.TARGET_CMAKE_ARGS, '--coverage') }}
84+ uses : codecov/codecov-action@v2
85+ if : contains(matrix.env.TARGET_CMAKE_ARGS, '--coverage') && steps.ici.outputs.target_test_results == '0'
8286 with :
83- files : ${{ env.BASEDIR }}/coverage.info
87+ files : ${{ env.BASEDIR }}/target_ws/ coverage.info
0 commit comments