|
13 | 13 | } |
14 | 14 | ?> |
15 | 15 |
|
| 16 | +# PHP 8.5 has a known tailcall VM crash; re-enable once PHP 8.5.8 is available. |
| 17 | +.php_language_profiler_targets: &php_language_profiler_targets |
| 18 | +<?php |
| 19 | +foreach ($profiler_minor_major_targets as $version) { |
| 20 | + if (version_compare($version, "8.5", "<")) { |
| 21 | + echo " - \"{$version}\"\n"; |
| 22 | + } |
| 23 | +} |
| 24 | +?> |
| 25 | + |
16 | 26 | "profiling tests": |
17 | 27 | stage: test |
18 | 28 | tags: [ "arch:${ARCH}" ] |
|
44 | 54 | script: |
45 | 55 | - if [ -d '/opt/rh/devtoolset-7' ]; then set +eo pipefail; source scl_source enable devtoolset-7; set -eo pipefail; fi |
46 | 56 | - if [ -d '/opt/rh/devtoolset-7' ] && [ "$(uname -m)" = "aarch64" ]; then export BINDGEN_EXTRA_CLANG_ARGS="-I$(clang --print-resource-dir)/include"; fi |
| 57 | + - if [ -f /sbin/apk ] && [ $(uname -m) = "aarch64" ]; then ln -sf ../lib/llvm17/bin/clang /usr/bin/clang; fi |
| 58 | + - export DD_PROFILING_OUTPUT_PPROF=/tmp/ |
47 | 59 |
|
48 | 60 | - cd profiling |
49 | 61 | - 'echo "nproc: $(nproc)"' |
|
86 | 98 | image: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-${PHP_MAJOR_MINOR}_bookworm-8 |
87 | 99 | variables: |
88 | 100 | KUBERNETES_CPU_REQUEST: 5 |
| 101 | + KUBERNETES_CPU_LIMIT: 5 |
89 | 102 | KUBERNETES_MEMORY_REQUEST: 3Gi |
90 | | - KUBERNETES_MEMORY_LIMIT: 4Gi |
| 103 | + KUBERNETES_MEMORY_LIMIT: 3Gi |
| 104 | + KUBERNETES_HELPER_CPU_REQUEST: 1 |
| 105 | + KUBERNETES_HELPER_CPU_LIMIT: 1 |
| 106 | + KUBERNETES_HELPER_MEMORY_REQUEST: 2Gi |
| 107 | + KUBERNETES_HELPER_MEMORY_LIMIT: 2Gi |
91 | 108 | # CARGO_TARGET_DIR: /mnt/ramdisk/cargo # ramdisk?? |
92 | 109 | libdir: /tmp/datadog-profiling |
93 | 110 | parallel: |
|
105 | 122 | image: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-8.5_bookworm-8 |
106 | 123 | variables: |
107 | 124 | KUBERNETES_CPU_REQUEST: 5 |
| 125 | + KUBERNETES_CPU_LIMIT: 5 |
108 | 126 | KUBERNETES_MEMORY_REQUEST: 3Gi |
109 | | - KUBERNETES_MEMORY_LIMIT: 4Gi |
| 127 | + KUBERNETES_MEMORY_LIMIT: 3Gi |
| 128 | + KUBERNETES_HELPER_CPU_REQUEST: 1 |
| 129 | + KUBERNETES_HELPER_CPU_LIMIT: 1 |
| 130 | + KUBERNETES_HELPER_MEMORY_REQUEST: 2Gi |
| 131 | + KUBERNETES_HELPER_MEMORY_LIMIT: 2Gi |
110 | 132 | # CARGO_TARGET_DIR: /mnt/ramdisk/cargo # ramdisk?? |
111 | 133 | libdir: /tmp/datadog-profiling |
112 | 134 | script: |
113 | 135 | - switch-php nts # not compatible with debug |
114 | 136 | - cd profiling |
115 | 137 | - cargo test --all-features |
| 138 | + |
| 139 | +"PHP language tests": |
| 140 | + stage: test |
| 141 | + tags: [ "arch:${ARCH}" ] |
| 142 | + image: registry.ddbuild.io/images/mirror/datadog/dd-trace-ci:php-${PHP_MAJOR_MINOR}_bookworm-8 |
| 143 | + variables: |
| 144 | + KUBERNETES_CPU_REQUEST: 5 |
| 145 | + KUBERNETES_CPU_LIMIT: 5 |
| 146 | + KUBERNETES_MEMORY_REQUEST: 3Gi |
| 147 | + KUBERNETES_MEMORY_LIMIT: 3Gi |
| 148 | + KUBERNETES_HELPER_CPU_REQUEST: 1 |
| 149 | + KUBERNETES_HELPER_CPU_LIMIT: 1 |
| 150 | + KUBERNETES_HELPER_MEMORY_REQUEST: 2Gi |
| 151 | + KUBERNETES_HELPER_MEMORY_LIMIT: 2Gi |
| 152 | + CARGO_TARGET_DIR: /tmp/cargo |
| 153 | + libdir: /tmp/datadog-profiling |
| 154 | + SKIP_ONLINE_TESTS: "1" |
| 155 | + REPORT_EXIT_STATUS: "1" |
| 156 | + DD_PROFILING_OUTPUT_PPROF: /tmp/ |
| 157 | + XFAIL_LIST: dockerfiles/ci/xfail_tests/${PHP_MAJOR_MINOR}.list |
| 158 | + parallel: |
| 159 | + matrix: |
| 160 | + - PHP_MAJOR_MINOR: *php_language_profiler_targets |
| 161 | + ARCH: amd64 |
| 162 | + FLAVOUR: [nts, zts] |
| 163 | + script: |
| 164 | + - unset DD_SERVICE; unset DD_ENV |
| 165 | + - command -v switch-php && switch-php "${FLAVOUR}" |
| 166 | + - cd profiling |
| 167 | + - cargo build --profile profiler-release |
| 168 | + - cd .. |
| 169 | + - echo "extension=/tmp/cargo/profiler-release/libdatadog_php_profiling.so" > /opt/php/${FLAVOUR}/conf.d/profiling.ini |
| 170 | + - php -v |
| 171 | + # Fail loudly if the profiler did not load: otherwise the language tests |
| 172 | + # would run profiler-less and pass, giving a false green. |
| 173 | + - php -m | grep -qx 'datadog-profiling' || { echo 'ERROR: datadog-profiling extension is not loaded'; exit 1; } |
| 174 | + - cat "${XFAIL_LIST}" profiling/tests/php-language-xfail.list > /tmp/profiler-php-language-xfail.list |
| 175 | + - if php -r 'exit(PHP_VERSION_ID < 80400 ? 0 : 1);'; then cat profiling/tests/php-language-xfail-pre84.list >> /tmp/profiler-php-language-xfail.list; fi |
| 176 | + - export XFAIL_LIST=/tmp/profiler-php-language-xfail.list |
| 177 | + - .gitlab/run_php_language_tests.sh |
0 commit comments