name: Verify generated files are up to date
runs:
  using: composite
  steps:
    - shell: bash
      run: |
        set -x
        [[ "$OSTYPE" == "darwin"* ]] && export PATH="/usr/local/opt/bison/bin:$PATH"
        scripts/dev/credits
        scripts/dev/genfiles
        Zend/zend_vm_gen.php
        ext/tokenizer/tokenizer_data_gen.php
        build/gen_stub.php -f
        build/gen_stub.php --generate-optimizer-info
        # 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
