-
Notifications
You must be signed in to change notification settings - Fork 10
Add CI workflow #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add CI workflow #16
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
a236fe4
Setup CI workflow
cmb69 adef15e
Add basic Ubuntu job
cmb69 d4ace75
fix
cmb69 3527cd6
Also fetch isntantclient-basiclite
cmb69 f25bac5
only extract instantclient* directories
cmb69 f859716
fix
cmb69 11feaa2
fox
cmb69 4c2ed60
moar
cmb69 782a168
lib/
cmb69 4780094
Add CI workflows
shivammathur 7ed7e74
Fix test bug44301
shivammathur 8672e36
move linux&windows into single workflow file
mvorisek 5a74259
fix
mvorisek 703e88f
less verbose CI
mvorisek a42b94a
minor cleanup
mvorisek ac05cde
run tests on Oracle v18 as well
mvorisek e4698b3
and v11
mvorisek 8af6a19
Merge branch 'main' into ci
mvorisek a03a465
empty merge for cmb69 authorship
mvorisek b3903d4
rm php-src/ext/pdo tests for Oracle 11g
mvorisek d4d56a1
XE DB for v18
mvorisek ec400c5
add testing with Oracle v21
mvorisek fc5bbc4
better Oracle 11g fix
mvorisek bfdd140
Merge branch 'main' into ci
mvorisek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
|
||
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-11: | ||
image: wnameless/oracle-xe-11g-r2 | ||
ports: | ||
- 1511:1521 | ||
env: | ||
ORACLE_ALLOW_REMOTE: true | ||
oracle-18: | ||
image: gvenzl/oracle-xe:18-slim-faststart | ||
ports: | ||
- 1518:1521 | ||
env: | ||
ORACLE_PASSWORD: my_pass_18 | ||
options: >- | ||
--health-cmd healthcheck.sh | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 10 | ||
oracle-21: | ||
image: gvenzl/oracle-xe:21-slim-faststart | ||
ports: | ||
- 1521:1521 | ||
env: | ||
ORACLE_PASSWORD: my_pass_21 | ||
options: >- | ||
--health-cmd healthcheck.sh | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 10 | ||
oracle-23: | ||
image: gvenzl/oracle-free:23-slim | ||
ports: | ||
- 1523:1521 | ||
env: | ||
ORACLE_PASSWORD: my_pass_23 | ||
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 --no-progress-meter -O https://download.oracle.com/otn_software/linux/instantclient/instantclient-$pkg-linuxx64.zip | ||
unzip -q -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 -q 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 | ||
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 | ||
run: | | ||
phpize | ||
./configure --with-php-config=$(command -v php-config) --with-pdo-oci=instantclient,/opt/oracle/instantclient | ||
mvorisek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 /w Oracle 11 (for PHP 8.3 only) | ||
# https://github.com/php/php-src/pull/18734 | ||
# https://github.com/php/pecl-database-pdo_oci/pull/16#discussion_r2119810891 | ||
if: matrix.version == '8.3' | ||
run: php php-src/run-tests.php --show-diff --show-slow 1000 --set-timeout 120 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: oracle | ||
PDO_OCI_TEST_DSN: oci:dbname=0.0.0.0:1511/XE;charset=AL32UTF8 | ||
- name: Run tests /w Oracle 18 | ||
if: success() || failure() | ||
run: php php-src/run-tests.php --show-diff --show-slow 1000 --set-timeout 120 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: my_pass_18 | ||
PDO_OCI_TEST_DSN: oci:dbname=0.0.0.0:1518/XE;charset=AL32UTF8 | ||
- name: Run tests /w Oracle 21 | ||
if: success() || failure() | ||
run: php php-src/run-tests.php --show-diff --show-slow 1000 --set-timeout 120 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: my_pass_21 | ||
PDO_OCI_TEST_DSN: oci:dbname=0.0.0.0:1521/XE;charset=AL32UTF8 | ||
- name: Run tests /w Oracle 23 | ||
if: success() || failure() | ||
run: php php-src/run-tests.php --show-diff --show-slow 1000 --set-timeout 120 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: my_pass_23 | ||
PDO_OCI_TEST_DSN: oci:dbname=0.0.0.0:1523/FREEPDB1;charset=AL32UTF8 | ||
|
||
windows-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.extension-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Create matrix | ||
id: extension-matrix | ||
uses: php/php-windows-builder/extension-matrix@v1 | ||
with: | ||
php-version-list: '8.3, 8.4, master' | ||
|
||
windows: | ||
needs: windows-matrix | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{fromJson(needs.windows-matrix.outputs.matrix)}} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Build | ||
uses: php/php-windows-builder/extension@v1 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
arch: ${{ matrix.arch }} | ||
ts: ${{ matrix.ts }} | ||
libs: instantclient | ||
|
||
windows-release: | ||
runs-on: ubuntu-latest | ||
needs: windows | ||
if: ${{ github.event_name == 'release' }} | ||
steps: | ||
- name: Upload release artifact | ||
uses: php/php-windows-builder/release@v1 | ||
with: | ||
release: ${{ github.event.release.tag_name }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.