Skip to content

Improved timing mechanism #463

Improved timing mechanism

Improved timing mechanism #463

Workflow file for this run

name: Style
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@v3
# 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/bullseye/ llvm-toolchain-bullseye-16 main'
sudo apt-get update -q
sudo apt-get install -y clang-format-16
- name: Check style
run: |
./scripts/format-source --clang-format clang-format-16
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@v3
- name: Check JSON Schema
run: |
OUTPUT=$(find examples -name *.json -exec ./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