|
42 | 42 | - uses: actions/checkout@v4 |
43 | 43 | - id: set-matrix |
44 | 44 | name: build matrix |
45 | | - uses: rusher/mariadb-test-build-matrix@main |
| 45 | + uses: mariadb-corporation/connector-ci-build-matrix@main |
46 | 46 | with: |
47 | | - additional-matrix: '[]' |
| 47 | + additional-matrix: '[{"name": "MariaDB 11.4 (local) - windows 2025", "os": "windows-2025", "db-type": "community", "db-tag": "11.4"},{"name": "MariaDB 11.4 32bits (local) - windows 2025", "os": "windows-2025", "db-type": "community", "db-tag": "11.4", "arch": "32"}]' |
48 | 48 |
|
49 | 49 | ci: |
50 | 50 | name: ${{ matrix.name }} |
|
60 | 60 |
|
61 | 61 | - name: Setup Test Environment |
62 | 62 | id: setup-env |
63 | | - uses: rusher/mariadb-test-setup@master |
| 63 | + uses: mariadb-corporation/connector-ci-setup@master |
64 | 64 | with: |
65 | 65 | node-version: ${{ matrix.node }} |
66 | 66 | db-type: ${{ matrix.db-type }} |
@@ -97,37 +97,66 @@ jobs: |
97 | 97 | run: | |
98 | 98 | choco install wixtoolset -y |
99 | 99 |
|
100 | | - - name: make windows |
101 | | - if: ${{ startsWith(matrix.os, 'windows') }} |
| 100 | + - name: make windows 64bit |
| 101 | + if: ${{ startsWith(matrix.os, 'windows') && (matrix.arch != '32' || !matrix.arch) }} |
102 | 102 | shell: powershell |
103 | 103 | run: | |
104 | 104 | cmake -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DWITH_MSI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=SCHANNEL . #-DDIRECT_LINK_TESTS=1 . |
105 | 105 | cmake --build . --config RelWithDebInfo |
106 | 106 |
|
| 107 | + - name: make windows 32bit |
| 108 | + if: ${{ startsWith(matrix.os, 'windows') && startsWith(matrix.arch, '32') }} |
| 109 | + run: | |
| 110 | + cmake -A Win32 -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DWITH_MSI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=SCHANNEL . #-DDIRECT_LINK_TESTS=1 . |
| 111 | + cmake --build . --config RelWithDebInfo |
| 112 | +
|
107 | 113 | - name: Install generated MSI (Windows only) |
108 | 114 | if: startsWith(matrix.os, 'windows') |
109 | 115 | shell: powershell |
110 | 116 | run: | |
111 | | - pwd |
112 | | - echo "--------------" |
113 | | - ls ${{ github.workspace }}\packaging\windows\*.msi |
114 | | - echo "--------------" |
| 117 | + $pwd= Get-Location |
| 118 | + $log= Join-Path $pwd "install.log" |
| 119 | + Write-Output $log |
| 120 | + ls ${{ github.workspace }}\packaging\windows |
115 | 121 | Get-ChildItem -Path ${{ github.workspace }}\packaging\windows\mariadb-connector-odbc-*.msi |
116 | | - echo "--------------" |
117 | | - $log = "install.log" |
118 | 122 | foreach ($msi in Get-ChildItem -Path ${{ github.workspace }}\packaging\windows\mariadb-connector-odbc-*.msi) { |
119 | 123 | echo $msi |
120 | 124 | echo "--------------" |
121 | | - Start-Process msiexec.exe -ArgumentList "/i $($msi.FullName) /qn /norestart" -NoNewWindow -PassThru |
122 | | - #$procLog = Start-Process "powershell" "Get-Content -Path `"$log`" -Wait" -NoNewWindow -PassThru |
123 | | - #$procMain.WaitForExit() |
124 | | - #$procLog.Kill() |
| 125 | + $procInstall= Start-Process msiexec.exe -ArgumentList "/i $($msi.FullName) /qn /norestart /L* `"$log`"" -NoNewWindow -PassThru |
| 126 | + Start-Sleep -Milliseconds 500 |
| 127 | + if (Test-Path $log) { |
| 128 | + Get-Content -Path $log -Wait | ForEach-Object { |
| 129 | + if ($procInstall.HasExited) { break } |
| 130 | + $_ |
| 131 | + } |
| 132 | + } else { |
| 133 | + echo "Log file still does not exist" |
| 134 | + Start-Sleep -Milliseconds 500 |
| 135 | + } |
125 | 136 | } |
126 | | - echo "==========" |
127 | | - Start-Sleep -Milliseconds 300 |
| 137 | + Write-Host "Installer exit code: $($procInstall.ExitCode)" |
| 138 | +
|
| 139 | + - name: Create 64b DSN |
| 140 | + if: ${{ startsWith(matrix.os, 'windows') && (matrix.arch != '32' || !matrix.arch) }} |
| 141 | + shell: powershell |
| 142 | + run: | |
128 | 143 | Get-OdbcDriver -Platform "64-bit" |
129 | 144 | Add-OdbcDsn -Name $env:TEST_DSN -DriverName "MariaDB ODBC 3.2 Driver" -DsnType "User" -SetPropertyValue @( "SERVER=$env:TEST_SERVER", "DATABASE=$env:TEST_SCHEMA", "USER=$env:TEST_UID", "PASSWORD=$env:TEST_PASSWORD", "PORT=$env:TEST_PORT" ) |
130 | 145 |
|
| 146 | + - name: Create 32b DSN |
| 147 | + if: ${{ startsWith(matrix.os, 'windows') && startsWith(matrix.arch, '32') }} |
| 148 | + shell: powershell |
| 149 | + run: | |
| 150 | + Get-OdbcDriver -Platform "32-bit" |
| 151 | + $powershell32b = "$env:WINDIR\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" |
| 152 | + $dsn= { |
| 153 | + Add-OdbcDsn -Name $env:TEST_DSN ` |
| 154 | + -DriverName "MariaDB ODBC 3.1 Driver" ` |
| 155 | + -DsnType "User" ` |
| 156 | + -SetPropertyValue @( "SERVER=$env:TEST_SERVER", "DATABASE=$env:TEST_SCHEMA", "USER=$env:TEST_UID", "PASSWORD=$env:TEST_PASSWORD", "PORT=$env:TEST_PORT" ) |
| 157 | + } |
| 158 | + & $powershell32b -NoProfile -Command $dsn |
| 159 | +
|
131 | 160 | - name: Run test suite |
132 | 161 | shell: bash |
133 | 162 | run: | |
|
0 commit comments