Skip to content

CI

CI #94

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:
workflow_dispatch:
pull_request:
push:
jobs:
default:
strategy:
fail-fast: false
matrix:
distro: [melodic, noetic]
include:
- distro: noetic
env:
CLANG_TIDY: pedantic
CXXFLAGS: -Wno-error=deprecated-declarations
- distro: one
env:
CXXFLAGS: -Wno-error=deprecated-declarations
env:
CXXFLAGS: "-Werror -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls ${{ matrix.env.CXXFLAGS }}"
CLANG_TIDY_ARGS: -quiet -export-fixes ${{ github.workspace }}/.work/clang-tidy-fixes.yaml -checks="-clang-diagnostic-deprecated-declarations,-clang-analyzer-cplusplus.NewDeleteLeaks"
CATKIN_LINT: true
BASEDIR: ${{ github.workspace }}/.work
AFTER_INIT: |
# Fix for https://github.blog/2022-04-12-git-security-vulnerability-announced
apt-get -qq install -y --no-upgrade --no-install-recommends git-core | grep -E 'Setting up'
git config --global --add safe.directory "*"
CCACHE_DIR: ${{ github.workspace }}/.ccache
CACHE_PREFIX: ${{ matrix.distro }}
ROS_DISTRO: ${{ matrix.distro }}
UPSTREAM_WORKSPACE: rosinstall
name: "${{ matrix.distro }}${{ matrix.env.CLANG_TIDY && (github.event_name != 'workflow_dispatch' && ' • clang-tidy (delta)' || ' • clang-tidy (all)') || '' }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
id: ici
uses: rhaschke/industrial_ci@master
env: ${{ matrix.env || env }}
- name: Upload test artifacts (on failure)
uses: actions/upload-artifact@v4
if: failure() && (steps.ici.outputs.run_target_test || steps.ici.outputs.target_test_results)
with:
name: test-results
path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml
- name: Upload clang-tidy fixes (on failure)
uses: actions/upload-artifact@v4
if: failure() && steps.ici.outputs.clang_tidy_checks
with:
name: clang-tidy-fixes.yaml
path: ${{ env.BASEDIR }}/clang-tidy-fixes.yaml