-
-
Notifications
You must be signed in to change notification settings - Fork 51
85 lines (70 loc) · 2.47 KB
/
job-pg-query-extension.yml
File metadata and controls
85 lines (70 loc) · 2.47 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: PG Query Extension
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: false
jobs:
build:
name: Build and Test Extension
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.3', '8.4', '8.5']
steps:
- uses: actions/checkout@v5
- name: Setup PHP Environment
uses: ./.github/actions/setup-php-env
with:
php-version: ${{ matrix.php }}
dependencies: locked
coverage: pcov
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib, protobuf'
tools: 'composer:v2, phpize, php-config'
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential autoconf automake libtool protobuf-compiler libprotobuf-c-dev
- name: Build libpg_query and extension
working-directory: src/extension/pg-query-ext
run: |
make clean || true
make build
- name: Run extension tests
working-directory: src/extension/pg-query-ext
run: make test
- name: Install extension
working-directory: src/extension/pg-query-ext
run: |
EXT_DIR=$(php -r 'echo ini_get("extension_dir");')
sudo cp ext/modules/pg_query.so "$EXT_DIR/"
echo "extension=pg_query.so" | sudo tee -a "$(php -r 'echo php_ini_loaded_file();')"
php -m | grep pg_query
pie-install-test:
name: Test PIE Installation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup PHP Environment
uses: ./.github/actions/setup-php-env
with:
php-version: '8.3'
dependencies: locked
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib'
tools: 'composer:v2, phpize, php-config'
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential autoconf automake libtool protobuf-compiler libprotobuf-c-dev
- name: Install PIE
run: |
curl -L -o /usr/local/bin/pie https://github.com/php/pie/releases/latest/download/pie.phar
chmod +x /usr/local/bin/pie
pie --version
- name: Install extension via PIE
run: |
sudo pie install flow-php/pg-query-ext:1.x-dev
- name: Verify extension is loaded
run: |
php -m | grep pg_query