Skip to content

Simplify the CMake doc targets #134

Simplify the CMake doc targets

Simplify the CMake doc targets #134

Workflow file for this run

# Run cmakelint over all the repo's CMake files
name: cmakelint
on:
pull_request:
paths:
- '**.cmake'
- '**/CMakeLists.txt'
permissions:
contents: read
jobs:
cmake-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
- name: Set up Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 #v6.1.0
- name: Set up cmakelint
run: |
python -m pip install --upgrade pip
python -m pip install cmakelint
- name: Lint all CMake files
run: |
FILES=$(find . -type f \( -name "CMakeLists.txt" -o -name "*.cmake" \))
if [ -z "$FILES" ]; then
echo "No CMake files found!"
exit 1
fi
echo "Linting the following files:"
echo "$FILES"
cmakelint $FILES