Skip to content

Commit eadf3c0

Browse files
feature(pie): add initial support for PIE (PHP Extension Installed) and config.m4 support
Signed-off-by: Dusan Malusev <dusan.malusev@scylladb.com>
1 parent 4399856 commit eadf3c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3565
-5871
lines changed

.github/workflows/docker-image.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,22 @@ on:
66
php:
77
description: "PHP Version"
88
required: true
9-
zts:
10-
description: "ZTS (Zend Thread Safety)"
9+
default: '8.4'
10+
threading:
11+
type: string
12+
description: "nts or zts"
1113
required: true
14+
default: "nts"
1215
ubuntu_version:
1316
type: string
1417
description: 'Ubuntu Version'
1518
required: false
1619
default: '24.04'
20+
debug:
21+
type: string
22+
description: "PHP Debug -> Options [yes, no]"
23+
default: "no"
24+
required: false
1725
workflow_call:
1826
inputs:
1927
php:
@@ -24,9 +32,9 @@ on:
2432
type: string
2533
description: "PHP Debug -> Options [yes, no]"
2634
required: false
27-
zts:
35+
threading:
2836
type: string
29-
description: "ZTS (Zend Thread Safety) -> Options [yes, no]"
37+
description: "nts or zts"
3038
required: true
3139
ubuntu_version:
3240
type: string
@@ -41,7 +49,7 @@ on:
4149

4250
jobs:
4351
build-docker-image:
44-
runs-on: ubuntu-latest
52+
runs-on: ubuntu-24.04
4553
steps:
4654
- uses: actions/checkout@v4
4755
with:
@@ -59,10 +67,8 @@ jobs:
5967
- name: Extract PHP Version and ZTS
6068
id: version
6169
run: |
62-
export PHP_VERSION="$(echo ${{ inputs.php }} | grep -oP '^\d+\.\d+')"
63-
PHP_ENDING="php-$PHP_VERSION"
70+
PHP_ENDING="php-${{ inputs.php }}-${{ inputs.threading }}"
6471
65-
[[ ${{ inputs.zts }} == "yes" ]] && PHP_ENDING="$PHP_ENDING-zts"
6672
[[ ${{ inputs.debug }} == "yes" ]] && PHP_ENDING="$PHP_ENDING-debug"
6773
6874
echo "php_ending=$PHP_ENDING" >> $GITHUB_ENV
@@ -83,6 +89,6 @@ jobs:
8389
build-args: |
8490
UBUNTU_VERSION=${{ inputs.ubuntu_version }}
8591
PHP_VERSION=${{ inputs.php }}
86-
PHP_ZTS=${{ inputs.zts }}
92+
PHP_THREAD_MODEL=${{ inputs.threading }}
8793
PHP_DEBUG=${{ inputs.debug }}
8894
PHP_MEM_SANITIZERS=${{ inputs.debug }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Update Docker Hub Description
2+
on:
3+
push:
4+
branches:
5+
- v1.3.x
6+
paths:
7+
- README.md
8+
- .github/workflows/dockerhub-description.yml
9+
jobs:
10+
description:
11+
runs-on: ubuntu-24.04
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Docker Hub Description
16+
uses: peter-evans/dockerhub-description@v4
17+
with:
18+
username: ${{ secrets.DOCKER_USERNAME }}
19+
password: ${{ secrets.DOCKER_PASSWORD }}
20+
repository: malusevd99/scylladb-php-driver
21+
short-description: ${{ github.event.repository.description }}
22+
enable-url-completion: true

.github/workflows/release.yml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
tag:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414
outputs:
1515
version: ${{ steps.tag.outputs.tag }}
1616
prerelease: ${{ (!!steps.prerelease.outputs.is_prerelease) || false }}
@@ -30,50 +30,37 @@ jobs:
3030
id: prerelease
3131

3232
build:
33-
runs-on: ubuntu-latest
33+
runs-on: ubuntu-24.04
3434
needs: ['tag']
3535
strategy:
3636
matrix:
3737
php: ['8.1', '8.1-zts', '8.2', '8.2-zts', '8.3', '8.3-zts']
38-
os: ['ubuntu-20.04', 'ubuntu-24.04']
39-
preset: ['CICassandra', 'CIScylla']
38+
os: ['ubuntu-20.04', 'ubuntu-22.04', 'ubuntu-24.04']
39+
driver: ['scylladb', 'cassandra']
4040
fail-fast: true
4141
container: malusevd99/scylladb-php-driver:${{ matrix.os }}-php-${{ matrix.php }}
4242
steps:
4343
- uses: actions/checkout@v4
4444
with:
4545
fetch-depth: 0
4646
submodules: recursive
47-
- name: Extract PHP Version and ZTS
48-
id: name
49-
run: |
50-
[ "CICassandra" = "${{ matrix.preset }}" ] && echo 'extension="cassandra-${{ matrix.os }}-${{ matrix.php }}"' >> $GITHUB_ENV
51-
52-
[ "CIScylla" = "${{ matrix.preset }}" ] && echo 'extension="scylla-${{ matrix.os }}-${{ matrix.php }}"' >> $GITHUB_ENV
5347

5448
- name: Build Driver
49+
shell: bash
5550
run: |
56-
cmake --preset ${{ matrix.preset }} -DPHP_SCYLLADB_VERSION=${{ needs.tag.outputs.version }} || exit 1
57-
58-
cd out/${{ matrix.preset }} || exit 1
59-
ninja build || exit 1
60-
cd ../../
61-
62-
mv out/${{ matrix.preset }}/cassandra.so || exit 1
63-
sed -i "s/extension = cassandra/extension = ${{ steps.name.outputs.extension }}/g" cassandra.ini || exit 1
64-
65-
tar czf ${{ steps.name.outputs.extension }}.tar.gz ${{ steps.name.outputs.extension }}.so cassandra.ini
51+
./build.sh ${{ matrix.driver }} ${{ needs.tag.outputs.version }}
52+
tar czf ${{ matrix.os }}-php-${{ matrix.php }}-${{ matrix.driver }}.tar.gz cassandra.so cassandra.ini
6653
6754
- uses: actions/upload-artifact@v4
6855
with:
69-
name: ${{ steps.name.outputs.extension }}
70-
path: ${{ steps.name.outputs.extension }}.tar.gz
56+
name: ${{ matrix.os }}-php-${{ matrix.php }}-${{ matrix.driver }}.tar.gz
57+
path: ${{ matrix.os }}-php-${{ matrix.php }}-${{ matrix.driver }}.tar.gz
7158
if-no-files-found: error
7259
retention-days: 5
7360
overwrite: true
7461

7562
release:
76-
runs-on: ubuntu-latest
63+
runs-on: ubuntu-24.04
7764
needs: ["build", 'tag']
7865
steps:
7966
- uses: actions/download-artifact@v4
@@ -86,7 +73,7 @@ jobs:
8673
with:
8774
make_latest: ${{ !needs.tag.outputs.prerelease }}
8875
name: "v${{ needs.tag.outputs.version }}"
89-
tag_name: "v${{ needs.tag.outputs.version }}"
76+
tag_name: "v${{ needs.tag.outputs.version }}"
9077
generate_release_notes: true
9178
append_body: true
9279
prerelease: ${{ needs.tag.outputs.prerelease }}

.github/workflows/test-images.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
name: "Build Docker Images"
1+
name: 'Build Docker Images'
22

33
on:
44
schedule:
5-
- cron: "0 0 1,15 * *"
5+
- cron: '0 0 1,15 * *'
66
workflow_call:
77
workflow_dispatch:
88

99
jobs:
1010
build:
1111
strategy:
1212
matrix:
13-
tag: ["8.1.29", "8.2.20", "8.3.8"]
14-
zts: ['yes', 'no']
13+
tag: ['8.1', '8.2', '8.3', '8.4']
14+
threading: ['zts', 'nts']
1515
debug: ['yes', 'no']
16-
ubuntu_version: ["20.04", "22.04", "24.04"]
17-
uses: "./.github/workflows/docker-image.yml"
16+
ubuntu_version: ['20.04', '22.04', '24.04']
17+
uses: './.github/workflows/docker-image.yml'
1818
with:
1919
php: ${{ matrix.tag }}
20-
zts: ${{ matrix.zts }}
20+
threading: ${{ matrix.threading }}
2121
ubuntu_version: ${{ matrix.ubuntu_version }}
2222
debug: ${{ matrix.debug }}
2323
secrets:

.github/workflows/test.yml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,45 @@ jobs:
1212
test:
1313
strategy:
1414
matrix:
15-
php: ['8.1', '8.2', '8.3', '8.1-zts', '8.2-zts', '8.3-zts']
16-
os: ['ubuntu-20.04', 'ubuntu-24.04']
17-
preset: ['CICassandraDebug', 'CIScyllaDebug']
15+
php: ['8.1', '8.2', '8.3', '8.4']
16+
threading: ['zts', 'nts']
17+
os: ['ubuntu-22.04', 'ubuntu-24.04']
18+
driver: ['scylladb', 'cassandra']
1819
fail-fast: false
19-
runs-on: ubuntu-latest
20-
container: malusevd99/scylladb-php-driver:${{ matrix.os }}-php-${{ matrix.php }}-debug
20+
runs-on: ubuntu-24.04
21+
container: malusevd99/scylladb-php-driver:${{ matrix.os }}-php-${{ matrix.php }}-${{ matrix.threading }}-debug
2122
steps:
2223
- uses: actions/checkout@v4
2324
with:
2425
fetch-depth: 0
2526
submodules: recursive
26-
- name: Run tests
27-
run: |
28-
cmake --preset ${{ matrix.preset }} || exit 1
27+
- name: Cache Vendor
28+
uses: actions/cache@v3
29+
with:
30+
path: tests/vendor
31+
key: ${{ runner.os }}-${{ matrix.php }}-vendor-${{ hashFiles('**/composer.lock') }}
2932

30-
cd out/${{ matrix.preset }} || exit 1
31-
ninja install || exit 1
32-
cd ../../
33+
- name: Build
34+
run: ./scripts/build.sh ${{ matrix.driver }}
3335

34-
cat cassandra.ini >> "$(php-config --ini-path | xargs -I {} printf '%s/php.ini' {})" || exit 1
36+
- name: Install PHP Dependencies
37+
working-directory: tests
38+
shell: bash
39+
run: |
40+
php -d extension=cassandra /php/bin/composer \
41+
--ignore-platform-reqs \
42+
--no-ansi \
43+
--prefer-dist \
44+
--no-interaction \
45+
--no-progress \
46+
install
3547
36-
cd tests
37-
composer install
38-
php ./vendor/bin/pest
48+
- name: Run tests
49+
working-directory: tests
50+
shell: bash
51+
run: |
52+
php -d extension=cassandra ./vendor/bin/pest \
53+
--colors=always \
54+
--fail-on-risky \
55+
--fail-on-warning \
56+
--fail-on-deprecation

.vscode/settings.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,8 @@
22
"cmake.buildDirectory": "${workspaceFolder}/out/Debug",
33
"cmake.allowCommentsInPresetsFile": true,
44
"cmake.buildTask": true,
5-
"cmake.configureEnvironment": {
6-
"CMAKE_BUILD_TYPE": "Debug",
7-
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
8-
"PHP_SCYLLADB_LIBUV_STATIC": "ON",
9-
"PHP_SCYLLADB_LIBSCYLLADB_STATIC": "ON",
10-
"CASS_CPP_STANDARD": "17",
11-
"CASS_USE_STATIC_LIBS": "ON",
12-
"PHP_SCYLLADB_ENABLE_SANITIZERS": "ON"
13-
},
145
"cmake.configureSettings": {},
156
"cmake.generator": "Ninja",
16-
"cmake.installPrefix": "${workspaceFolder}/out/Debug/install",
177
"cmake.loggingLevel": "debug",
188
"cmake.configureArgs": [],
199
"cmake.sourceDirectory": "${workspaceFolder}/.",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy