Skip to content

Commit

Permalink
CI: smoke test against mariadb odbc
Browse files Browse the repository at this point in the history
  • Loading branch information
chipitsine committed Oct 7, 2024
1 parent a9a66e6 commit 0193e99
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/MariaDB_odbc_data_source_template.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[MariaDB-server]
Description=MariaDB server
Driver=MariaDB ODBC 3.0 Driver
SERVER=127.0.0.1
USER=test_user
PASSWORD=test_password
DATABASE=test_db
PORT=3306
3 changes: 3 additions & 0 deletions .github/MariaDB_odbc_driver_template.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[MariaDB ODBC 3.0 Driver]
Description = MariaDB Connector/ODBC v.3.0
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
28 changes: 25 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on: [ push, workflow_dispatch ]
on: [ push, pull_request, workflow_dispatch ]

permissions:
contents: read
Expand All @@ -11,17 +11,39 @@ jobs:
fail-fast: false
name: ${{ matrix.cc }}
runs-on: ubuntu-24.04
services:
mariadb:
image: mariadb:latest
env:
MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: test_db
MYSQL_USER: test_user
MYSQL_PASSWORD: test_password
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306
steps:
- uses: actions/checkout@v4
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y libltdl-dev
sudo apt-get install -y libltdl-dev odbc-mariadb
- name: configure
run: |
autoreconf -iv
CC=${{ matrix.cc }} ./configure
CC=${{ matrix.cc }} CFLAGS="-ggdb -fsanitize=address" ./configure --prefix=/ --exec-prefix=/
- name: build
run: |
##make AM_MAKEFLAGS=CFLAGS=-Werror
make
sudo make install
- name: mariadb smoke test
run: |
sudo -E ./exe/.libs/odbcinst -i -d -f .github/MariaDB_odbc_driver_template.ini
./exe/.libs/odbcinst -i -s -h -f .github/MariaDB_odbc_data_source_template.ini
echo 'SELECT VERSION();' | ./exe/.libs/isql -v MariaDB-server -b

0 comments on commit 0193e99

Please sign in to comment.