-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (61 loc) · 1.89 KB
/
test-phpt.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
---
# Runs the build based on the provided files in test.yml
name: build
on:
workflow_call:
inputs:
build_arch:
required: false
type: string
default: 'x86_64'
workflow_dispatch:
inputs:
build_arch:
type: choice
description: Build architecture
default: 'x86_64'
options:
- all
- x86_64
- arm64
permissions:
contents: read
jobs:
setup-build-matrix:
uses: ./.github/workflows/build-arch-matrix-generator.yml
with:
build_arch: ${{ inputs.build_arch }}
test-phpt:
name: test-phpt
runs-on: ${{ matrix.goarch == 'arm64' && 'observability-linux-2-arm64' || 'ubuntu-latest' }}
needs: setup-build-matrix
timeout-minutes: 300
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup-build-matrix.outputs.matrix-combinations) }}
env:
BUILD_ARCHITECTURE: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build-native-${{ matrix.arch }}
path: prod/native/_build/${{ matrix.arch }}-release/
# - if: ${{ matrix.goarch == 'arm64' }}
# uses: docker/setup-qemu-action@v3
# with:
# platforms: arm64
- name: Run phpt tests
run: |
uname -a
echo "Arch: ${BUILD_ARCHITECTURE}"
source ./tools/read_properties.sh
read_properties elastic-otel-php.properties PROJECT_PROPERTIES
PHP_VERSIONS=${PROJECT_PROPERTIES_SUPPORTED_PHP_VERSIONS//[()]/}
./tools/build/test_phpt.sh --build_architecture ${BUILD_ARCHITECTURE} --results_path ${PWD}/build/test_phpt_results --php_versions "${PHP_VERSIONS}"
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-phpt-failures-${{ matrix.arch }}
path: |
build/test_phpt_results/*