Update CI config #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). | |
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) | |
name: CI | |
on: [push, pull_request] | |
jobs: | |
default: | |
strategy: | |
fail-fast: false | |
matrix: | |
env: | |
- IMAGE: noetic | |
CATKIN_LINT: true | |
CCOV: true | |
env: | |
DOCKER_IMAGE: 'moveit/moveit:${{ matrix.env.IMAGE }}-release' | |
AFTER_RUN_TARGET_TEST: ${{ matrix.env.CCOV && './.ci.prepare_codecov' || '' }} | |
TARGET_CMAKE_ARGS: > | |
-DCMAKE_BUILD_TYPE=${{ matrix.env.CCOV && 'RelWithDebInfo' || '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.IMAGE }}${{ matrix.env.CCOV && '-ccov' || '' }}" | |
CLANG_TIDY_BASE_REF: "${{ github.base_ref || github.ref }}" | |
name: "${{ matrix.env.IMAGE }}${{ matrix.env.CATKIN_LINT && ' + catkin_lint' || ''}}${{ matrix.env.CCOV && ' + ccov' || ''}}${{ matrix.env.IKFAST_TEST && ' + ikfast' || ''}}${{ matrix.env.CLANG_TIDY && ' + clang-tidy' || '' }}" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: cache upstream_ws | |
uses: actions/cache@v4 | |
with: | |
save-always: true | |
path: ${{ env.BASEDIR }}/upstream_ws | |
key: upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('upstream.rosinstall') }}-${{ github.run_id }} | |
restore-keys: | | |
upstream_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('upstream.rosinstall') }} | |
- name: cache ccache | |
uses: actions/cache@v4 | |
with: | |
save-always: true | |
path: ${{ env.CCACHE_DIR }} | |
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 | |
env: ${{ matrix.env }} | |
- name: upload test artifacts (on failure) | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: test-results | |
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml | |
- name: upload codecov report | |
uses: codecov/codecov-action@v4 | |
if: ${{ matrix.env.CCOV }} | |
with: | |
files: ${{ env.BASEDIR }}/coverage.info |