Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build and Test
on: [push, pull_request]
jobs:
ubuntu:
strategy:
matrix:
version: ['8.3']
runs-on: ubuntu-latest
steps:
- name: Setup Instantclient and SDK
run: |
curl -O https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
unzip instantclient-sdk-linuxx64.zip 'instantclient*/*'
mv instantclient_* instantclient
curl -O https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
unzip instantclient-basiclite-linuxx64.zip 'instantclient*/*'
mv instantclient_* instantclient/sdk/lib
- name: Show directory structure
run: |
echo ${{github.workspace}}
pwd
tree instantclient
- name: Checkout pdo_oci
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.version}}
- name: Build pdo_oci
run: |
phpize
./configure --with-pdo-oci=instantclient,${{github.workspace}}/instantclient/sdk/
make
# - name: Test pdo_oci
# run: make test TESTS=tests
windows:
defaults:
run:
shell: cmd
strategy:
matrix:
version: ['8.3']
arch: [x64]
ts: [ts]
runs-on: windows-2022
steps:
- name: Checkout pdo_oci
uses: actions/checkout@v4
- name: Setup PHP
id: setup-php
uses: php/[email protected]
with:
version: ${{matrix.version}}
arch: ${{matrix.arch}}
ts: ${{matrix.ts}}
- name: Install OCI
run: powershell .github/workflows/install-oci.ps1 -arch ${{matrix.arch}}
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
toolset: ${{steps.setup-php.outputs.toolset}}
- name: phpize
run: phpize
- name: configure
run: configure --with-pdo-oci=instantclient\sdk,shared --with-prefix=${{steps.setup-php.outputs.prefix}}
- name: make
run: nmake
- name: Run smoke test
run: deplister ext\php_pdo_oci.dll | grep OCI
11 changes: 11 additions & 0 deletions .github/workflows/install-oci.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
param (
[Parameter(Mandatory)] $arch
)

$ErrorActionPreference = "Stop"

$suffix = if ($arch -eq "x64") {"windows"} else {"nt"}
$url = "https://download.oracle.com/otn_software/nt/instantclient/instantclient-sdk-$suffix.zip"
Invoke-WebRequest $url -OutFile "instantclient-sdk.zip"
7z x "instantclient-sdk.zip"
Move-Item "instantclient_*" "instantclient"