Skip to content

CI: Update actions #125

CI: Update actions

CI: Update actions #125

# 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: BuildAndTest
on: [push, pull_request]
jobs:
industrial_ci:
strategy:
matrix:
env:
- {
ROS_DISTRO: melodic,
ROS_REPO: main,
CCOV_UPLOAD: true,
CATKIN_LINT: pedatntic,
CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS='--coverage' -DCMAKE_CXX_FLAGS='--coverage'",
AFTER_RUN_TARGET_TEST: './.ci.prepare_codecov',
ADDITIONAL_DEBS: 'lcov'
}
- {
ROS_DISTRO: kinetic,
ROS_REPO: main,
CCOV_UPLOAD: false,
BEFORE_BUILD_TARGET_WORKSPACE: './.ci.mongo_source_install',
ROSDEP_SKIP_KEYS: 'libmongoclient-dev',
ADDITIONAL_DEBS: 'libssl-dev scons git'
}
env:
CCACHE_DIR: /home/runner/.ccache
BASEDIR: .base
CACHE_PREFIX: "${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}${{ matrix.env.CCOV_UPLOAD && '-ccov' || '' }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
save-always: true
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}
restore-keys: |
ccache-${{ env.CACHE_PREFIX }}
- uses: ros-industrial/industrial_ci@master
env: ${{ matrix.env }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
- uses: codecov/codecov-action@v4
if: ${{ matrix.env.CCOV_UPLOAD }}
with:
files: ${{ env.BASEDIR }}/coverage.info