# Copyright 2020-2026, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause

name: Check code formatting

permissions: read-all

on: [push, pull_request]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  check-format:
    runs-on: ubuntu-24.04
    env:
      LLVM_VERSION: "18.1"
      LLVM_TAR: llvm-18.1.8-ubuntu22.04-Release+Asserts-x86.arm.wasm.tar.xz

    steps:
    - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
      with:
        submodules: true

    - name: Install dependencies
      run: |
        .github/workflows/scripts/install-build-deps.sh

    - name: Check format
      run: |
        ./scripts/check_format.sh
