Skip to content

Commit c810fa2

Browse files
committed
fix: building pg_query extension on baseline workflow
1 parent ae42947 commit c810fa2

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,19 @@ inputs:
4343
description: 'Environment variables for PHP setup'
4444
required: false
4545
default: ''
46+
apt-packages:
47+
description: 'Additional apt packages to install before PHP setup (e.g., libprotobuf-c-dev for pg_query extension)'
48+
required: false
49+
default: ''
4650

4751
runs:
4852
using: "composite"
4953
steps:
54+
- name: "Install apt packages"
55+
if: ${{ inputs.apt-packages != '' }}
56+
shell: bash
57+
run: sudo apt-get update && sudo apt-get install -y ${{ inputs.apt-packages }}
58+
5059
- name: "Install PHP"
5160
uses: "shivammathur/setup-php@v2"
5261
with:

.github/workflows/baseline.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
coverage: "none"
4242
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib, pg_query-https://github.com/flow-php/[email protected]'
4343
cache-key-suffix: "-locked-phar"
44+
apt-packages: "libprotobuf-c-dev"
4445

4546
- name: "Build PHAR file"
4647
run: "composer build:phar"
@@ -176,6 +177,7 @@ jobs:
176177
dependencies: "locked"
177178
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib, pg_query-https://github.com/flow-php/[email protected]'
178179
cache-key-suffix: "-website-phar"
180+
apt-packages: "libprotobuf-c-dev"
179181

180182
- name: "Generate documentation"
181183
run: "composer build:docs"

.github/workflows/release.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,15 @@ jobs:
2020
with:
2121
fetch-depth: 0
2222

23-
- name: "Install PHP"
24-
uses: "shivammathur/setup-php@v2"
23+
- name: "Setup PHP Environment"
24+
uses: "./.github/actions/setup-php-env"
2525
with:
26-
coverage: none
27-
tools: composer:v2
2826
php-version: "${{ matrix.php-version }}"
29-
ini-values: memory_limit=-1
27+
dependencies: "locked"
28+
coverage: "none"
3029
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib, pg_query-https://github.com/flow-php/[email protected]'
31-
32-
- name: "Get Composer Cache Directory"
33-
id: composer-cache
34-
run: |
35-
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
36-
37-
- name: "Cache Composer dependencies"
38-
uses: "actions/cache@v4"
39-
with:
40-
path: "${{ steps.composer-cache.outputs.dir }}"
41-
key: "php-${{ matrix.php-version }}-locked-composer-${{ hashFiles('**/composer.lock') }}"
42-
restore-keys: |
43-
php-${{ matrix.php-version }}-locked-composer-
44-
45-
- name: "Install locked dependencies"
46-
run: "composer install --no-interaction --no-progress"
30+
cache-key-suffix: "-locked-phar"
31+
apt-packages: "libprotobuf-c-dev"
4732

4833
- name: "Build PHAR file"
4934
run: "composer build:phar"

0 commit comments

Comments
 (0)