Skip to content

546 update cmakeliststxt to support latest cuda project type and architectures #530

546 update cmakeliststxt to support latest cuda project type and architectures

546 update cmakeliststxt to support latest cuda project type and architectures #530

name: Clang-Format
on: [pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
format:
name: Run Clang-Format
runs-on: ubuntu-latest
steps:
- name: Install Clang-Format
run: sudo apt-get update && sudo apt-get install clang-format && clang-format --version
- name: Check out code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Format code
run: |
find include -type f \( -name '*.hpp' -o -name '*.h' -o -name '*.cuh' -o -name '*.inl' \) -exec clang-format -i --style=file --verbose {} +
find src -type f \( -name '*.cu' -o -name '*.hpp' -o -name '*.h' -o -name '*.cpp' \) -exec clang-format -i --style=file --verbose {} +
find test -type f \( -name '*.hpp' -o -name '*.h' -o -name '*.cpp' -o -name '*.cuh' -o -name '*.cu' \) ! -path 'test/tutorial/*' -exec clang-format -i --style=file --verbose {} +
git diff