Claude instructions to reproduce/troubleshoot CI failures #7463
Workflow file for this run
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
| name: Profiling ASAN Tests | |
| on: | |
| pull_request: | |
| jobs: | |
| prof-asan: | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| php-version: [8.3, 8.4, 8.5] | |
| runner: [arm-8core-linux, ubuntu-8-core-latest] | |
| env: | |
| CARGO_HOME: /rust/cargo | |
| RUSTUP_HOME: /rust/rustup | |
| CARGO_TARGET_DIR: /tmp/build-cargo | |
| RUST_TOOLCHAIN: nightly-2025-06-13 | |
| container: | |
| image: datadog/dd-trace-ci:php-${{matrix.php-version}}_bookworm-6 | |
| # https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions#user | |
| options: --user root --privileged | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 1 | |
| submodules: true | |
| - name: Cache Cargo dependencies | |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | |
| with: | |
| path: | | |
| /rust/cargo/registry/index/ | |
| /rust/cargo/registry/cache/ | |
| /rust/cargo/registry/src/ | |
| /rust/cargo/git/db/ | |
| /rust/cargo/git/checkouts/ | |
| key: ${{ runner.os }}-${{ runner.arch }}-cargo-deps-asan-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache Cargo target | |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | |
| with: | |
| path: /tmp/build-cargo/ | |
| key: ${{ runner.os }}-${{ runner.arch }}-cargo-target-asan-${{ matrix.php-version }}-${{ env.RUST_TOOLCHAIN }}-${{ github.sha }}-${{ hashFiles('.github/workflows/prof_asan.yml') }} | |
| - name: Build and install profiler | |
| run: | | |
| set -eux | |
| switch-php nts-asan | |
| cd profiling | |
| export CC=clang-17 | |
| export CFLAGS='-fsanitize=address -fno-omit-frame-pointer' | |
| export LDFLAGS='-fsanitize=address -shared-libasan' | |
| export RUSTC_LINKER=lld-17 | |
| triplet=$(uname -m)-unknown-linux-gnu | |
| RUSTFLAGS='-Zsanitizer=address' cargo +${RUST_TOOLCHAIN} build -Zbuild-std=std,panic_abort --target $triplet --profile profiler-release | |
| cp -v "$CARGO_TARGET_DIR/$triplet/profiler-release/libdatadog_php_profiling.so" "$(php-config --extension-dir)/datadog-profiling.so" | |
| - name: Run phpt tests | |
| run: | | |
| set -eux | |
| switch-php nts-asan | |
| cd profiling/tests | |
| cp -v $(php-config --prefix)/lib/php/build/run-tests.php . | |
| export DD_PROFILING_OUTPUT_PPROF=/tmp/pprof | |
| php run-tests.php -j$(nproc) --show-diff --asan -d extension=datadog-profiling.so phpt |