From 8d2326faaac8536b2e796fe5e6a132514c0e624d Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Mon, 8 Apr 2024 22:19:42 +0300 Subject: [PATCH] CI/CD --- .gitlab-ci.yml | 42 ++++++++++++++++++++-------- CMakeLists.txt | 2 ++ uncrustify.cfg | 76 +++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 104 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1f6d01..12d5db3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,20 +1,38 @@ +--- include: - - project: 'f1x1t/gitlab-ci' + - project: 'cicd/gitlab' ref: master - file: 'scheduled.yml' + file: 'gitlab.yml' -smolensk15-nightly: - extends: .scheduled-smolensk15 +uncrustify: + extends: + - .test-formatting-with-uncrustify -orel212-nightly: - extends: .scheduled-orel212 +build-smolensk15: + extends: + - .image-smolensk15-large + - .build-cmake-make -focal-nightly: - extends: .scheduled-focal +build-smolensk16: + extends: + - .image-smolensk16-large + - .build-cmake-make -jammy-nightly: - extends: .scheduled-jammy +build-smolensk17: + extends: + - .image-smolensk16-large + - .build-cmake-make -elbrus-nightly: - extends: .scheduled-elbrus +build-with-modern-clang: + extends: + - .use-clang-18 + - .image-noble-large + - .build-cmake-ninja +analyze-clang-tidy: + extends: + - .cmake-analyze-clang-tidy + +analyze-pvs-studio: + extends: + - .cmake-analyze-pvs-studio diff --git a/CMakeLists.txt b/CMakeLists.txt index 8413c9c..d8c4dcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,8 @@ project(myx-example-app-ext VERSION 0.4.0 LANGUAGES C CXX) set(${PROJECT_NAME}_AUTHOR_NAME "Andrey Astafyev") set(${PROJECT_NAME}_AUTHOR_EMAIL "dev@246060.ru") +set(CMAKE_CXX_STANDARD 11) + # Рекомендуемый способ подключения MyxCMake include(cmake/myx_setup.cmake) # Правила загрузки требуемых файлов diff --git a/uncrustify.cfg b/uncrustify.cfg index 4619d58..9fde20b 100644 --- a/uncrustify.cfg +++ b/uncrustify.cfg @@ -1,4 +1,4 @@ -# Uncrustify-0.77.1_f +# Uncrustify-0.78.0_f # # General options @@ -99,6 +99,12 @@ sp_cpp_lambda_square_paren = remove # ignore/add/remove/force/not_defined # no argument list is present, as in '[] { ... }'. sp_cpp_lambda_square_brace = ignore # ignore/add/remove/force/not_defined +# Add or remove space after the opening parenthesis and before the closing +# parenthesis of a argument list of a C++11 lambda, as in +# '[]( ){ ... }' +# with an empty list. +sp_cpp_lambda_argument_list_empty = ignore # ignore/add/remove/force/not_defined + # Add or remove space after the opening parenthesis and before the closing # parenthesis of a argument list of a C++11 lambda, as in # '[]( int x ){ ... }'. @@ -195,6 +201,25 @@ sp_before_ptr_star = remove # ignore/add/remove/force/not_defined # variable name. If set to ignore, sp_before_ptr_star is used instead. sp_before_unnamed_ptr_star = remove # ignore/add/remove/force/not_defined +# Add or remove space before pointer star '*' that is followed by a qualifier. +# If set to ignore, sp_before_unnamed_ptr_star is used instead. +sp_before_qualifier_ptr_star = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before pointer star '*' that is followed by 'operator' keyword. +# If set to ignore, sp_before_unnamed_ptr_star is used instead. +sp_before_operator_ptr_star = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before pointer star '*' that is followed by +# a class scope (as in 'int *MyClass::method()') or namespace scope +# (as in 'int *my_ns::func()'). +# If set to ignore, sp_before_unnamed_ptr_star is used instead. +sp_before_scope_ptr_star = ignore # ignore/add/remove/force/not_defined + +# Add or remove space before pointer star '*' that is followed by '::', +# as in 'int *::func()'. +# If set to ignore, sp_before_unnamed_ptr_star is used instead. +sp_before_global_scope_ptr_star = ignore # ignore/add/remove/force/not_defined + # Add or remove space between a qualifier and a pointer star '*' that isn't # followed by a variable name, as in '(char const *)'. If set to ignore, # sp_before_ptr_star is used instead. @@ -203,6 +228,9 @@ sp_qualifier_unnamed_ptr_star = ignore # ignore/add/remove/force/not_defined # Add or remove space between pointer stars '*', as in 'int ***a;'. sp_between_ptr_star = remove # ignore/add/remove/force/not_defined +# Add or remove space between pointer star '*' and reference '&', as in 'int *& a;'. +sp_between_ptr_ref = ignore # ignore/add/remove/force/not_defined + # Add or remove space after pointer star '*', if followed by a word. # # Overrides sp_type_func. @@ -313,6 +341,7 @@ sp_before_angle = ignore # ignore/add/remove/force/not_defined sp_inside_angle = force # ignore/add/remove/force/not_defined # Add or remove space inside '<>'. +# if empty. sp_inside_angle_empty = ignore # ignore/add/remove/force/not_defined # Add or remove space between '>' and ':'. @@ -449,6 +478,7 @@ sp_cpp_before_struct_binding = ignore # ignore/add/remove/force/not_defined sp_inside_square = ignore # ignore/add/remove/force/not_defined # Add or remove space inside '[]'. +# if empty. sp_inside_square_empty = remove # ignore/add/remove/force/not_defined # (OC) Add or remove space inside a non-empty Objective-C boxed array '@[' and @@ -607,6 +637,7 @@ sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined sp_inside_braces = force # ignore/add/remove/force/not_defined # Add or remove space inside '{}'. +# if empty. sp_inside_braces_empty = remove # ignore/add/remove/force/not_defined # Add or remove space around trailing return operator '->'. @@ -624,7 +655,7 @@ sp_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined sp_func_proto_paren = remove # ignore/add/remove/force/not_defined # Add or remove space between function name and '()' on function declaration -# without parameters. +# if empty. sp_func_proto_paren_empty = remove # ignore/add/remove/force/not_defined # Add or remove space between function name and '(' with a typedef specifier. @@ -634,7 +665,7 @@ sp_func_type_paren = ignore # ignore/add/remove/force/not_defined sp_func_def_paren = remove # ignore/add/remove/force/not_defined # Add or remove space between function name and '()' on function definition -# without parameters. +# if empty. sp_func_def_paren_empty = remove # ignore/add/remove/force/not_defined # Add or remove space inside empty function '()'. @@ -1083,6 +1114,12 @@ sp_after_noexcept = ignore # ignore/add/remove/force/not_defined # Add or remove space after '_'. sp_vala_after_translation = ignore # ignore/add/remove/force/not_defined +# Add or remove space before a bit colon ':'. +sp_before_bit_colon = force # ignore/add/remove/force/not_defined + +# Add or remove space after a bit colon ':'. +sp_after_bit_colon = force # ignore/add/remove/force/not_defined + # If true, a is inserted after #define. force_tab_after_define = false # true/false @@ -2313,8 +2350,21 @@ nl_after_func_class_proto_group = 0 # unsigned number nl_class_leave_one_liner_groups = false # true/false # The number of newlines after '}' of a multi-line function body. +# +# Overrides nl_min_after_func_body and nl_max_after_func_body. nl_after_func_body = 3 # unsigned number +# The minimum number of newlines after '}' of a multi-line function body. +# +# Only works when nl_after_func_body is 0. +nl_min_after_func_body = 0 # unsigned number + +# The maximum number of newlines after '}' of a multi-line function body. +# +# Only works when nl_after_func_body is 0. +# Takes precedence over nl_min_after_func_body. +nl_max_after_func_body = 0 # unsigned number + # The number of newlines after '}' of a multi-line function body in a class # declaration. Also affects class constructors/destructors. # @@ -2818,6 +2868,13 @@ align_right_cmt_at_col = 1 # unsigned number # 0: Don't align (default). align_func_proto_span = 0 # unsigned number +# Whether to ignore continuation lines when evaluating the number of +# new lines for the function prototype alignment's span. +# +# false: continuation lines are part of the newlines count +# true: continuation lines are not counted +align_func_proto_span_ignore_cont_lines = false # true/false + # How to consider (or treat) the '*' in the alignment of function prototypes. # # 0: Part of the type 'void * foo();' (default) @@ -2878,6 +2935,12 @@ align_oc_msg_spec_span = 0 # unsigned number # 3: Align with the backslash that is farthest to the right align_nl_cont = 0 # unsigned number +# The minimum number of spaces between the end of a line and its continuation +# backslash. Requires align_nl_cont. +# +# Default: 1 +align_nl_cont_spaces = 1 # unsigned number + # Whether to align macro functions and variables together. align_pp_define_together = false # true/false @@ -3582,6 +3645,11 @@ debug_sort_the_tracks = true # true/false # only if the -p option is set. debug_decode_the_flags = false # true/false +# use (or not) the exit(EX_SOFTWARE) function. +# +# Default: true +debug_use_the_exit_function_pop = true # true/false + # insert the number of the line at the beginning of each line set_numbering_for_html_output = false # true/false @@ -3637,5 +3705,5 @@ set_numbering_for_html_output = false # true/false # `macro-close END_MESSAGE_MAP` # # -# option(s) with 'not default' value: 217 +# option(s) with 'not default' value: 219 #