88 pull_request :
99 push :
1010
11+ permissions :
12+ contents : read # to fetch code (actions/checkout)
13+
1114jobs :
1215 default :
1316 strategy :
@@ -26,38 +29,42 @@ jobs:
2629 name : ${{ matrix.env.IMAGE }}${{ matrix.env.CATKIN_LINT && ' + catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' + clang-tidy' || '' }}
2730 runs-on : ubuntu-latest
2831 steps :
29- - uses : actions/checkout@v2
32+ - uses : actions/checkout@v3
3033 # The target directory cache doesn't include the source directory because
3134 # that comes from the checkout. See "prepare target_ws for cache" task below
32- - name : cache target_ws
33- 35+ - name : Cache target workspace
36+ if : " !matrix.env.CCOV"
37+ uses : rhaschke/cache@main
3438 with :
3539 path : ${{ env.BASEDIR }}/target_ws
3640 key : ${{ env.CACHE_PREFIX }}-${{ github.run_id }}
3741 restore-keys : ${{ env.CACHE_PREFIX }}
3842 env :
43+ GHA_CACHE_SAVE : always
3944 CACHE_PREFIX : target_ws-${{ matrix.env.IMAGE }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}
40- - name : cache ccache
41- uses : pat-s/always-upload- cache@v2.1.5
45+ - name : Cache ccache
46+ uses : rhaschke/ cache@main
4247 with :
4348 path : ${{ env.CCACHE_DIR }}
4449 key : ${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
4550 restore-keys : |
4651 ${{ env.CACHE_PREFIX }}-${{ github.sha }}
4752 ${{ env.CACHE_PREFIX }}
4853 env :
54+ GHA_CACHE_SAVE : always
4955 CACHE_PREFIX : ccache-${{ matrix.env.IMAGE }}
5056
51- - name : industrial_ci
57+ - name : Run industrial_ci
5258 uses : ros-industrial/industrial_ci@master
59+ env : ${{ matrix.env }}
5360
54- - name : upload test artifacts (on failure)
55- uses : actions/upload-artifact@v2
56- if : failure()
61+ - name : Upload test artifacts (on failure)
62+ uses : actions/upload-artifact@v3
63+ if : failure() && (steps.ici.outputs.run_target_test || steps.ici.outputs.target_test_results)
5764 with :
58- name : test-results
65+ name : test-results-${{ matrix.env.IMAGE }}
5966 path : ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
60- - name : prepare target_ws for cache
67+ - name : Prepare target_ws for cache
6168 if : ${{ always() }}
6269 run : |
6370 du -sh ${{ env.BASEDIR }}/target_ws
0 commit comments