feat: enable OTP and Push MFA for Okta #413
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: Compatibility Test - PostgreSQL | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| - '**/*.jpg' | |
| - '**/*.png' | |
| - '**/README.*' | |
| - '**/LICENSE.*' | |
| - 'docs/**' | |
| - 'ISSUE_TEMPLATE/**' | |
| env: | |
| BUILD_CONFIG: Release | |
| WIX_VERSION: 5.0.2 | |
| DRIVER_NAME_ANSI: 'AWS Advanced ODBC Wrapper Ansi' | |
| DRIVER_NAME_UNICODE: 'AWS Advanced ODBC Wrapper Unicode' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-win-psqlodbc: | |
| name: Windows - Build psqlODBC | |
| runs-on: windows-latest | |
| steps: | |
| - name: Retrieve psqlODBC Cache | |
| id: cache-psqlodbc | |
| uses: actions/cache@v4 | |
| with: | |
| path: psqlodbc | |
| key: ${{ runner.os }}-psqlodbc-driver | |
| - name: Download psqlODBC | |
| if: ${{steps.cache-psqlodbc.outputs.cache-hit != 'true'}} | |
| run: | | |
| mkdir psqlodbc | |
| cd psqlodbc | |
| $DOWNLOAD_URL=$(gh api repos/postgresql-interfaces/psqlodbc/releases --jq '.[0].assets.[] | select(.name=="psqlodbc_x64.msi") | .browser_download_url') | |
| curl.exe -L ${DOWNLOAD_URL} --output psqlodbc_x64.msi | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| build-macos-psqlodbc: | |
| name: MacOS - Build psqlODBC | |
| runs-on: macos-15 | |
| steps: | |
| - name: Retrieve psqlODBC Cache | |
| id: cache-psqlodbc | |
| uses: actions/cache@v4 | |
| with: | |
| path: psqlodbc/.libs/ | |
| key: ${{ runner.os }}-psqlodbc-driver | |
| - name: Checkout psqlODBC | |
| if: ${{steps.cache-psqlodbc.outputs.cache-hit != 'true'}} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: postgresql-interfaces/psqlodbc | |
| path: psqlodbc | |
| - name: Install Dependencies | |
| if: ${{steps.cache-psqlodbc.outputs.cache-hit != 'true'}} | |
| run: | | |
| brew update && brew upgrade && brew cleanup | |
| brew install gcc autoconf automake unixodbc libtool postgresql icu4c | |
| - name: Build psqlodbc | |
| if: ${{steps.cache-psqlodbc.outputs.cache-hit != 'true'}} | |
| working-directory: psqlodbc | |
| run: | | |
| ./bootstrap | |
| ./configure | |
| make | |
| build-linux-psqlodbc: | |
| name: Linux Ubuntu - Build psqlODBC | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Retrieve psqlODBC Cache | |
| id: cache-psqlodbc | |
| uses: actions/cache@v4 | |
| with: | |
| path: psqlodbc/.libs/ | |
| key: ${{ runner.os }}-psqlodbc-driver | |
| - name: Checkout psqlODBC | |
| if: ${{steps.cache-psqlodbc.outputs.cache-hit != 'true'}} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: postgresql-interfaces/psqlodbc | |
| path: psqlodbc | |
| - name: Install Dependencies | |
| if: ${{steps.cache-psqlodbc.outputs.cache-hit != 'true'}} | |
| run: | | |
| sudo apt update | |
| sudo apt-get install autoconf automake libtool postgresql libpq-dev | |
| - name: Download & Build unixODBC | |
| if: ${{steps.cache-psqlodbc.outputs.cache-hit != 'true'}} | |
| run: | | |
| curl -L https://www.unixodbc.org/unixODBC-2.3.12.tar.gz -o unixODBC.tar | |
| tar xf unixODBC.tar | |
| cd unixODBC-2.3.12 | |
| ./configure && make | |
| sudo make install | |
| - name: Build psqlodbc | |
| if: ${{steps.cache-psqlodbc.outputs.cache-hit != 'true'}} | |
| working-directory: psqlodbc | |
| run: | | |
| ./bootstrap | |
| ./configure | |
| make | |
| test-win-compat: | |
| name: Windows - Compatibility Test | |
| needs: [build-win-psqlodbc] | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout aws-advanced-odbc-wrapper | |
| uses: actions/checkout@v4 | |
| - name: Retrieve AWS SDK for C++ Cache | |
| id: cache-aws-sdk | |
| uses: actions/cache@v4 | |
| with: | |
| path: aws_sdk/install | |
| key: ${{ runner.os }}-aws-sdk-cpp-${{env.BUILD_CONFIG}}-shared | |
| - name: Build AWS SDK for C++ | |
| if: ${{steps.cache-aws-sdk.outputs.cache-hit != 'true'}} | |
| run: | | |
| ./scripts/compile_aws_sdk_win.ps1 ${{env.BUILD_CONFIG}} | |
| - name: Setup Dotnet for WiX | |
| uses: actions/setup-dotnet@v4 | |
| - name: Install WiX | |
| shell: cmd | |
| run: | | |
| dotnet tool install --global wix --version ${{env.WIX_VERSION}} | |
| wix extension add --global WixToolset.UI.wixext/${{env.WIX_VERSION}} | |
| - name: Run build installer script | |
| shell: pwsh | |
| run: | | |
| ./installer/build_installer.ps1 ${{env.BUILD_CONFIG}} | |
| - name: Retrieve psqlODBC Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: psqlodbc | |
| key: ${{ runner.os }}-psqlodbc-driver | |
| fail-on-cache-miss: true | |
| - name: Install psqlODBC Driver | |
| shell: pwsh | |
| working-directory: psqlodbc | |
| run: | | |
| Start-Process msiexec "/i psqlodbc_x64.msi /quiet /norestart" -Wait; | |
| - name: Install driver | |
| shell: pwsh | |
| working-directory: installer | |
| run: Start-Process msiexec "/lp! .\test.log /i aws-advanced-odbc-wrapper.msi /quiet /norestart" -Wait; | |
| - name: Setup Local PostgreSQL Server | |
| uses: ikalnytskyi/action-setup-postgres@v7 | |
| with: | |
| username: postgres | |
| password: password | |
| database: test_db | |
| port: 5432 | |
| postgres-version: 17 | |
| ssl: true | |
| - name: Build Compatibility Tests | |
| run: | | |
| cmake -S test/compatibility -B build_test | |
| cmake --build build_test --config ${{env.BUILD_CONFIG}} | |
| - name: Install Ansi DSNs | |
| shell: pwsh | |
| run: | | |
| Add-OdbcDsn -Name wrapper-dsn ` | |
| -DriverName "${{ env.DRIVER_NAME_ANSI }}" ` | |
| -DsnType User ` | |
| -SetPropertyValue ` | |
| @("RDS_AUTH_TYPE=database", ` | |
| "Server=localhost", ` | |
| "Port=5432", ` | |
| "SSLMode=prefer", ` | |
| "BASE_DRIVER=C:\Program Files\psqlODBC\1700\bin\podbc30a.dll") | |
| - name: Configure Base DSN | |
| run: | | |
| Add-OdbcDsn -Name pg-dsn ` | |
| -DriverName "PostgreSQL ANSI(x64)" ` | |
| -DsnType User ` | |
| -SetPropertyValue ` | |
| @( ` | |
| "SERVER=localhost", ` | |
| "PORT=5432") ` | |
| - name: Run Compatibility Tests | |
| run: | | |
| ./build_test/${{env.BUILD_CONFIG}}/compatibility-test | |
| env: | |
| TEST_SERVER: localhost | |
| TEST_PORT: '5432' | |
| TEST_DSN: wrapper-dsn | |
| TEST_DATABASE: test_db | |
| TEST_USERNAME: postgres | |
| TEST_PASSWORD: password | |
| TEST_BASE_DRIVER: C:\Program Files\psqlODBC\1700\bin\podbc30a.dll | |
| TEST_BASE_DSN: pg-dsn | |
| - name: Compare Test Results | |
| run: | | |
| python3 -m venv venv | |
| .\venv\Scripts\Activate.ps1 | |
| pip3 install deepdiff | |
| python test/compatibility/compare_results.py wrapper-dsn pg-dsn | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: odbc-api-compatibility-test-results-windows | |
| path: | | |
| wrapper-dsn/ | |
| pg-dsn/ | |
| test-macos-compat: | |
| name: MacOS - Compatibility Test | |
| needs: [build-macos-psqlodbc] | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout aws-advanced-odbc-wrapper | |
| uses: actions/checkout@v4 | |
| - name: Install Build Dependencies | |
| run: | | |
| brew update && brew upgrade && brew cleanup | |
| brew install cmake unixodbc postgresql curl openssl zlib icu4c | |
| - name: Retrieve AWS SDK for C++ Cache | |
| id: cache-aws-sdk | |
| uses: actions/cache@v4 | |
| with: | |
| path: aws_sdk/install | |
| key: ${{ runner.os }}-aws-sdk-cpp-${{env.BUILD_CONFIG}}-shared | |
| - name: Build AWS SDK for C++ | |
| if: ${{steps.cache-aws-sdk.outputs.cache-hit != 'true'}} | |
| run: | | |
| export SDKROOT="$(xcrun --sdk macosx --show-sdk-path)" | |
| ./scripts/compile_aws_sdk_unix.sh ${{env.BUILD_CONFIG}} | |
| - name: Build aws-advanced-odbc-wrapper | |
| run: | | |
| cmake -S . -B build -DBUILD_UNICODE=OFF -DBUILD_UNIT_TEST=OFF -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/ | |
| cmake --build build | |
| - name: Retrieve psqlODBC Cache | |
| id: cache-psqlodbc | |
| uses: actions/cache@v4 | |
| with: | |
| path: psqlodbc/.libs/ | |
| key: ${{ runner.os }}-psqlodbc-driver | |
| fail-on-cache-miss: true | |
| - name: Setup Local PostgreSQL Server | |
| uses: ikalnytskyi/action-setup-postgres@v7 | |
| with: | |
| username: postgres | |
| password: password | |
| database: test_db | |
| port: 5432 | |
| postgres-version: 17 | |
| ssl: true | |
| - name: Build Compatibility Tests for PostgreSQL | |
| run: | | |
| cmake -S test/compatibility -B test-compatibility \ | |
| -DTEST_SERVER="localhost" \ | |
| -DTEST_PORT="5432" \ | |
| -DTEST_DATABASE="test_db" \ | |
| -DTEST_DRIVER_PATH="${{ github.workspace }}/build/driver/aws-advanced-odbc-wrapper-a.dylib" \ | |
| -DBASE_PG_DRIVER_PATH="${{ github.workspace }}/psqlodbc/.libs/psqlodbca.so" | |
| cmake --build test-compatibility | |
| - name: Run Compatibility Tests | |
| run: | | |
| ./test-compatibility/compatibility-test | |
| env: | |
| TEST_SERVER: localhost | |
| TEST_PORT: '5432' | |
| TEST_DSN: wrapper-dsn | |
| TEST_DATABASE: test_db | |
| TEST_USERNAME: postgres | |
| TEST_PASSWORD: password | |
| TEST_BASE_DRIVER: ${{ github.workspace }}/psqlodbc/.libs/psqlodbca.so | |
| TEST_BASE_DSN: pg-dsn | |
| ODBCINI: "${{ github.workspace }}/test/resources/odbc.ini" | |
| ODBCINST: "${{ github.workspace }}/test/resources/odbcinst.ini" | |
| - name: Compare Test Results | |
| run: | | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| pip3 install deepdiff | |
| python3 test/compatibility/compare_results.py wrapper-dsn pg-dsn | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: odbc-api-compatibility-test-results-macos | |
| path: | | |
| wrapper-dsn/ | |
| pg-dsn/ | |
| test-linux-compat: | |
| name: Linux Ubuntu - Compatibility Test | |
| needs: [build-linux-psqlodbc] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout aws-advanced-odbc-wrapper | |
| uses: actions/checkout@v4 | |
| - name: Install Build Dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt-get install cmake libcurl4-openssl-dev libssl-dev odbcinst unixodbc-dev uuid-dev zlib1g-dev libicu-dev | |
| - name: Retrieve AWS SDK for C++ Cache | |
| id: cache-aws-sdk | |
| uses: actions/cache@v4 | |
| with: | |
| path: aws_sdk/install | |
| key: ${{ runner.os }}-aws-sdk-cpp-${{env.BUILD_CONFIG}}-shared | |
| - name: Build AWS SDK for C++ | |
| if: ${{steps.cache-aws-sdk.outputs.cache-hit != 'true'}} | |
| run: | | |
| ./scripts/compile_aws_sdk_unix.sh ${{env.BUILD_CONFIG}} | |
| - name: Build aws-advanced-odbc-wrapper | |
| run: | | |
| cmake -S . -B build -DBUILD_UNICODE=OFF -DBUILD_UNIT_TEST=OFF | |
| cmake --build build | |
| - name: Retrieve psqlODBC Cache | |
| id: cache-psqlodbc | |
| uses: actions/cache@v4 | |
| with: | |
| path: psqlodbc/.libs/ | |
| key: ${{ runner.os }}-psqlodbc-driver | |
| fail-on-cache-miss: true | |
| - name: Setup Local PostgreSQL Server | |
| uses: ikalnytskyi/action-setup-postgres@v7 | |
| with: | |
| username: postgres | |
| password: password | |
| database: test_db | |
| port: 5432 | |
| postgres-version: 17 | |
| ssl: true | |
| - name: Build Compatibility Tests for PostgreSQL | |
| run: | | |
| cmake -S test/compatibility -B test-compatibility \ | |
| -DTEST_SERVER="localhost" \ | |
| -DTEST_PORT="5432" \ | |
| -DTEST_DATABASE="test_db" \ | |
| -DTEST_DRIVER_PATH="${{ github.workspace }}/build/driver/aws-advanced-odbc-wrapper-a.so" \ | |
| -DBASE_PG_DRIVER_PATH="${{ github.workspace }}/psqlodbc/.libs/psqlodbca.so" | |
| cmake --build test-compatibility | |
| - name: Run Compatibility Tests | |
| run: | | |
| ./test-compatibility/compatibility-test | |
| env: | |
| TEST_SERVER: localhost | |
| TEST_PORT: '5432' | |
| TEST_DSN: wrapper-dsn | |
| TEST_DATABASE: test_db | |
| TEST_USERNAME: postgres | |
| TEST_PASSWORD: password | |
| TEST_BASE_DRIVER: ${{ github.workspace }}/psqlodbc/.libs/psqlodbca.so | |
| TEST_BASE_DSN: pg-dsn | |
| ODBCINI: "${{ github.workspace }}/test/resources/odbc.ini" | |
| ODBCINST: "${{ github.workspace }}/test/resources/odbcinst.ini" | |
| - name: Compare Test Results | |
| run: | | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| pip3 install deepdiff | |
| python3 test/compatibility/compare_results.py wrapper-dsn pg-dsn | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: odbc-api-compatibility-test-results-linux | |
| path: | | |
| wrapper-dsn/ | |
| pg-dsn/ |