Skip to content

ci: add optimized release PHP variant with debug symbols#3657

Draft
Leiyks wants to merge 1 commit intomasterfrom
leiyks/add-optimized-release-php-variant
Draft

ci: add optimized release PHP variant with debug symbols#3657
Leiyks wants to merge 1 commit intomasterfrom
leiyks/add-optimized-release-php-variant

Conversation

@Leiyks
Copy link
Contributor

@Leiyks Leiyks commented Feb 17, 2026

Description

Add two new PHP variants to all bookworm CI images:

  • 'release-nts': Optimized non-thread-safe with debug symbols
  • 'release-zts': Optimized Zend thread-safe with debug symbols

Both variants provide:

  • Full -O2 optimization for production performance
  • Debug symbols (-g flag) for profiling and debugging
  • No --enable-debug flag (avoids debug build overhead)

These variants are optimized for benchmarking and profiling scenarios where
both performance and symbol availability are required.

Changes:

  • Modified build-php.sh to set CFLAGS="-O2 -g" for release-* variants
  • Added php-release-nts and php-release-zts build stages to all PHP version
    Dockerfiles (7.0-8.5)
  • Added both variants to final image in /opt/php/release-nts and
    /opt/php/release-zts

Usage:
switch-php release-nts # For non-thread-safe builds
switch-php release-zts # For thread-safe builds

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Feb 17, 2026

⚠️ Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 1026 Tests failed

    testSearchPhpBinaries from integration.DDTrace\Tests\Integration\PHPInstallerTest (Fix with Cursor)

    testSimplePushAndProcess from laravel-58-test.DDTrace\Tests\Integrations\Laravel\V5_8\QueueTest (Fix with Cursor)

    testSimplePushAndProcess from laravel-8x-test.DDTrace\Tests\Integrations\Laravel\V8_x\QueueTest (Fix with Cursor)

View all

ℹ️ Info

❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 015808a | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.21%. Comparing base (72a021a) to head (015808a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3657   +/-   ##
=======================================
  Coverage   62.21%   62.21%           
=======================================
  Files         141      141           
  Lines       13387    13387           
  Branches     1753     1753           
=======================================
  Hits         8329     8329           
  Misses       4260     4260           
  Partials      798      798           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72a021a...015808a. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add two new PHP variants to all bookworm CI images:
- 'release-nts': Optimized non-thread-safe with debug symbols
- 'release-zts': Optimized Zend thread-safe with debug symbols

Both variants provide:
- Full -O2 optimization for production performance
- Debug symbols (-g flag) for profiling and debugging
- No --enable-debug flag (avoids debug build overhead)

These variants are optimized for benchmarking and profiling scenarios where
both performance and symbol availability are required.

Changes:
- Modified build-php.sh to set CFLAGS="-O2 -g" for release-* variants
- Added php-release-nts and php-release-zts build stages to all PHP version
  Dockerfiles (7.0-8.5)
- Added both variants to final image in /opt/php/release-nts and
  /opt/php/release-zts

Usage:
  switch-php release-nts   # For non-thread-safe builds
  switch-php release-zts   # For thread-safe builds
@Leiyks Leiyks force-pushed the leiyks/add-optimized-release-php-variant branch from d5f2090 to 015808a Compare February 17, 2026 14:52
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.

2 participants

Comments