Skip to content

Some CI improvements #1

Some CI improvements

Some CI improvements #1

Workflow file for this run

name: "CMake Format"
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-format.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
format:
name: "cmake-format"
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-format.yml'
cache: 'pip'
- name: Install CMake formatting tool
run: pip install cmake-format
# Check all cmake files; ignore files in hidden directories
- name: Execute cmake-format
run: find . \( -path '*/.*' -prune \) -o
\( -type f -a -name 'CMakeLists.txt' \)
-exec echo "Format checking '{}'..." \;
-exec cmake-format --check -- {} +