Skip to content

Commit

Permalink
test latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerjw committed Mar 23, 2021
1 parent ed1f4f6 commit b6172b8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .ci.prepare_codecov
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pushd $BASEDIR
BLUE='\033[0;34m'
NOCOLOR='\033[0m'

apt-get -qq install lcov

echo -e "${BLUE}Capture coverage info${NOCOLOR}"
lcov --capture --directory target_ws --output-file coverage.info

Expand Down
44 changes: 31 additions & 13 deletions .github/workflows/industrial_ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,25 @@ jobs:
matrix:
env:
- {
ROS_DISTRO: foxy,
ROS_REPO: main,
CCOV_UPLOAD: true,
CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage' -DCMAKE_CXX_FLAGS='--coverage'",
AFTER_RUN_TARGET_TEST: './.ci.prepare_codecov',
ADDITIONAL_DEBS: 'lcov'
}
IMAGE: 'foxy-ci',
CCOV: true,
AFTER_RUN_TARGET_TEST: './.ci.prepare_codecov'
}
- {
ROS_DISTRO: foxy,
ROS_REPO: testing,
CCOV_UPLOAD: false
IMAGE: 'foxy-ci-testing',
}
env:
DOCKER_IMAGE: moveit/moveit2:${{ matrix.env.IMAGE }}
UPSTREAM_WORKSPACE: upstream.repos
CCOV: ${{ matrix.env.CCOV }}
AFTER_SETUP_UPSTREAM_WORKSPACE: 'vcs pull $BASEDIR/upstream_ws/src'
TARGET_CMAKE_ARGS: >
-DCMAKE_BUILD_TYPE=${{ matrix.env.CCOV && 'Debug' || 'Release'}}
${{ matrix.env.CCOV && '-DCMAKE_CXX_FLAGS="--coverage" --no-warn-unused-cli' || '' }}
CCACHE_DIR: "${{ github.workspace }}/.ccache"
BASEDIR: ${{ github.workspace }}/.work
CACHE_PREFIX: "${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}${{ matrix.env.CCOV_UPLOAD && '-ccov' || '' }}"
CACHE_PREFIX: "${{ matrix.env.IMAGE }}${{ matrix.env.CCOV && '-ccov' || '' }}"

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -39,12 +40,20 @@ jobs:
key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('upstream.repos') }}-${{ github.run_id }}
restore-keys: |
upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('upstream.repos') }}
- name: cache target_ws
uses: pat-s/[email protected]
with:
path: ${{ env.BASEDIR }}/target_ws
key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/package.xml') }}-${{ github.run_id }}
restore-keys: |
target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/package.xml') }}
- name: cache ccache
uses: pat-s/[email protected]
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}
restore-keys: |
ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
ccache-${{ env.CACHE_PREFIX }}
- name: industrial_ci
uses: 'ros-industrial/industrial_ci@master'
Expand All @@ -57,6 +66,15 @@ jobs:
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
- name: upload codecov report
uses: codecov/codecov-action@v1
if: ${{ matrix.env.CCOV_UPLOAD }}
if: ${{ env.CCOV }}
with:
files: ${{ env.BASEDIR }}/coverage.info
- name: prepare target_ws for cache
if: always()
run: |
sudo find ${{ env.BASEDIR }}/target_ws -name '*.gcov' -type f -delete
sudo find ${{ env.BASEDIR }}/target_ws -name '*.gcno' -type f -delete
sudo find ${{ env.BASEDIR }}/target_ws -name '*.gcda' -type f -delete
sudo find ${{ env.BASEDIR }}/target_ws -name '*/test_results*' -delete
sudo rm -rf ${{ env.BASEDIR }}/target_ws/src
du -sh ${{ env.BASEDIR }}/target_ws

0 comments on commit b6172b8

Please sign in to comment.