Skip to content

[Test-Only]

[Test-Only] #11662

Workflow file for this run

name: ODBC Tests
on: [push, pull_request]
jobs:
run-babelfish-odbc-tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
id: checkout
- name: Install Dependencies
id: install-dependencies
if: always()
uses: ./.github/composite-actions/install-dependencies
- name: Build Modified Postgres
id: build-modified-postgres
if: always() && steps.install-dependencies.outcome == 'success'
uses: ./.github/composite-actions/build-modified-postgres
- name: Compile ANTLR
id: compile-antlr
if: always() && steps.build-modified-postgres.outcome == 'success'
uses: ./.github/composite-actions/compile-antlr
- name: Build Extensions
id: build-extensions
if: always() && steps.compile-antlr.outcome == 'success'
uses: ./.github/composite-actions/build-extensions
- name: Install Extensions
id: install-extensions
if: always() && steps.build-extensions.outcome == 'success'
uses: ./.github/composite-actions/install-extensions
- name: Install SQL Server ODBC Driver
id: install-sql-server-odbc-driver
if: steps.install-extensions.outcome == 'success'
run: |
cd ~
sudo apt-get install msodbcsql17
- name: Install unixODBC Driver
id: install-unix-odbc-driver
if: steps.install-extensions.outcome == 'success'
run: |
cd ~
wget http://www.unixodbc.org/unixODBC-2.3.11.tar.gz
gunzip unixODBC*.tar.gz
tar xvf unixODBC*.tar
cd unixODBC-2.3.11
./configure
make
sudo make install
- name: Install psqlODBC Driver
id: install-psql-odbc-driver
if: steps.install-extensions.outcome == 'success' && steps.install-unix-odbc-driver.outcome=='success'
run: |
cd ~
wget https://ftp.postgresql.org/pub/odbc/versions/src/psqlodbc-16.00.0000.tar.gz
tar -zxvf psqlodbc-16.00.0000.tar.gz
cd psqlodbc-16.00.0000
./configure
sudo make
sudo make install
echo '[ODBC_Driver_16_for_PostgreSQL]' | sudo tee -a /etc/odbcinst.ini > /dev/null
echo 'Description=ODBC Driver 16 for PostgreSQL Server' | sudo tee -a /etc/odbcinst.ini > /dev/null
echo 'Driver=/usr/local/lib/psqlodbcw.so' | sudo tee -a /etc/odbcinst.ini > /dev/null
echo 'UsageCount=1' | sudo tee -a /etc/odbcinst.ini > /dev/null
- name: Run ODBC Tests
if: steps.install-sql-server-odbc-driver.outcome == 'success' && steps.install-psql-odbc-driver.outcome == 'success'
run: |
cd test/odbc
cmake -S . -B build
cmake --build build
MSSQL_ODBC_DRIVER_NAME="ODBC Driver 17 for SQL Server" \
MSSQL_BABEL_DB_SERVER=localhost \
MSSQL_BABEL_DB_PORT=1433 \
MSSQL_BABEL_DB_USER=jdbc_user \
MSSQL_BABEL_DB_PASSWORD=12345678 \
MSSQL_BABEL_DB_NAME=master \
PSQL_ODBC_DRIVER_NAME=ODBC_Driver_16_for_PostgreSQL \
PSQL_BABEL_DB_SERVER=localhost \
PSQL_BABEL_DB_PORT=5432 \
PSQL_BABEL_DB_USER=jdbc_user \
PSQL_BABEL_DB_PASSWORD=12345678 \
PSQL_BABEL_DB_NAME=jdbc_testdb \
./build/main