name: Clang-Scan

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    - name: Install meson
      run: |
        sudo apt-get update
        sudo apt-get install -y meson clang clang-tools gnu-efi
    - name: Meson setup
      run: CC=clang meson setup build -Dslh_dsa_ascon_128s=enabled -Dslh_dsa_ascon_128f=enabled -Dsbsigntools=enabled
    - name: Clang Scanner
      run: SCANBUILD=$(pwd)/addon/scan-build.sh ninja -C build/ scan-build
