Skip to content

Commit d28ae88

Browse files
committed
fix: install pg-query-ext through pie on github actions
1 parent c810fa2 commit d28ae88

File tree

3 files changed

+30
-6
lines changed

3 files changed

+30
-6
lines changed

.github/actions/setup-php-env/action.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ inputs:
4747
description: 'Additional apt packages to install before PHP setup (e.g., libprotobuf-c-dev for pg_query extension)'
4848
required: false
4949
default: ''
50+
pie-extensions:
51+
description: 'Space-separated list of PHP extensions to install via PIE (e.g., "flow-php/pg-query-ext:1.x-dev")'
52+
required: false
53+
default: ''
5054

5155
runs:
5256
using: "composite"
@@ -66,6 +70,23 @@ runs:
6670
coverage: ${{ inputs.coverage != '' && inputs.coverage || null }}
6771
env: ${{ inputs.php-env != '' && fromJSON(inputs.php-env) || fromJSON('{}') }}
6872

73+
- name: "Install PIE"
74+
if: ${{ inputs.pie-extensions != '' }}
75+
shell: bash
76+
run: |
77+
curl -L -o /usr/local/bin/pie https://github.com/php/pie/releases/latest/download/pie.phar
78+
chmod +x /usr/local/bin/pie
79+
pie --version
80+
81+
- name: "Install PIE extensions"
82+
if: ${{ inputs.pie-extensions != '' }}
83+
shell: bash
84+
run: |
85+
for ext in ${{ inputs.pie-extensions }}; do
86+
echo "Installing extension: $ext"
87+
sudo pie install "$ext"
88+
done
89+
6990
- name: "Get Composer Cache Directory"
7091
id: composer-cache
7192
shell: bash

.github/workflows/baseline.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ jobs:
3939
php-version: "${{ matrix.php-version }}"
4040
dependencies: "locked"
4141
coverage: "none"
42-
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib, pg_query-https://github.com/flow-php/[email protected]'
42+
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib'
4343
cache-key-suffix: "-locked-phar"
44-
apt-packages: "libprotobuf-c-dev"
44+
apt-packages: "build-essential autoconf automake libtool protobuf-compiler libprotobuf-c-dev"
45+
pie-extensions: "flow-php/pg-query-ext:1.x-dev"
4546

4647
- name: "Build PHAR file"
4748
run: "composer build:phar"
@@ -175,9 +176,10 @@ jobs:
175176
with:
176177
php-version: "${{ matrix.php-version }}"
177178
dependencies: "locked"
178-
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib, pg_query-https://github.com/flow-php/[email protected]'
179+
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib'
179180
cache-key-suffix: "-website-phar"
180-
apt-packages: "libprotobuf-c-dev"
181+
apt-packages: "build-essential autoconf automake libtool protobuf-compiler libprotobuf-c-dev"
182+
pie-extensions: "flow-php/pg-query-ext:1.x-dev"
181183

182184
- name: "Generate documentation"
183185
run: "composer build:docs"

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ jobs:
2626
php-version: "${{ matrix.php-version }}"
2727
dependencies: "locked"
2828
coverage: "none"
29-
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib, pg_query-https://github.com/flow-php/[email protected]'
29+
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib'
3030
cache-key-suffix: "-locked-phar"
31-
apt-packages: "libprotobuf-c-dev"
31+
apt-packages: "build-essential autoconf automake libtool protobuf-compiler libprotobuf-c-dev"
32+
pie-extensions: "flow-php/pg-query-ext:1.x-dev"
3233

3334
- name: "Build PHAR file"
3435
run: "composer build:phar"

0 commit comments

Comments
 (0)