Skip to content

CI: Disable Xdebug, use Rust release builds, consolidate unit-test matrix#425

Open
JanJakes wants to merge 2 commits into
trunkfrom
ci-improvements
Open

CI: Disable Xdebug, use Rust release builds, consolidate unit-test matrix#425
JanJakes wants to merge 2 commits into
trunkfrom
ci-improvements

Conversation

@JanJakes

@JanJakes JanJakes commented Jun 6, 2026

Copy link
Copy Markdown
Member

Summary

Extracts the CI-only improvements from the parser/lexer performance work (#378) into a standalone, low-risk PR that can land on its own. No source changes — only .github/workflows/.

The main goal is to run PHP without Xdebug and to use Rust release builds for test exection.

What's included:

  • Disable Xdebug across CI. The setup PHP GitHub action enables Xdebug by default, which slows the PHPUnit suite ~4× and we don't use it (no code coverage). Setting coverage: none fixes that.
  • Build the Rust extension in release mode. We used Rust debug builds, and those run the extension much slower and distorted the suite timing.
  • Cache the Rust build (Swatinem/rust-cache@v2), keyed by PHP version. This is nice-to-have for better CI job times end-to-end.
  • Consolidate the unit-test workflows into one matrix. Merge mysql-parser-extension-tests.yml and phpunit-tests-run.yml into a single phpunit-tests.yml matrix, adding a with/without PHP extension dimension.

JanJakes added 2 commits June 6, 2026 11:04
Merge the "PHPUnit Tests" (pure-PHP) and "MySQL Parser Extension Tests"
workflows into a single "PHPUnit Tests" matrix that runs the mysql-on-sqlite
suite with and without the native Rust parser extension: pure on PHP 7.2-8.5,
plus the extension on PHP 8.0+ (its minimum). Job names read
"PHP 8.2 / SQLite 3.45.1" and "PHP 8.2 + ext-wp-mysql-parser / SQLite 3.45.1".
This drops the redundant pure-on-extension jobs (the old extension workflow
re-ran the plain suite on 7.2-7.4, duplicating "PHPUnit Tests") and removes the
reusable phpunit-tests-run.yml. The native jobs build the extension in release
mode (cargo build --release) so the suite exercises it at realistic speed
rather than the slow debug build.

All setup-php steps now pass `coverage: none`. setup-php enables Xdebug by
default, and the old pure-suite path left it on, instrumenting every call and
running the suite ~4x slower (PHP 7.3: ~59s -> ~14s) while no coverage report
was ever produced or consumed. Also set `coverage: none` on the MySQL Proxy
and release-publish PHP setups.

The merged workflow is path-filtered to the parser/driver/extension packages
(plus root composer) like the extension workflow was, and triggers on push to
trunk (the old phpunit-tests trigger referenced a non-existent "main" branch).
The native matrix jobs compile the extension with `cargo build --release`,
which rebuilds the whole dependency tree from scratch each run. Add
Swatinem/rust-cache for the parser-extension workspace so the cargo registry
and target dir are cached across runs, cutting the release-compile time on warm
runs without affecting the (now realistic) test-step timings.
@JanJakes JanJakes changed the title CI: disable Xdebug, release-build the Rust extension, consolidate the unit-test matrix CI: Disable Xdebug, use Rust release builds, consolidate unit-test matrix Jun 6, 2026
@JanJakes JanJakes marked this pull request as ready for review June 6, 2026 12:24
@JanJakes JanJakes requested a review from adamziel June 6, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant