-
Notifications
You must be signed in to change notification settings - Fork 54
69 lines (65 loc) · 2.03 KB
/
main.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
on: [ push, pull_request, workflow_dispatch ]
permissions:
contents: read
jobs:
Test:
strategy:
matrix:
platform: [
{ cc: gcc, MAKE_EXTRAFLAGS: "AM_MAKEFLAGS=CFLAGS=-Werror" },
{ cc: clang, MAKE_EXTRAFLAGS: "" }
]
fail-fast: false
name: ${{ matrix.platform.cc }}
runs-on: ubuntu-24.04
services:
postgres:
image: postgres
env:
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_DB: test_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
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 odbc-mariadb odbc-postgresql
- name: configure
run: |
autoreconf -iv
CC=${{ matrix.platform.cc }} CFLAGS="-ggdb -fsanitize=address" ./configure --prefix=/usr
- name: build
run: |
make ${{ matrix.platform.MAKE_EXTRAFLAGS }}
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
- name: postgres smoke test
run: |
./exe/.libs/odbcinst -i -s -h -f .github/postgres_odbc.ini
echo 'SELECT VERSION();' | ./exe/.libs/isql -v PostgreSQL-server -b