Skip to content

Commit

Permalink
CI just calls ./format-check.py
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm committed Jun 11, 2024
1 parent 4a32f7b commit c215ae0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ on: [push]
jobs:
clang-format:

runs-on: ubuntu-22.04 # latest
runs-on: ubuntu-24.04 # latest

steps:
- name: Checkout Sources
uses: actions/checkout@v4

- name: clang-format lint
run: |
python3 -m pip install clang-format==18.1.6
clang-format --version
./format-check.py
3 changes: 2 additions & 1 deletion format-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os
from pathlib import Path
import re
from subprocess import run
from subprocess import list2cmdline, run
from tempfile import NamedTemporaryFile

CLANG_FORMAT_VERSION = '18.1.6'
Expand Down Expand Up @@ -42,5 +42,6 @@
else:
cmd += ['--Werror', '--dry-run']

print(f"{Path.cwd()}$ {list2cmdline(cmd)}")
if run(cmd).returncode:
exit(1)

0 comments on commit c215ae0

Please sign in to comment.