Skip to content

Electrical Current Dipole #2816

Electrical Current Dipole

Electrical Current Dipole #2816

Workflow file for this run

name: Style
permissions:
contents: read
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# Install more recent clang-format from LLVM (match Homebrew v16)
- name: Install clang-format
run: |
wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main'
sudo apt-get update -q
sudo apt-get install -y clang-format-19
- name: Check style
run: |
./scripts/format-source --clang-format clang-format-19
if [[ `git status -s | wc -l` -ne 0 ]]; then
echo 'Error: Commit is not formatted!'
echo 'Run '\`'./scripts/format-source'\`' in the source root directory'
echo 'Summary of required changes:'
echo "`git diff --stat`"
echo 'Repository status:'
echo "`git status`"
exit 1
else
echo 'Commit is correctly formatted'
exit 0
fi
check-config:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check JSON Schema
run: |
OUTPUT=$(find examples -name *.json -maxdepth 2 -print0 | xargs -0 -n1 ./scripts/validate-config)
if echo $OUTPUT | grep -q 'Validation failed'; then
echo 'Error: Configuration file validation failed!'
echo 'Summary of output:'
echo $OUTPUT
exit 1
else
echo 'Configuration file validation passed'
exit 0
fi
check-tests-tags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check test tags
run: |
# Find TEST_CASE lines that don't have any of the required tags.
if grep -r "TEST_CASE(" test/unit | grep -v "\[Serial\]" | grep -v "\[Parallel\]" | grep -v "\[GPU\]" | grep -q "TEST_CASE("; then
echo "Error: Found TEST_CASE without required execution tags:"
grep -r "TEST_CASE(" test/unit | grep -v "\[Serial\]" | grep -v "\[Parallel\]" | grep -v "\[GPU\]"
exit 1
fi
check-license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: viperproject/check-license-header@v2
with:
config: .github/license-check/config.json
strict: false