[libgda] ci: fix mysql service and client version detection



commit 07c533703e2ffa24f6a156d2b7f3a40e8dbcb53b
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date:   Wed Jan 16 14:40:55 2019 -0600

    ci: fix mysql service and client version detection

 .gitlab-ci.yml | 12 ++++++------
 meson.build    |  4 +++-
 2 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 76341fbb2..de9e78885 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,7 +6,7 @@ image: ubuntu:devel
 
 services:
   - postgres:latest
-  - mysql:latest
+  - mysql:5.7
 
 stages:
   - build
@@ -16,9 +16,9 @@ variables:
   POSTGRES_USER: test
   POSTGRES_PASSWORD: test1
   POSTGRES_HOST: postgres
-  MYSQL_DB: test
-  MYSQL_USER: test
-  MYSQL_PASSWORD: test1
+  MYSQL_DATABASE: test
+  MYSQL_ROOT_PASSWORD: test1
+  MYSQL_USER: root
   MYSQL_HOST: mysql
   DEPENDENCIES: gcc gettext gtk-doc-tools make autoconf
                 meson ninja-build
@@ -52,8 +52,8 @@ variables:
   POSTGRESQL_DBCREATE_PARAMS: "HOST=$POSTGRES_HOST;ADM_LOGIN=$POSTGRES_USER;ADM_PASSWORD=$POSTGRES_PASSWORD"
   POSTGRESQL_CNC_PARAMS: "HOST=$POSTGRES_HOST;USERNAME=$POSTGRES_USER;PASSWORD=$POSTGRES_PASSWORD"
   POSTGRESQL_META_CNC: 
"DB_NAME=$POSTGRES_DB;HOST=$POSTGRES_HOST;USERNAME=$POSTGRES_USER;PASSWORD=$POSTGRES_PASSWORD"
-  MYSQL_CNC_PARAMS: "DB_NAME=$MYSQL_DB;HOST=$MYSQL_HOST;USERNAME=$MYSQL_USER;PASSWORD=$MYSQL_PASSWORD"
-  MYSQL_META_CNC: "DB_NAME=$MYSQL_DB;HOST=$MYSQL_HOST;USERNAME=$MYSQL_USER;PASSWORD=$MYSQL_PASSWORD"
+  MYSQL_CNC_PARAMS: 
"DB_NAME=$MYSQL_DATABASE;HOST=$MYSQL_HOST;USERNAME=$MYSQL_USER;PASSWORD=$MYSQL_ROOT_PASSWORD"
+  MYSQL_META_CNC: 
"DB_NAME=$MYSQL_DATABASE;HOST=$MYSQL_HOST;USERNAME=$MYSQL_USER;PASSWORD=$MYSQL_ROOT_PASSWORD"
   
 before_script:
   - apt update && apt -y install $DEPENDENCIES
diff --git a/meson.build b/meson.build
index 87eac87f7..fbef2110c 100644
--- a/meson.build
+++ b/meson.build
@@ -53,11 +53,13 @@ jsonglib_dep = dependency('json-glib-1.0',required : false)
 postgres_dep = dependency ('libpq', required: false)
 mysql_dep = dependency ('mysqlclient', required: false)
 mysql_args = []
-if mysql_dep.version ().version_compare ('>8.0.1')
+if mysql_dep.found ()
+if mysql_dep.version ().version_compare ('>21.0.0')
 mysql_args += [
        '-DMYSQL8'
        ]
 endif
+endif
 
 # Platform data
 windows = build_machine.system().contains('windows')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]