Skip to content

ci: Upload coverage as artifact #70

ci: Upload coverage as artifact

ci: Upload coverage as artifact #70

Workflow file for this run

name: "CMake Lint"
on:
# always run on main branch
push:
branches: [ main ]
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
# run on PR to main branch if relevant files changed
pull_request:
branches: [ main ]
paths:
- '**/CMakeLists.txt'
- '.github/workflows/cmake-lint.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: "cmake lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.13'
cache-dependency-path: '.github/workflows/cmake-lint.yml'
cache: 'pip'
- name: Install CMake linting tool
run: pip install cmakelang
# Check all cmake files; ignore files in hidden directories;
# use increased line width since formatting is checked by other workflow
- name: Execute cmake-lint
run: find . \( \( -path './build' -o -path '*/.*' \) -prune \) -o
\( -type f -a -iname 'CMakeLists.txt' \)
-exec echo "Linting '{}'..." \;
-exec cmake-lint --line-width=90 -- {} +