Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24_1 CI updates #17

Merged
merged 10 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
sleep 1; \
done;
docker exec -u root test-mysql mysql -u root -e "CREATE DATABASE testdb;"
docker exec -u root -t test-mysql mysql -u root testdb -e "CREATE TABLE test_source (i integer, b boolean, f float, v varchar(32), c char(32), lv varchar(9999), bn binary(32), vb varbinary(32), lvb varbinary(9999), d date, t time, ts timestamp null, tz varchar(80), tsz varchar(80), n numeric(20,4));"
docker exec -u root test-mysql mysql -u root testdb -e "CREATE TABLE test_source (i integer, b boolean, f float, v varchar(32), c char(32), lv varchar(9999), bn binary(32), vb varbinary(32), lvb varbinary(9999), d date, t time, ts timestamp null, tz varchar(80), tsz varchar(80), n numeric(20,4));"
docker exec -u root test-mysql /bin/bash -c "(echo \"INSERT INTO test_source VALUES (null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);\"; for i in \`seq 1 9\`; do echo \"INSERT INTO test_source VALUES (\$i, 1, \$i.5, 'test \$i', 'test \$i', 'test \$i', 'test \$i', 'test \$i', 'test \$i', '\$((\$i+11))00/1/\$i', '4:0\$i', '2038-01-0\$i 03:14:07', '1:2\$i:00', 'June 1, \$((\$i+11))00 03:2\$i EST', '123456.7890');\"; done) | mysql -u root testdb"
docker exec -u root test-mysql mysql -u root testdb -e "select * from test_source;"
- name: Set up a Vertica server
Expand All @@ -34,7 +34,7 @@ jobs:
-e ODBCSYSINI=/var/odbc-loader/tests/config \
--add-host=host.docker.internal:host-gateway \
--name vertica_docker \
vertica/vertica-ce:23.4.0-0
vertica/vertica-ce:24.1.0-0
echo "Vertica startup ..."
until docker exec vertica_docker test -f /data/vertica/VMart/agent_start.out; do \
echo "..."; \
Expand All @@ -45,19 +45,21 @@ jobs:
docker exec -u dbadmin vertica_docker /opt/vertica/bin/vsql -c "select version()"
- name: Build & Install UDx
run: |
docker exec -u root vertica_docker yum -y install centos-release-scl
docker exec -u root vertica_docker yum -y install devtoolset-7
docker exec -u root vertica_docker yum -y install unixODBC-devel
docker exec -u root vertica_docker yum -y install pcre-devel
docker exec -u root vertica_docker dnf -y install gcc-toolset-9-gcc-c++.x86_64
docker exec -u root vertica_docker dnf -y install unixODBC-devel
docker exec -u root vertica_docker dnf -y install pcre-devel
docker exec -u root vertica_docker dnf -y install perl
docker cp ${{ github.workspace }} vertica_docker:/var/odbc-loader
docker exec -u dbadmin vertica_docker /bin/bash -c "sudo chown -R dbadmin:verticadba /var/odbc-loader"
docker exec -w /var/odbc-loader -u dbadmin vertica_docker /bin/bash -c "source /opt/rh/devtoolset-7/enable; \
make; \
make install"
docker exec -u root vertica_docker /bin/bash -c "sudo chown -R dbadmin:verticadba /var/odbc-loader"
docker exec -u root -w /var/odbc-loader vertica_docker dnf install -y make
docker exec -u dbadmin -w /var/odbc-loader vertica_docker scl enable gcc-toolset-9 "bash -c 'make; make install'"

- name: Install ODBC clients
run: |
docker exec -w /var/odbc-loader -u root vertica_docker wget https://downloads.mysql.com/archives/get/p/10/file/mysql-connector-odbc-8.0.31-1.el7.x86_64.rpm
docker exec -w /var/odbc-loader -u root vertica_docker rpm -i mysql-connector-odbc-8.0.31-1.el7.x86_64.rpm
docker exec -w /var/odbc-loader -u root vertica_docker wget https://repo.mysql.com/mysql80-community-release-el8-9.noarch.rpm
docker exec -w /var/odbc-loader -u root vertica_docker dnf install -y mysql80-community-release-el8-9.noarch.rpm
docker exec -w /var/odbc-loader -u root vertica_docker dnf install -y mysql-connector-odbc

- name: Run Tests
run: |
docker exec -w /var/odbc-loader -u dbadmin vertica_docker make test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ VSQL ?= /opt/vertica/bin/vsql
LOADER_DEBUG = 0
TARGET ?= ./lib

ALL_CXXFLAGS := $(CXXFLAGS) -I $(SDK_HOME)/include -I $(SDK_HOME)/examples/HelperLibraries -fPIC -shared -Wall -g -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0
ALL_CXXFLAGS := $(CXXFLAGS) -I $(SDK_HOME)/include -I $(SDK_HOME)/examples/HelperLibraries -fPIC -shared -Wall -g -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=1
ALL_CXXFLAGS += -DLOADER_DEBUG=$(LOADER_DEBUG)

build: $(TARGET)/ODBCLoader.so
Expand Down
Loading