Skip to content

Functionalities for flux trapping analysis #3866

Functionalities for flux trapping analysis

Functionalities for flux trapping analysis #3866

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 clang-format-19 from LLVM (newer than the distro package)
- 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-schema-version:
runs-on: ubuntu-latest
# Only meaningful for pull requests, where there is a base branch to diff against.
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check schema version bump
run: |
git fetch --no-tags --depth=1 origin "${GITHUB_BASE_REF}"
./scripts/check-schema-version "origin/${GITHUB_BASE_REF}"
check-tests-tags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check test tags
run: ./scripts/check-test-tags test/unit
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