-
Notifications
You must be signed in to change notification settings - Fork 92
90 lines (80 loc) · 3.33 KB
/
odbc-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
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