-
Notifications
You must be signed in to change notification settings - Fork 158
103 lines (92 loc) · 3.48 KB
/
prof_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Profiling Tests
on:
push:
branches:
- main
pull_request:
defaults:
run:
shell: /bin/bash -leo pipefail {0}
jobs:
profiling-tests:
strategy:
matrix:
docker_image:
- "datadog/dd-trace-ci:php-compile-extension-alpine-7.1"
- "datadog/dd-trace-ci:php-compile-extension-alpine-7.2"
- "datadog/dd-trace-ci:php-compile-extension-alpine-7.3"
- "datadog/dd-trace-ci:php-compile-extension-alpine-7.4"
- "datadog/dd-trace-ci:php-compile-extension-alpine-8.0"
- "datadog/dd-trace-ci:php-compile-extension-alpine-8.1"
- "datadog/dd-trace-ci:php-compile-extension-alpine-8.2"
- "datadog/dd-trace-ci:php-compile-extension-alpine-8.3"
- "datadog/dd-trace-ci:php-7.1_buster"
- "datadog/dd-trace-ci:php-7.2_buster"
- "datadog/dd-trace-ci:php-7.3_buster"
- "datadog/dd-trace-ci:php-7.4_buster"
- "datadog/dd-trace-ci:php-8.0_buster"
- "datadog/dd-trace-ci:php-8.1_buster"
- "datadog/dd-trace-ci:php-8.2_buster"
- "datadog/dd-trace-ci:php-8.3_buster"
architecture:
- x86_64
- aarch64
runs-on: ${{ matrix.architecture == 'aarch64' && 'arm-8core-linux' || 'ubuntu-latest' }}
container:
image: ${{ matrix.docker_image }}
options: --user root
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Bake me into the base image
if: contains(matrix.docker_image, 'alpine')
run: |
apk add --no-cache tar
- name: Restore Cargo Package Cache
id: cache
uses: actions/cache@v2
with:
path: target
key: cargo-cache-${{ matrix.docker_image }}-${{ hashFiles('Cargo.lock') }}
- name: Run cargo tests
run: |
set -eux
switch-php "${PHP_VERSION}"
cd profiling
cargo test --release --all-features
- name: Run phpt tests NTS
run: |
set -eux
switch-php "${PHP_VERSION}"
libdir="/tmp/datadog-profiling"
cd profiling
cargo build --release --all-features
cd tests
run_tests_php=$(find $(php-config --prefix) -name run-tests.php)
cp -v "${run_tests_php}" .
export TEST_PHP_EXECUTABLE=$(which php)
php run-tests.php -d "extension=../../target/release/libdatadog_php_profiling.so" --show-diff -g "FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP" "phpt"
- name: Run phpt tests ZTS
run: |
set -eux
switch-php "${PHP_VERSION}-zts"
libdir="/tmp/datadog-profiling"
cd profiling
touch build.rs
cargo build --release --all-features
cd tests
run_tests_php=$(find $(php-config --prefix) -name run-tests.php)
cp -v "${run_tests_php}" .
export TEST_PHP_EXECUTABLE=$(which php)
php run-tests.php -d "extension=../../target/release/libdatadog_php_profiling.so" --show-diff -g "FAIL,XFAIL,BORK,WARN,LEAK,XLEAK,SKIP" "phpt"
# - name: Run clippy NTS (for select platforms)
# if: matrix.triplet == 'x86_64-unknown-linux-gnu'
# run: |
# set -eux
# switch-php "${PHP_VERSION}"
# cd profiling
# touch build.rs
# sed -i -e "s/crate-type.*$/crate-type = [\"rlib\"]/g" Cargo.toml
# cargo clippy --all-targets --all-features -- -D warnings -Aunknown-lints