mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-24 12:05:32 -04:00
32 lines
811 B
YAML
32 lines
811 B
YAML
name: C++ Format Check
|
|
|
|
on:
|
|
# allow workflow to be run manually
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
branches:
|
|
- develop
|
|
- master
|
|
|
|
jobs:
|
|
cpp-linter:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cpp-linter/cpp-linter-action@v2
|
|
id: linter
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
style: file
|
|
files-changed-only: true
|
|
tidy-checks: '-*'
|
|
version: '15' # clang-format version
|
|
file-annotations: true
|
|
step-summary: true
|
|
extensions: 'cpp,h'
|
|
|
|
- name: Failure Check
|
|
if: steps.linter.outputs.checks-failed > 0
|
|
run: echo "Some files failed the formatting check! See job summary and file annotations for more info" && exit 1
|