Skip to content

Commit 61b9e1e

Browse files
committed
add php xml
1 parent 8161bae commit 61b9e1e

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

.github/workflows/build-grpc.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Build gRPC PHP (Ubuntu 22.04 Multi-Arch)
22

3-
# Pemicu manual agar Anda bisa memasukkan versi saat menjalankan workflow
43
on:
54
workflow_dispatch:
65
inputs:
@@ -17,15 +16,13 @@ jobs:
1716
build-pecl:
1817
name: Build on ${{ matrix.arch }}
1918
strategy:
20-
# Matrix untuk menjalankan dua server berbeda secara bersamaan
2119
matrix:
2220
include:
2321
- os: ubuntu-22.04
2422
arch: amd64
2523
- os: ubuntu-22.04-arm
2624
arch: arm64
2725

28-
# GitHub akan memilih OS runner berdasarkan matrix di atas
2926
runs-on: ${{ matrix.os }}
3027

3128
steps:
@@ -34,11 +31,12 @@ jobs:
3431
sudo apt-get update
3532
sudo apt-get install -y software-properties-common curl build-essential zlib1g-dev
3633
37-
- name: 2. Tambahkan PPA Ondřej & Install PHP + PEAR
34+
- name: 2. Tambahkan PPA Ondřej & Install PHP + PEAR + XML
35+
# Kunci perbaikannya ada di baris paling bawah ini (menambahkan paket php-xml)
3836
run: |
3937
sudo add-apt-repository -y ppa:ondrej/php
4038
sudo apt-get update
41-
sudo apt-get install -y php${{ github.event.inputs.php_version }}-dev php${{ github.event.inputs.php_version }}-cli php-pear
39+
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
4240
4341
- name: 3. Compile gRPC via PECL
4442
run: |
@@ -48,12 +46,10 @@ jobs:
4846
run: |
4947
EXT_DIR=$(php-config --extension-dir)
5048
echo "File grpc.so berhasil dibuat di direktori: $EXT_DIR"
51-
# Salin file ke root workspace agar mudah diupload
5249
cp $EXT_DIR/grpc.so ./grpc.so
5350
5451
- name: 5. Upload File grpc.so sebagai Artifact
5552
uses: actions/upload-artifact@v4
5653
with:
57-
# Nama file .zip akan dibedakan secara otomatis berdasarkan arsitektur
5854
name: grpc-${{ matrix.arch }}-ubuntu22.04-php${{ github.event.inputs.php_version }}-v${{ github.event.inputs.grpc_version }}
5955
path: ./grpc.so

0 commit comments

Comments
 (0)