WIP: trying to use server-sdk

This commit is contained in:
Filip Bucek 2019-11-07 16:55:55 +01:00
parent dbe60c60ee
commit 98873562a5
9 changed files with 115 additions and 20 deletions

View File

@ -3,30 +3,68 @@ stages:
- build - build
- test - test
# To clone also submodules
variables:
GIT_SUBMODULE_STRATEGY: recursive
# ######## # ########
# Build # Build
########## ##########
build: # name of task build:
stage: build # in what stage it will run ( 1. build then test etc ) stage: build
tags: # Tags are used to choose correct gitlab-runner tags:
- hw # spaceti-runner server has running runners and one has tag 'hw' - shell
script: # run in bash script:
- mkdir -p build - mkdir -p build
- cd build - cd build
- qmake ../colnod-connector.pro - qmake ../colnod-connector.pro
- make -j8 - make -j4
cache: cache:
paths: paths:
- build/ - build # this path will be cached for next stages
# ######## # ########
# Test # Test
########## ##########
test: # name of task test:
stage: test # in what stage it will run ( 1. build then test etc ) stage: test
tags: # Tags are used to choose correct gitlab-runner tags:
- hw # spaceti-runner server has running runners and one has tag 'hw' - shell
script: # run in bash script:
- cd build - cd build
- make check test - make check test
valgrind:
stage: test
tags:
- shell
script:
- cd build
- valgrind make check test
# Quality of code
cppcheck:
stage: test
tags:
- shell
# Probably needed to allow failure
#allow_failure: true
script: # run in bash
- server-sdk/scripts/cppcheck.sh
codecoverage:
stage: test
tags:
- shell
script:
- server-sdk/scripts/codecoverage.sh
coverage: '/^\s+functions..:\s+(\d+\.\d+%).+$/'
doc:
stage: test
tags:
- shell
script:
- server-sdk/scripts/doc.sh clean # 'clean' better clean before generating documentation

View File

@ -1,5 +1,11 @@
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS += \ SUBDIRS += \
server-sdk/src/serversdk/serversdk.pro \
src/app \ src/app \
test test
OTHER_FILES += \
doc/* \
.gitignore \
.gitlab-ci.yml \

43
doc/Doxyfile-mcss Normal file
View File

@ -0,0 +1,43 @@
@INCLUDE = ../server-sdk/doc/Doxyfile-init
# Output settings
GENERATE_HTML = NO
GENERATE_XML = YES
GENERATE_LATEX = NO
XML_PROGRAMLISTING = YES
# Project settings
PROJECT_NAME = example-app
INPUT = ../src \
pages \
../readme.md \
FILE_PATTERNS += *.md
USE_MDFILE_AS_MAINPAGE = ../readme.md
OUTPUT_DIRECTORY = ../build/doc/
FULL_PATH_NAMES = NO
# Attributes settings
RECURSIVE = YES
EXTRACT_PRIVATE = YES
EXTRACT_ALL = YES
## m.css internal command -> show undocumented
M_SHOW_UNDOCUMENTED = YES
## Taken from magnum ( Project from authors of m.css )
SHOW_USED_FILES = YES
VERBATIM_HEADERS = NO
AUTOLINK_SUPPORT = YES
ALIASES += \
"m_div{1}=@xmlonly<mcss:div xmlns:mcss=\"http://mcss.mosra.cz/doxygen/\" mcss:class=\"\1\">@endxmlonly" \
"m_enddiv=@xmlonly</mcss:div>@endxmlonly" \
"m_span{1}=@xmlonly<mcss:span xmlns:mcss=\"http://mcss.mosra.cz/doxygen/\" mcss:class=\"\1\">@endxmlonly" \
"m_endspan=@xmlonly</mcss:span>@endxmlonly" \
"m_class{1}=@xmlonly<mcss:class xmlns:mcss=\"http://mcss.mosra.cz/doxygen/\" mcss:class=\"\1\" />@endxmlonly" \
"m_footernavigation=@xmlonly<mcss:footernavigation xmlns:mcss=\"http://mcss.mosra.cz/doxygen/\" />@endxmlonly" \
"m_examplenavigation{2}=@xmlonly<mcss:examplenavigation xmlns:mcss=\"http://mcss.mosra.cz/doxygen/\" mcss:page=\"\1\" mcss:prefix=\"\2\" />@endxmlonly" \
"m_keywords{1}=@xmlonly<mcss:search xmlns:mcss=\"http://mcss.mosra.cz/doxygen/\" mcss:keywords=\"\1\" />@endxmlonly" \
"m_keyword{3}=@xmlonly<mcss:search xmlns:mcss=\"http://mcss.mosra.cz/doxygen/\" mcss:keyword=\"\1\" mcss:title=\"\2\" mcss:suffix-length=\"\3\" />@endxmlonly" \
"m_enum_values_as_keywords=@xmlonly<mcss:search xmlns:mcss=\"http://mcss.mosra.cz/doxygen/\" mcss:enum-values-as-keywords=\"true\" />@endxmlonly"

1
doc/pages/mainpage.md Normal file
View File

@ -0,0 +1 @@
# Example app documentation

@ -1 +1 @@
Subproject commit 7ebe6bb0ea91e60dbc0a81854a8541135071d247 Subproject commit e31b09b2a970540a51d4ba8d1d60b55b7b8319e9

View File

@ -1,8 +1,12 @@
TEMPLATE = app TEMPLATE = app
QT += core sql network QT += core sql network
CONFIG += debug console CONFIG += cmdline c++14
CONFIG += ordered
SOURCES += main.cpp SOURCES += main.cpp
include(../colnod/colnod.pri) include(../colnod/colnod.pri)

View File

@ -1,6 +1,8 @@
INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD
#SRC_DIR = $$PWD
message($$PWD) CONFIG += c++14
SOURCES += \ SOURCES += \
$$PWD/databasemanager.cpp \ $$PWD/databasemanager.cpp \
$$PWD/datamanager.cpp \ $$PWD/datamanager.cpp \
@ -22,4 +24,5 @@ HEADERS += \
$$PWD/subject.h \ $$PWD/subject.h \
$$PWD/syncmanager.h \ $$PWD/syncmanager.h \
$$PWD/token.h $$PWD/token.h
message($$SOURCES)
include(../../server-sdk/serversdk.pri)

View File

@ -10,7 +10,6 @@
#include "subject.h" #include "subject.h"
#include "token.h" #include "token.h"
#include <QDateTime> #include <QDateTime>
//#include "logger.h"
class DatabaseManager : public QObject class DatabaseManager : public QObject

View File

@ -10,6 +10,7 @@ SOURCES += \
unittest.cpp unittest.cpp
include(../../src/colnod/colnod.pri) include(../../src/colnod/colnod.pri)
include(../../server-sdk/serversdk.pri)
# Default rules for deployment. # Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin qnx: target.path = /tmp/$${TARGET}/bin