Skip to content

prepare to test branch #344

prepare to test branch

prepare to test branch #344

Workflow file for this run

name: cpp-linter as action
on:
workflow_dispatch:
workflow_call:
pull_request:
jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
clang-version: ['9','10', '11', '12', '13', '14', '15', '16', '17']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
repository: cpp-linter/test-cpp-linter-action
- name: Cache the build artifacts
id: cache-build
uses: actions/cache@v3
with:
path: build
key: ${{ runner.os }}-${{ hashFiles('src/CMakeLists.txt', 'src/demo.cpp', 'src/demo.hpp') }}
- name: Generate compilation database
if: steps.cache-build.outputs.cache-hit != 'true'
run: mkdir build && cmake -Bbuild src
- name: Run linter as action
uses: cpp-linter/cpp-linter-action@dependabot/pip/cpp-linter-1.7.0
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
files-changed-only: true
lines-changed-only: true
# to ignore all build folder contents
ignore: build
database: build
verbosity: debug
version: ${{ matrix.clang-version }}
thread-comments: ${{ matrix.clang-version == '16' }}
file-annotations: ${{ matrix.clang-version == '16' }}
extra-args: -std=c++14 -Wall
tidy-review: ${{ matrix.clang-version == '16' }}
format-review: ${{ matrix.clang-version == '16' }}
- name: Fail fast?!
# if: steps.linter.outputs.checks-failed > 0
run: |
echo "some linter checks failed"
echo "${{ steps.linter.outputs.checks-failed }}"
# for actual deployment
# run: exit 1