ODBC-475 Driver did not support SQL_POSITIONED_STATEMENTS info type #74
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
| --- | |
| name: Run CI Tests | |
| on: | |
| push: | |
| branches: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| # Run weekly on Sundays at 2 AM UTC | |
| - cron: '0 2 * * 0' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| MYSQL_TEST_HOST: mariadb.example.com | |
| MYSQL_TEST_PORT: 3306 | |
| MYSQL_TEST_USER: root | |
| MYSQL_TEST_PASSWD: "heyPassw+-_20oRd" | |
| MYSQL_TEST_DB: testo | |
| TEST_DSN: maodbc_test | |
| TEST_UID: root | |
| TEST_SERVER: mariadb.example.com | |
| TEST_PASSWORD: "heyPassw+-_20oRd" | |
| TEST_PORT: 3306 | |
| TEST_SCHEMA: testo | |
| ODBCINI: "${{ github.workspace }}/test/odbc.ini" | |
| ODBCSYSINI: ${{ github.workspace }}/test | |
| ODBCINTSTINI: ${{ github.workspace }}/test/odbcinst.ini | |
| jobs: | |
| setup: | |
| runs-on: ubuntu-latest | |
| # Only run scheduled jobs if we're on the right branch | |
| if: github.event_name != 'schedule' || contains(fromJSON('["odbc-3.1", "master"]'), github.ref_name) | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.final-matrix }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: set-matrix | |
| name: build matrix | |
| uses: mariadb-corporation/connector-ci-build-matrix@main | |
| with: | |
| 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"}]' | |
| ci: | |
| name: ${{ matrix.name }} | |
| needs: setup | |
| timeout-minutes: 50 | |
| strategy: | |
| matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} | |
| runs-on: ${{ matrix.os }} | |
| continue-on-error: ${{ matrix.continue-on-error || matrix.os == 'macos-latest' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Test Environment | |
| id: setup-env | |
| uses: mariadb-corporation/connector-ci-setup@master | |
| with: | |
| node-version: ${{ matrix.node }} | |
| db-type: ${{ matrix.db-type }} | |
| db-tag: ${{ matrix.db-tag }} | |
| test-db-password: ${{ env.MYSQL_TEST_PASSWD }} | |
| test-db-database: ${{ env.MYSQL_TEST_DB }} | |
| test-db-port: ${{ env.MYSQL_TEST_PORT }} | |
| additional-conf: ${{ matrix.additional-conf || '' }} | |
| registry-user: ${{ matrix.db-type == 'enterprise' && secrets.ENTERPRISE_USER || (secrets.DOCKER_PWD != '' && 'mariadbtest' || '') }} | |
| registry-password: ${{ matrix.db-type == 'enterprise' && secrets.ENTERPRISE_TOKEN || secrets.DOCKER_PWD }} | |
| os: ${{ matrix.os }} | |
| - name: make ubuntu | |
| if: ${{ startsWith(matrix.os, 'ubuntu') }} | |
| run: | | |
| sudo apt install unixodbc-dev | |
| cmake -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=OPENSSL . | |
| cmake --build . --config RelWithDebInfo | |
| - name: make macos | |
| if: ${{ startsWith(matrix.os, 'mac') }} | |
| run: | | |
| brew install libiodbc openssl | |
| ls -lrt /opt/homebrew/opt/libiodbc/lib | |
| TEST_DRIVER=${{ github.workspace }}/RelWithDebInfo/libmaodbc.dylib | |
| echo "TEST_DRIVER=${{ github.workspace }}/RelWithDebInfo/libmaodbc.dylib" >> $GITHUB_ENV | |
| cmake -G Xcode -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO -DWITH_SIGNCODE=OFF -DODBC_LIB_DIR=/opt/homebrew/opt/libiodbc/lib -DODBC_INCLUDE_DIR=/opt/homebrew/opt/libiodbc/include -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=OPENSSL -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -DWITH_EXTERNAL_ZLIB=On . | |
| cmake --build . --config RelWithDebInfo | |
| - name: Install WiX | |
| if: ${{ startsWith(matrix.os, 'windows') }} | |
| shell: powershell | |
| run: | | |
| choco install wixtoolset -y | |
| - name: make windows 64bit | |
| if: ${{ startsWith(matrix.os, 'windows') && (matrix.arch != '32' || !matrix.arch) }} | |
| shell: powershell | |
| run: | | |
| cmake -DCONC_WITH_MSI=OFF -DCONC_WITH_UNIT_TESTS=OFF -DWITH_MSI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_SSL=SCHANNEL . #-DDIRECT_LINK_TESTS=1 . | |
| cmake --build . --config RelWithDebInfo | |
| - name: make windows 32bit | |
| if: ${{ startsWith(matrix.os, 'windows') && startsWith(matrix.arch, '32') }} | |
| run: | | |
| 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 . | |
| cmake --build . --config RelWithDebInfo | |
| - name: Install generated MSI (Windows only) | |
| if: startsWith(matrix.os, 'windows') | |
| shell: powershell | |
| run: | | |
| $pwd= Get-Location | |
| $log= Join-Path $pwd "install.log" | |
| Write-Output $log | |
| ls ${{ github.workspace }}\packaging\windows | |
| Get-ChildItem -Path ${{ github.workspace }}\packaging\windows\mariadb-connector-odbc-*.msi | |
| foreach ($msi in Get-ChildItem -Path ${{ github.workspace }}\packaging\windows\mariadb-connector-odbc-*.msi) { | |
| $procInstall= Start-Process msiexec.exe -ArgumentList "/i $($msi.FullName) /qn /norestart /L* `"$log`"" -NoNewWindow -PassThru | |
| Start-Sleep -Milliseconds 500 | |
| if (Test-Path $log) { | |
| Get-Content -Path $log -Wait | ForEach-Object { | |
| if ($procInstall.HasExited) { break } | |
| $_ | |
| } | |
| } else { | |
| echo "Log file still does not exist" | |
| Start-Sleep -Milliseconds 500 | |
| } | |
| } | |
| Write-Host "Installer exit code: $($procInstall.ExitCode)" | |
| - name: Create 64b DSN | |
| if: ${{ startsWith(matrix.os, 'windows') && (matrix.arch != '32' || !matrix.arch) }} | |
| shell: powershell | |
| run: | | |
| Get-OdbcDriver -Platform "64-bit" | |
| Add-OdbcDsn -Name $env:TEST_DSN -DriverName "MariaDB ODBC 3.1 Driver" -DsnType "User" -SetPropertyValue @( "SERVER=$env:TEST_SERVER", "DATABASE=$env:TEST_SCHEMA", "USER=$env:TEST_UID", "PASSWORD=$env:TEST_PASSWORD", "PORT=$env:TEST_PORT" ) | |
| - name: Create 32b DSN | |
| if: ${{ startsWith(matrix.os, 'windows') && startsWith(matrix.arch, '32') }} | |
| shell: powershell | |
| run: | | |
| Get-OdbcDriver -Platform "32-bit" | |
| $powershell32b = "$env:WINDIR\SysWOW64\WindowsPowerShell\v1.0\powershell.exe" | |
| $dsn= { | |
| Add-OdbcDsn -Name $env:TEST_DSN ` | |
| -DriverName "MariaDB ODBC 3.1 Driver" ` | |
| -DsnType "User" ` | |
| -SetPropertyValue @( "SERVER=$env:TEST_SERVER", "DATABASE=$env:TEST_SCHEMA", "USER=$env:TEST_UID", "PASSWORD=$env:TEST_PASSWORD", "PORT=$env:TEST_PORT" ) | |
| } | |
| & $powershell32b -NoProfile -Command $dsn | |
| - name: Run test suite | |
| shell: bash | |
| run: | | |
| echo "$PWD" | |
| chmod 777 test | |
| ls -lrta | |
| cd ./test | |
| echo "$PWD" | |
| if [ "$DB_TYPE" = "mysql" ] ; then | |
| cp ../libmariadb/caching_sha2_password.* ../ | |
| fi | |
| if [[ "${RUNNER_OS}" == "Windows" ]]; then | |
| TEST_DRIVER="MariaDB ODBC 3.1 Driver" | |
| # INSTALLFOLDER='' | |
| ls ./RelWithDebInfo | |
| set +x | |
| #odbcconf CONFIGDSN "$TEST_DRIVER" "DSN=$TEST_DSN;SERVER=$TEST_SERVER;DATABASE=$TEST_SCHEMA;USER=$TEST_UID;PASSWORD=$TEST_PASSWORD;PORT=$TEST_PORT;$TEST_ADD_PARAM" | |
| set -ex | |
| else | |
| cat $ODBCINSTINI | |
| cat $ODBCINI | grep -v PASSWORD | |
| chmod 666 $ODBCINI $ODBCSYSINI/odbcinst.ini | |
| ls -lrt | |
| fi | |
| ctest --verbose | |
| export TEST_ADD_PARAM="STREAMRS=1;FORWARDONLY=1" | |
| ctest --output-on-failure | |
| env: | |
| DB_TYPE: ${{ matrix.db-type }} | |
| LOCAL_DB: ${{ steps.setup-env.outputs.database-type }} | |
| os: ${{ matrix.os }} | |
| TEST_DRIVER: ${{ env.TEST_DRIVER || 'maodbc_test' }} | |
| TEST_SOCKET: | |
| SSLCERT: ${{ matrix.db-type == 'container' && format('{0}/.github/workflows/certs/server.crt', github.workspace) || '' }} | |
| MARIADB_PLUGIN_DIR: ${{ github.workspace }} |