mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-17 16:17:02 +08:00
25 lines
538 B
YAML
25 lines
538 B
YAML
|
|
# .github/workflows/format-check.yml
|
|
name: Code Format Check
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main", "master" ]
|
|
pull_request:
|
|
branches: [ "main", "master" ]
|
|
|
|
jobs:
|
|
clang-format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install clang-format
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y clang-format
|
|
|
|
- name: Check C++ code formatting
|
|
run: |
|
|
find src include -name "*.cpp" -o -name "*.hpp" | xargs clang-format --dry-run --Werror
|