name: Verify generated files are up to date
runs:
  using: composite
  steps:
    - shell: bash
      run: |
        set -ex
        [[ "$OSTYPE" == "darwin"* ]] && export PATH="$(brew --prefix)/opt/bison/bin:$PATH"
        scripts/dev/credits
        scripts/dev/genfiles
        scripts/gdb/debug_gdb_scripts_gen.php
        Zend/zend_vm_gen.php
        ext/tokenizer/tokenizer_data_gen.php
        build/gen_stub.php -f --generate-optimizer-info --verify
        # Use the -a flag for a bug in git 2.46.0, which doesn't consider changed -diff files.
        git add . -N && git diff -a --exit-code
