Add scripts/build-for-system-tests.sh for local artifact builds#3703
Draft
Add scripts/build-for-system-tests.sh for local artifact builds#3703
Conversation
Adds a convenience script that builds the ddtrace.so extension inside the official CI Docker container and packages it into the dd-library-php tar.gz bundle format expected by system-tests parametric testing. Particularly useful on ARM Mac (Apple Silicon) where the standard CI pipeline is not readily available. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
scripts/build-for-system-tests.sh, a convenience script for buildingdd-trace-php tracer artifacts locally for use with system-tests parametric
testing.
Motivation: Running parametric system-tests against a local branch
requires a
dd-library-php-<VERSION>-<arch>-linux-gnu.tar.gzbundle anddatadog-setup.phpin the system-testsbinaries/directory. Building thesemanually from source is error-prone and poorly documented. This script
automates the entire process. It is especially useful on ARM Mac (Apple
Silicon) where the standard CI pipeline is not easily accessible and
cross-compilation is otherwise required.
What the script does:
ddtrace.sofor PHP 8.2 NTS inside the officialdatadog/dd-trace-ci:php-8.2_busterDocker container (ensuring a correctLinux binary regardless of the host OS/arch).
src/directory into thedd-library-php/trace/ext/<api>/ddtrace.sobundle structure thatdatadog-setup.phpand system-tests expect. Profiling and AppSecextensions are intentionally omitted (not needed for parametric tests).
build/packages/dd-library-php-<VERSION>-<arch>-linux-gnu.tar.gz.datadog-setup.phpto a specifiedsystem-tests
binaries/path via--copy-to <path>.Usage:
Reviewer checklist