Skip to content

Testing: Optional examples-web-smoke --aot gate in ci-local when LLVM present #444

@PurHur

Description

@PurHur

Problem

ExamplesCompileTest builds and executes AOT binaries for shipped examples (#247, #309 closed).

script/examples-web-smoke.sh --aot exists (#298) but is not invoked from script/ci-local.sh. HTTP regressions in phpc serve --aot (superglobal refresh, static assets, JSON headers) can slip through until someone runs the script manually.

Goal

When LLVM is ready and loopback bind works, run:

# Pre-build per-example binaries (or document prerequisite)
./phpc build -o examples/001-SimpleWeb/.phpc/bin/app examples/001-SimpleWeb/example.php
# ...
./script/examples-web-smoke.sh --aot

from ci-local.sh after the @group serve PHPUnit suite (or as a lightweight script phase when PHP_COMPILER_SKIP_SERVE_TESTS is unset).

Scope

  • Helper script/examples-web-smoke-prebuild.sh (or Makefile target) to build .phpc/bin/app for 001/002/004 before --aot
  • Wire into script/ci-local.sh only when LlvmToolchain::isReady equivalent passes (reuse probe from existing llvm phase)
  • Skip with message when PHP_COMPILER_SKIP_SERVE_TESTS=1 or bind fails (same as ServeTest)
  • Do not block VM-only contributors on missing LLVM — gate behind llvm presence

Acceptance criteria

make test-docker
# log contains: examples-web-smoke: ... (AOT) ... ok

Failing curl → non-zero ci-local.sh exit.

Verification (local / Docker only)

make docker-build-22
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev ./script/ci-local.sh

No .github/workflows/* changes required.

Dependencies

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions