test: inject any SDK configuration overrides as scope tags (#5702) #1013
This file contains hidden or 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 Formatting | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**/*.h" | |
- "**/*.hpp" | |
- "**/*.c" | |
- "**/*.cpp" | |
- "**/*.m" | |
- "**/*.mm" | |
- ".github/workflows/lint-clang-formatting.yml" | |
- ".clang-format" | |
pull_request: | |
paths: | |
- "**/*.h" | |
- "**/*.hpp" | |
- "**/*.c" | |
- "**/*.cpp" | |
- "**/*.m" | |
- "**/*.mm" | |
- ".github/workflows/lint-clang-formatting.yml" | |
- ".clang-format" | |
jobs: | |
format-code: | |
# While ubuntu runners have clang-format preinstalled, they use an older version. We want to use the most recent one, | |
# that we can easily install locally via brew. | |
name: Check Formatting of Clang Format | |
runs-on: macos-15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install tooling | |
run: make init-ci-format | |
- name: Format with Clang | |
run: make format-clang | |
- name: Check for Formatting Changes | |
run: | | |
if [[ -n "$(git status --porcelain)" ]]; then | |
echo "❌ Some code formatted with clang-format is not formatted correctly. Please run 'make format' and commit the changes." | |
git status | |
git diff | |
exit 1 | |
else | |
echo "✅ All code is formatted correctly." | |
fi |