-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.82 KB
/
build-grpc.yml
File metadata and controls
55 lines (47 loc) · 1.82 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
name: Build gRPC PHP (Ubuntu 22.04 Multi-Arch)
on:
workflow_dispatch:
inputs:
grpc_version:
description: 'Versi gRPC di PECL (contoh: 1.80.0RC1)'
required: true
default: '1.80.0RC1'
php_version:
description: 'Versi PHP (contoh: 8.3)'
required: true
default: '8.3'
jobs:
build-pecl:
name: Build on ${{ matrix.arch }}
strategy:
matrix:
include:
- os: ubuntu-22.04
arch: amd64
- os: ubuntu-22.04-arm
arch: arm64
runs-on: ${{ matrix.os }}
steps:
- name: 1. Update Sistem & Install Dependensi Dasar
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common curl build-essential zlib1g-dev binutils
- name: 2. Tambahkan PPA Ondřej & Install PHP + PEAR + XML
# Kunci perbaikannya ada di baris paling bawah ini (menambahkan paket php-xml)
run: |
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php${{ github.event.inputs.php_version }}-dev php${{ github.event.inputs.php_version }}-cli php-pear php${{ github.event.inputs.php_version }}-xml
- name: 3. Compile gRPC via PECL
run: |
sudo pecl install grpc-${{ github.event.inputs.grpc_version }}
- name: 4. Ambil dan strip File grpc.so
run: |
EXT_DIR=$(php-config --extension-dir)
echo "File grpc.so berhasil dibuat di direktori: $EXT_DIR"
strip --strip-debug -o ./grpc.so $EXT_DIR/grpc.so
- name: 5. Upload File grpc.so sebagai Artifact
uses: actions/upload-artifact@v4
with:
name: grpc-${{ matrix.arch }}-ubuntu22.04-php${{ github.event.inputs.php_version }}-v${{ github.event.inputs.grpc_version }}
path: ./grpc.so