Skip to content

[ROS-O] Modernize CI / cmake #102

[ROS-O] Modernize CI / cmake

[ROS-O] Modernize CI / cmake #102

Workflow file for this run

# 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: melodic
CCOV: true
CATKIN_LINT: true
UPSTREAM_WORKSPACE: github:PickNikRobotics/rviz_visual_tools#master
- IMAGE: noetic
CATKIN_LINT: 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@v3
- name: cache upstream_ws
uses: pat-s/always-upload-cache@v3
with:
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@v3
with:
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@v3
if: failure()
with:
name: test-results
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
- name: upload codecov report
uses: codecov/codecov-action@v3
if: ${{ matrix.env.CCOV }}
with:
files: ${{ env.BASEDIR }}/coverage.info