Protocol 1400 #1686
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check code style | |
on: | |
push: | |
branches: | |
- master | |
- v* | |
paths: | |
- .clang-format | |
- .github/workflows/clang-format.yml | |
- src/** | |
pull_request: | |
paths: | |
- .clang-format | |
- .github/workflows/clang-format.yml | |
- src/** | |
workflow_dispatch: | |
jobs: | |
check-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup LLVM repository | |
run: | | |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo add-apt-repository -y 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main' | |
- name: Install dependencies | |
run: sudo apt update -qq && sudo apt install -yqq clang-format | |
- name: Check code style | |
run: clang-format -n -style=file --Werror src/*.{cpp,h} |