Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Linux
on:
- push
- pull_request
- workflow_dispatch
jobs:
linux:
strategy:
fail-fast: false
matrix:
include:
- version: 8.3
branch: PHP-8.3
- version: 8.4
branch: PHP-8.4
- version: 8.5
branch: master
services:
oracle:
image: gvenzl/oracle-free:23-slim
ports:
- 1521:1521
env:
ORACLE_PASSWORD: pass
options: >-
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-retries 10
runs-on: ubuntu-latest
steps:
- name: Setup dependencies
run: |
mkdir -p /opt/oracle
for pkg in sdk basiclite; do
curl -O https://download.oracle.com/otn_software/linux/instantclient/instantclient-$pkg-linuxx64.zip
unzip -o instantclient-$pkg-linuxx64.zip -d /opt/oracle
done
mv /opt/oracle/instantclient_* /opt/oracle/instantclient
sudo ln -sf /opt/oracle/instantclient/*.so* /usr/lib
sudo apt-get update && sudo apt-get install libaio-dev -y
sudo ln -sf /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1 >/dev/null 2>&1 || true
# fix debug build warning: zend_signal: handler was replaced for signal (2) after startup
echo DISABLE_INTERRUPT=on > /opt/oracle/instantclient/network/admin/sqlnet.ora
- name: Checkout pdo_oci
uses: actions/checkout@v4
- name: Checkout php-src
uses: actions/checkout@v4
with:
repository: php/php-src
ref: ${{ matrix.branch }}
path: php-src
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.version}}
- name: Build pdo_oci
run: |
phpize
./configure --with-php-config=$(command -v php-config) --with-pdo-oci=instantclient,/opt/oracle/instantclient
make -j$(nproc)
sudo make install
echo 'extension=pdo_oci.so' | sudo tee /etc/php/${{ matrix.version }}/mods-available/pdo_oci.ini
sudo phpenmod -v ${{ matrix.version }} pdo_oci
php --ri pdo_oci
- name: Run Tests
run: php php-src/run-tests.php --set-timeout 600 tests
env:
PDO_TEST_DIR: ${{ github.workspace }}/php-src/ext/pdo/tests
PDO_OCI_TEST_DIR: ${{ github.workspace }}/tests
PDO_OCI_TEST_USER: system
PDO_OCI_TEST_PASS: pass
PDO_OCI_TEST_DSN: oci:dbname=0.0.0.0:1521/FREEPDB1;charset=AL32UTF8
48 changes: 48 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Windows
on:
push:
pull_request:
release:
types: [created]
jobs:
get-extension-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.extension-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get the extension matrix
id: extension-matrix
uses: php/php-windows-builder/extension-matrix@v1
with:
php-version-list: '8.3, 8.4, master'

windows:
needs: get-extension-matrix
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix: ${{fromJson(needs.get-extension-matrix.outputs.matrix)}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build the extension
uses: php/php-windows-builder/extension@v1
with:
php-version: ${{ matrix.php-version }}
arch: ${{ matrix.arch }}
ts: ${{ matrix.ts }}
libs: instantclient
test-workers: 4

release:
runs-on: ubuntu-latest
needs: windows
if: ${{ github.event_name == 'release' }}
steps:
- name: Upload artifact to the release
uses: php/php-windows-builder/release@v1
with:
release: ${{ github.event.release.tag_name }}
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions tests/bug44301.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ PDO OCI Bug #44301 (Segfault when an exception is thrown on persistent connectio
--EXTENSIONS--
pdo
pdo_oci
--XFAIL--
This test is currently failing in CI.
--SKIPIF--
<?php
require(getenv('PDO_TEST_DIR').'/pdo_test.inc');
Expand Down