diff --git a/.github/workflows/cmakelint.yml b/.github/workflows/cmakelint.yml new file mode 100644 index 0000000..737c53d --- /dev/null +++ b/.github/workflows/cmakelint.yml @@ -0,0 +1,35 @@ +# 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@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 #v4.1.7 + + - name: Set up Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.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 + diff --git a/CMakeLists.txt b/CMakeLists.txt index ef32405..12e52f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -195,7 +195,7 @@ else() message(NOTICE "find_package did NOT find hip") endif() -# Find the CUfile library and headers on NVIDIA +# Find the cuFile library and headers on NVIDIA if(CMAKE_HIP_PLATFORM STREQUAL "nvidia") find_package(CUDAToolkit REQUIRED) @@ -210,7 +210,7 @@ if(CMAKE_HIP_PLATFORM STREQUAL "nvidia") find_library(CUFILE_LIBRARY cufile PATHS ${CUDAToolkit_LIBRARY_DIR}) if(NOT CUFILE_LIBRARY) - message(FATAL_ERROR "CUfile library not found") + message(FATAL_ERROR "cuFile library not found") endif() endif()