-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (60 loc) · 1.91 KB
/
build-packages.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-packages
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 }}
build-packages:
name: build-packages
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
# - if: ${{ matrix.goarch == 'arm64' }}
# uses: docker/setup-qemu-action@v3
# with:
# platforms: arm64
- uses: actions/download-artifact@v4
with:
name: build-native-${{ matrix.arch }}
path: prod/native/_build/${{ matrix.arch }}-release/
- uses: actions/download-artifact@v4
with:
name: php-dependencies
- name: Build packages
run: |
source "./tools/read_properties.sh"
read_properties elastic-otel-php.properties ELASTIC_OTEL_PHP
./tools/build/build_packages.sh --package_version ${ELASTIC_OTEL_PHP_VERSION} --build_architecture ${{ matrix.arch }} --package_goarchitecture ${{ matrix.goarch }} --package_types '${{ matrix.packages }}' --package_sha '${{ github.sha }}'
- uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.arch }}
path: |
build/packages/*