Skip to content

Commit b6172b8

Browse files
committed
test latest changes
1 parent ed1f4f6 commit b6172b8

File tree

2 files changed

+33
-13
lines changed

2 files changed

+33
-13
lines changed

.ci.prepare_codecov

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ pushd $BASEDIR
44
BLUE='\033[0;34m'
55
NOCOLOR='\033[0m'
66

7+
apt-get -qq install lcov
8+
79
echo -e "${BLUE}Capture coverage info${NOCOLOR}"
810
lcov --capture --directory target_ws --output-file coverage.info
911

.github/workflows/industrial_ci_action.yml

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,25 @@ jobs:
1111
matrix:
1212
env:
1313
- {
14-
ROS_DISTRO: foxy,
15-
ROS_REPO: main,
16-
CCOV_UPLOAD: true,
17-
CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage' -DCMAKE_CXX_FLAGS='--coverage'",
18-
AFTER_RUN_TARGET_TEST: './.ci.prepare_codecov',
19-
ADDITIONAL_DEBS: 'lcov'
20-
}
14+
IMAGE: 'foxy-ci',
15+
CCOV: true,
16+
AFTER_RUN_TARGET_TEST: './.ci.prepare_codecov'
17+
}
2118
- {
22-
ROS_DISTRO: foxy,
23-
ROS_REPO: testing,
24-
CCOV_UPLOAD: false
19+
IMAGE: 'foxy-ci-testing',
2520
}
2621
env:
22+
DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }}
2723
UPSTREAM_WORKSPACE: upstream.repos
24+
CCOV: ${{ matrix.env.CCOV }}
2825
AFTER_SETUP_UPSTREAM_WORKSPACE: 'vcs pull $BASEDIR/upstream_ws/src'
26+
TARGET_CMAKE_ARGS: >
27+
-DCMAKE_BUILD_TYPE=${{ matrix.env.CCOV && 'Debug' || 'Release'}}
28+
${{ matrix.env.CCOV && '-DCMAKE_CXX_FLAGS="--coverage" --no-warn-unused-cli' || '' }}
2929
CCACHE_DIR: "${{ github.workspace }}/.ccache"
3030
BASEDIR: ${{ github.workspace }}/.work
31-
CACHE_PREFIX: "${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}${{ matrix.env.CCOV_UPLOAD && '-ccov' || '' }}"
31+
CACHE_PREFIX: "${{ matrix.env.IMAGE }}${{ matrix.env.CCOV && '-ccov' || '' }}"
32+
3233
runs-on: ubuntu-latest
3334
steps:
3435
- uses: actions/checkout@v2
@@ -39,12 +40,20 @@ jobs:
3940
key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('upstream.repos') }}-${{ github.run_id }}
4041
restore-keys: |
4142
upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('upstream.repos') }}
43+
- name: cache target_ws
44+
uses: pat-s/always-upload-cache@v2.1.3
45+
with:
46+
path: ${{ env.BASEDIR }}/target_ws
47+
key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/package.xml') }}-${{ github.run_id }}
48+
restore-keys: |
49+
target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/package.xml') }}
4250
- name: cache ccache
4351
uses: pat-s/always-upload-cache@v2.1.3
4452
with:
4553
path: ${{ env.CCACHE_DIR }}
46-
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
54+
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
4755
restore-keys: |
56+
ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
4857
ccache-${{ env.CACHE_PREFIX }}
4958
- name: industrial_ci
5059
uses: 'ros-industrial/industrial_ci@master'
@@ -57,6 +66,15 @@ jobs:
5766
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
5867
- name: upload codecov report
5968
uses: codecov/codecov-action@v1
60-
if: ${{ matrix.env.CCOV_UPLOAD }}
69+
if: ${{ env.CCOV }}
6170
with:
6271
files: ${{ env.BASEDIR }}/coverage.info
72+
- name: prepare target_ws for cache
73+
if: always()
74+
run: |
75+
sudo find ${{ env.BASEDIR }}/target_ws -name '*.gcov' -type f -delete
76+
sudo find ${{ env.BASEDIR }}/target_ws -name '*.gcno' -type f -delete
77+
sudo find ${{ env.BASEDIR }}/target_ws -name '*.gcda' -type f -delete
78+
sudo find ${{ env.BASEDIR }}/target_ws -name '*/test_results*' -delete
79+
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src
80+
du -sh ${{ env.BASEDIR }}/target_ws

0 commit comments

Comments
 (0)