Skip to content

Commit ef8ed69

Browse files
committed
WIP IIIb
1 parent 4b46bbc commit ef8ed69

File tree

3 files changed

+93
-9
lines changed

3 files changed

+93
-9
lines changed

.github/scripts/windows/test_task.bat

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ if not exist "%DEPS_DIR%" (
2323
)
2424

2525
if /i "%APPVEYOR%" equ "True" (
26-
set MYSQL_PWD=Password12!
27-
set MYSQL_TEST_PASSWD=%MYSQL_PWD%
28-
set MYSQL_TEST_USER=root
2926
set MYSQL_TEST_HOST=127.0.0.1
3027
set MYSQL_TEST_PORT=3306
31-
set PDO_MYSQL_TEST_USER=%MYSQL_TEST_USER%
32-
set PDO_MYSQL_TEST_PASS=%MYSQL_PWD%
28+
set MYSQL_TEST_USER=root
29+
set MYSQL_TEST_PASSWD=Password12!
3330
set PDO_MYSQL_TEST_HOST=%MYSQL_TEST_HOST%
3431
set PDO_MYSQL_TEST_PORT=%MYSQL_TEST_PORT%
32+
set PDO_MYSQL_TEST_USER=%MYSQL_TEST_USER%
33+
set PDO_MYSQL_TEST_PASS=%MYSQL_TEST_PASSWD%
3534
set PDO_MYSQL_TEST_DSN=mysql:host=%PDO_MYSQL_TEST_HOST%;port=%PDO_MYSQL_TEST_PORT%;dbname=test
3635
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" --user=%MYSQL_TEST_USER% -e "CREATE DATABASE IF NOT EXISTS test"
3736
if %errorlevel% neq 0 exit /b 3
@@ -49,6 +48,32 @@ if /i "%APPVEYOR%" equ "True" (
4948
set ODBC_TEST_DSN=Driver={ODBC Driver 13 for SQL Server};Server=^(local^)\SQL2017;Database=master;uid=%ODBC_TEST_USER%;pwd=%ODBC_TEST_PASS%
5049
set PDOTEST_DSN=odbc:%ODBC_TEST_DSN%
5150
)
51+
if /i "%GITHUB_ACTIONS%" equ "True" (
52+
set MYSQL_TEST_HOST=127.0.0.1
53+
set MYSQL_TEST_PORT=3307
54+
set MYSQL_TEST_USER=root
55+
set MYSQL_TEST_PASSWD=mysql_Pass11
56+
set PDO_MYSQL_TEST_HOST=%MYSQL_TEST_HOST%
57+
set PDO_MYSQL_TEST_PORT=%MYSQL_TEST_PORT%
58+
set PDO_MYSQL_TEST_USER=%MYSQL_TEST_USER%
59+
set PDO_MYSQL_TEST_PASS=%MYSQL_TEST_PASSWD%
60+
set PDO_MYSQL_TEST_DSN=mysql:host=%PDO_MYSQL_TEST_HOST%;port=%PDO_MYSQL_TEST_PORT%;dbname=test
61+
"C:\Program Files\MySql\MySQL Server 5.7\bin\mysql.exe" --user=%MYSQL_TEST_USER% -e "CREATE DATABASE IF NOT EXISTS test"
62+
if %errorlevel% neq 0 exit /b 3
63+
64+
set PGUSER=postgres
65+
set PGPASSWORD=postgresql_Pass11
66+
rem set PGSQL_TEST_CONNSTR=host=127.0.0.1 dbname=test port=5432 user=%PGUSER% password=%PGPASSWORD%
67+
echo ^<?php $conn_str = "host=127.0.0.1 dbname=test port=5432 user=%PGUSER% password=%PGPASSWORD%"; ?^> >> ext\pgsql\tests\config.inc
68+
set PDO_PGSQL_TEST_DSN=pgsql:host=127.0.0.1 port=5432 dbname=test user=%PGUSER% password=%PGPASSWORD%
69+
"C:\Program Files\PostgreSQL\10\bin\createdb.exe" test
70+
if %errorlevel% neq 0 exit /b 3
71+
72+
set ODBC_TEST_USER=sa
73+
set ODBC_TEST_PASS=mssql_Pass11
74+
set ODBC_TEST_DSN=Driver={ODBC Driver 13 for SQL Server};Server=^(local^)\SQLEXPRESS;Database=master;uid=%ODBC_TEST_USER%;pwd=%ODBC_TEST_PASS%
75+
set PDOTEST_DSN=odbc:%ODBC_TEST_DSN%
76+
)
5277

5378
rem prepare for ext/openssl
5479
rmdir /s /q C:\OpenSSL-Win32 >NUL 2>NUL

.github/workflows/nightly.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,3 +584,49 @@ jobs:
584584
withMysqli: ${{ matrix.branch.ref == 'PHP-8.1' }}
585585
- name: Verify generated files are up to date
586586
uses: ./.github/actions/verify-generated-files
587+
WINDOWS:
588+
needs: GENERATE_MATRIX
589+
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
590+
strategy:
591+
fail-fast: false
592+
matrix:
593+
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
594+
x64: [true, false]
595+
zts: [true, false]
596+
name: "${{ matrix.branch.name }}_WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
597+
runs-on: windows-2019
598+
env:
599+
APPVEYOR_REPO_BRANCH: "${{ github.ref_name }}"
600+
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
601+
PHP_BUILD_OBJ_DIR: c:\obj
602+
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
603+
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0
604+
PHP_BUILD_CRT: vs16
605+
PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }}
606+
THREAD_SAFE: "${{ matrix.zts && '1' || '' }}"
607+
INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}"
608+
steps:
609+
- name: git checkout 1/2
610+
run: git config --global core.autocrlf false && git config --global core.eol lf
611+
- name: git checkout 2/2
612+
uses: actions/checkout@v2
613+
with:
614+
ref: ${{ matrix.branch.ref }}
615+
- name: Setup MySQL
616+
run: |
617+
choco install mysql -y --params="/port:3307"
618+
mysql.exe --port=3307 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'mysql_Pass11'; FLUSH PRIVILEGES;"
619+
mysql.exe --port=3307 --user=root --password="mysql_Pass11" -e "SELECT 1;"
620+
- name: Setup MSSQL
621+
run: |
622+
choco install sql-server-express -y --install-arguments="/SECURITYMODE=SQL /SAPWD=mssql_Pass11"
623+
sqlcmd -S "(local)\SQLEXPRESS" -U sa -P "mssql_Pass11" -Q "SELECT 1;"
624+
- name: Setup PostgreSQL
625+
run: |
626+
Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running
627+
pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'postgresql_Pass11';" }
628+
pwsh -Command { $env:PGPASSWORD="postgresql_Pass11"; & "$env:PGBIN\psql" -U postgres -c "SELECT 1;" }
629+
- name: Build
630+
run: .github/scripts/windows/build.bat
631+
- name: Test
632+
run: .github/scripts/windows/test.bat

.github/workflows/push.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
- '**'
2020
jobs:
2121
LINUX_X64:
22+
if: false
2223
strategy:
2324
fail-fast: false
2425
matrix:
@@ -131,17 +132,15 @@ jobs:
131132
-d opcache.jit_buffer_size=16M
132133
- name: Verify generated files are up to date
133134
uses: ./.github/actions/verify-generated-files
134-
WINDOWS_X64:
135+
WINDOWS:
135136
strategy:
136137
fail-fast: false
137138
matrix:
138139
include:
139140
- x64: true
140141
zts: false
141-
- x64: true
142-
zts: true
143142
- x64: false
144-
zts: false
143+
zts: true
145144
name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}"
146145
runs-on: windows-2019
147146
env:
@@ -159,6 +158,20 @@ jobs:
159158
run: git config --global core.autocrlf false && git config --global core.eol lf
160159
- name: git checkout 2/2
161160
uses: actions/checkout@v2
161+
- name: Setup MySQL
162+
run: |
163+
choco install mysql -y --params="/port:3307"
164+
mysql.exe --port=3307 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'mysql_Pass11'; FLUSH PRIVILEGES;"
165+
mysql.exe --port=3307 --user=root --password="mysql_Pass11" -e "SELECT 1;"
166+
- name: Setup MSSQL
167+
run: |
168+
choco install sql-server-express -y --install-arguments="/SECURITYMODE=SQL /SAPWD=mssql_Pass11"
169+
sqlcmd -S "(local)\SQLEXPRESS" -U sa -P "mssql_Pass11" -Q "SELECT 1;"
170+
- name: Setup PostgreSQL
171+
run: |
172+
Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running
173+
pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'postgresql_Pass11';" }
174+
pwsh -Command { $env:PGPASSWORD="postgresql_Pass11"; & "$env:PGBIN\psql" -U postgres -c "SELECT 1;" }
162175
- name: Build
163176
run: .github/scripts/windows/build.bat
164177
- name: Test

0 commit comments

Comments
 (0)