Add code formatting check
This commit is contained in:
parent
0d79d17738
commit
ef07346fea
1 changed files with 13 additions and 0 deletions
|
@ -4,6 +4,19 @@ on: [push]
|
||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
format:
|
||||||
|
name: Format
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Check out the code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install clang-format
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install clang-format
|
||||||
|
- name: Check the code's formatting
|
||||||
|
run: "clang-format --dry-run src/*.h src/*.cpp 2>&1 | tee fmt.log; [ ! -s fmt.log ]"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue