Repository navigation
68 lines (66 loc) · 2.21 KB
/
Copy pathmake-agent.yml
File metadata and controls
68 lines (66 loc) · 2.21 KB
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
name: _make-agent
on:
workflow_call:
inputs:
origin:
description: 'newrelic-php-agent origin'
required: true
default: 'newrelic'
type: string
ref:
description: 'Branch or tag'
required: true
type: string
arch:
description: 'Target architecture'
required: true
type: string
runs-on:
description: 'runner type'
required: true
type: string
jobs:
build-agent:
name: make agent (${{ matrix.platform }}, ${{ inputs.arch }}, ${{ matrix.php }})
runs-on: ${{inputs.runs-on}}
env:
IMAGE_NAME: newrelic/nr-php-agent-builder
IMAGE_TAG: make-php
IMAGE_VERSION: ${{vars.MAKE_PHP_VERSION}}
strategy:
matrix:
platform: [gnu, musl]
php: ['8.0', '8.1', '8.2']
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
path: php-agent
repository: ${{ inputs.origin }}/newrelic-php-agent
ref: ${{ inputs.ref }}
- name: Enable arm64 emulation
if: ${{ inputs.arch == 'arm64' }}
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:${{vars.BINFMT_IMAGE_VERSION}}
platforms: arm64
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build axiom
run: >
docker run --rm --platform linux/${{inputs.arch}}
-v "${GITHUB_WORKSPACE}/php-agent":"/usr/local/src/newrelic-php-agent"
$IMAGE_NAME:$IMAGE_TAG-${{matrix.php}}-${{matrix.platform}}-$IMAGE_VERSION make axiom
- name: Build agent
run: >
docker run --rm --platform linux/${{inputs.arch}}
-v "${GITHUB_WORKSPACE}/php-agent":"/usr/local/src/newrelic-php-agent"
$IMAGE_NAME:$IMAGE_TAG-${{matrix.php}}-${{matrix.platform}}-$IMAGE_VERSION make agent
- name: Save newrelic.so for integration tests
uses: actions/upload-artifact@v3
with:
name: newrelic.so-${{matrix.platform}}-${{inputs.arch}}-${{matrix.php}}
path: php-agent/agent/modules/newrelic.so