@@ -11,33 +11,52 @@ jobs:
1111 matrix :
1212 env :
1313 - {
14- ROS_DISTRO : foxy, ROS_REPO: main, CCOV_UPLOAD: true,
14+ ROS_DISTRO : foxy,
15+ ROS_REPO : main,
16+ CCOV_UPLOAD : true,
1517 CMAKE_ARGS : " -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage' -DCMAKE_CXX_FLAGS='--coverage'" ,
1618 AFTER_RUN_TARGET_TEST : ' ./.ci.prepare_codecov' ,
17- ADDITIONAL_DEBS : ' curl lcov grep'
19+ ADDITIONAL_DEBS : ' lcov'
20+ }
21+ - {
22+ ROS_DISTRO : foxy,
23+ ROS_REPO : testing,
24+ CCOV_UPLOAD : false
1825 }
19- - {ROS_DISTRO: foxy, ROS_REPO: testing, CCOV_UPLOAD: false}
2026 env :
21- UPSTREAM_WORKSPACE : warehouse_ros_mongo.repos
22- CCACHE_DIR : /home/runner/.ccache
23- BASEDIR : .base
27+ UPSTREAM_WORKSPACE : upstream.repos
28+ AFTER_SETUP_UPSTREAM_WORKSPACE : ' vcs pull $BASEDIR/upstream_ws/src'
29+ CCACHE_DIR : " ${{ github.workspace }}/.ccache"
30+ BASEDIR : ${{ github.workspace }}/.work
31+ CACHE_PREFIX : " ${{ matrix.ROS_DISTRO }}-${{ matrix.ROS_REPO }}${{ matrix.CCOV_UPLOAD && '-ccov' || '' }}"
2432 runs-on : ubuntu-latest
2533 steps :
2634 - uses : actions/checkout@v2
27- - uses : actions/cache@v2
35+ - name : cache upstream_ws
36+ uses : pat-s/always-upload-cache@v2.1.3
37+ with :
38+ path : ${{ env.BASEDIR }}/upstream_ws
39+ key : upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('upstream.repos') }}-${{ github.run_id }}
40+ restore-keys : |
41+ upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('upstream.repos') }}
42+ - name : cache ccache
43+ uses : pat-s/always-upload-cache@v2.1.3
2844 with :
2945 path : ${{ env.CCACHE_DIR }}
30- key : ccache-${{ matrix. env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}-${{ github.sha }}
46+ key : ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
3147 restore-keys : |
32- ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
33- - uses : ' ros-industrial/industrial_ci@master'
48+ ccache-${{ env.CACHE_PREFIX }}
49+ - name : industrial_ci
50+ uses : ' ros-industrial/industrial_ci@master'
3451 env : ${{ matrix.env }}
35- - uses : actions/upload-artifact@v2
52+ - name : upload test artifacts (on failure)
53+ uses : actions/upload-artifact@v2
3654 if : failure()
3755 with :
3856 name : test-results
3957 path : ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
40- - uses : codecov/codecov-action@v1
58+ - name : upload codecov report
59+ uses : codecov/codecov-action@v1
4160 if : ${{ matrix.env.CCOV_UPLOAD }}
4261 with :
4362 files : ${{ env.BASEDIR }}/coverage.info
0 commit comments