Skip to content
Snippets Groups Projects
Commit e61826ef authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

Merge branch 'dev' into f-to-string

parents 49dc812f 1330c185
No related branches found
No related tags found
No related merge requests found
Pipeline #51855 passed with warnings
Pipeline: caosdb-julialib

#51858

    Pipeline: CaosDB Octave library

    #51857

      Pipeline: caosdb-cppinttest

      #51856

        FROM debian:buster-backports
        FROM debian:bullseye
        RUN apt-get update
        RUN apt-get install -y cmake/buster-backports
        RUN apt-get install -y cmake
        RUN apt-get install -y lcov
        RUN apt-get install -y doxygen
        RUN apt-get install -y doxygen graphviz
        RUN apt-get install -y clang-format-11 clang-tidy-11
        RUN apt-get install -y python3-pip
        RUN apt-get install -y git
        ......
        ......@@ -145,3 +145,12 @@ flycheck_*.el
        # Python/Sphinx
        env/
        # Conan build files
        build_tools
        conan.lock
        conan_imports_manifest.txt
        conanbuildinfo.cmake
        conanbuildinfo.txt
        conaninfo.txt
        graph_info.json
        #
        # This file is a part of the CaosDB Project.
        #
        # Copyright (C) 2019-2021 Indiscale GmbH <info@indiscale.com>
        # Copyright (C) 2019-2022 Indiscale GmbH <info@indiscale.com>
        # Copyright (C) 2019 Henrik tom Wörden <h.tomwoerden@indiscale.com>
        # Copyright (C) 2020 Daniel Hornung <d.hornung@indiscale.com>
        # Copyright (C) 2020-2022 Daniel Hornung <d.hornung@indiscale.com>
        # Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
        #
        # This program is free software: you can redistribute it and/or modify
        ......@@ -23,8 +23,9 @@
        variables:
        CPPLIB_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/src/caosdb-cpplib/testenv:$CI_COMMIT_REF_NAME
        CPPINTTEST_PIPELINE: https://gitlab.indiscale.com/api/v4/projects/111/trigger/pipeline
        CPPINTTEST_BRANCHES: https://gitlab.indiscale.com/api/v4/projects/111/repository/branches
        OCTAVELIB_BRANCHES: https://gitlab.indiscale.com/api/v4/projects/117/repository/branches
        JULIALIB_BRANCHES: https://gitlab.indiscale.com/api/v4/projects/116/repository/branches
        GIT_SUBMODULE_STRATEGY: normal
        ## FOR DEBUGGING
        ......@@ -32,6 +33,9 @@ variables:
        TRIGGERED_BY_REF: $CI_COMMIT_REF_NAME
        TRIGGERED_BY_HASH: $CI_COMMIT_SHORT_SHA
        # For storing cross-job environment variables
        DOTENV: custom.env
        image: $CPPLIB_REGISTRY_IMAGE
        ......@@ -84,58 +88,134 @@ test:
        script:
        - mkdir build
        - cd build
        - conan install .. -s "compiler.libcxx=libstdc++11"
        - FILE_TO_BE_PATCHED="$(grep "std::unique_ptr<ContextAllocator> context_allocator) {}" -l -r $(conan config home))"
        - echo "FILE_TO_BE_PATCHED=$FILE_TO_BE_PATCHED"
        - sed -e "s|std::unique_ptr<ContextAllocator> context_allocator) {}|std::unique_ptr<ContextAllocator> /*context_allocator*/) {}|" -i $FILE_TO_BE_PATCHED
        - VERSION="$(conan inspect --raw version ..)"
        - conan install -s "compiler.libcxx=libstdc++11" --build=missing -o build_acm=True .. "caosdb/$VERSION@_/_"
        - cmake -DCMAKE_BUILD_TYPE=Debug ..
        - cmake --build . -j
        - cmake --build . -j --target unit_test_coverage
        - cmake --build . -j --target cxxcaosdbcli
        # - cmake --build . -j --target ccaosdbcli # Disabled until it compiles again.
        # trigger the integration tests
        trigger_inttest:
        trigger_prepare:
        # Calculate the branch name
        tags: [ docker ]
        stage: deploy
        script:
        ## Determine the cppinttest branch...
        # ... use an f-branch if posible...
        - F_BRANCH=dev
        - if echo "$CI_COMMIT_REF_NAME" | grep -c "^f-" ; then
        F_BRANCH=$CI_COMMIT_REF_NAME ;
        if curl -o /dev/null -s -w "%{http_code}" $CPPINTTEST_BRANCHES/$CI_COMMIT_REF_NAME | grep "404"; then
        CPPINT_REF=dev ;
        F_BRANCH=dev ;
        else
        CPPINT_REF=$CI_COMMIT_REF_NAME ;
        F_BRANCH=$CI_COMMIT_REF_NAME ;
        fi
        fi;
        if curl -o /dev/null -s -w "%{http_code}" $OCTAVELIB_BRANCHES/$CI_COMMIT_REF_NAME | grep "404"; then
        OCTAVELIB_REF=dev ;
        else
        OCTAVELIB_REF=$CI_COMMIT_REF_NAME ;
        fi;
        if curl -o /dev/null -s -w "%{http_code}" $JULIALIB_BRANCHES/$CI_COMMIT_REF_NAME | grep "404"; then
        JULIALIB_REF=dev ;
        else
        JULIALIB_REF=$CI_COMMIT_REF_NAME ;
        fi;
        fi;
        # ... or use main if possible...
        - if [[ "$CI_COMMIT_REF_NAME" == "main" ]] ; then
        CPPINT_REF=main ;
        OCTAVELIB_REF=main ;
        JULIALIB_REF=main
        F_BRANCH=main ;
        fi
        - if echo "$CI_COMMIT_REF_NAME" | grep -c "^v" ; then
        CPPINT_REF=main ;
        OCTAVELIB_REF=main ;
        JULIALIB_REF=main ;
        F_BRANCH=main ;
        fi
        # ... and fall-back to dev
        - CPPINT_REF=${CPPINT_REF:-dev}
        - OCTAVELIB_REF=${OCTAVELIB_REF:-dev}
        - JULIALIB_REF=${JULIALIB_REF:-dev}
        # Write to dotenv
        - echo "CPPINT_REF=${CPPINT_REF}" >> "$DOTENV"
        - echo "OCTAVELIB_REF=${OCTAVELIB_REF}" >> "$DOTENV"
        - echo "JULIALIB_REF=${JULIALIB_REF}" >> "$DOTENV"
        - echo "F_BRANCH=${F_BRANCH}" >> "$DOTENV"
        - cat "$DOTENV"
        artifacts:
        # this special artifact will be loaded in the next job and make the environment variables available
        reports:
        dotenv: "$DOTENV"
        expire_in: 1 day
        - echo "Triggering caosdb-cppinttest@${CPPINT_REF} (F_BRANCH=$F_BRANCH)"
        - curl -w "%{stderr}HTTPCODE=%{http_code}" -X POST
        -F token=$CI_JOB_TOKEN
        -F "variables[TRIGGERED_BY_REPO]=$TRIGGERED_BY_REPO"
        -F "variables[TRIGGERED_BY_REF]=$TRIGGERED_BY_REF"
        -F "variables[TRIGGERED_BY_HASH]=$TRIGGERED_BY_HASH"
        -F "variables[CPPLIB_REGISTRY_IMAGE]=$CPPLIB_REGISTRY_IMAGE"
        -F "variables[F_BRANCH]=${F_BRANCH}"
        -F ref=${CPPINT_REF} $CPPINTTEST_PIPELINE 2>HTTPCODE
        # trigger the integration tests
        trigger_inttest:
        stage: deploy
        needs: [ trigger_prepare ]
        inherit:
        variables:
        # List the variables that shall be inherited, which also means they will override any equally
        # named varibles in child pipelines.
        - TRIGGERED_BY_REPO
        - TRIGGERED_BY_REF
        - TRIGGERED_BY_HASH
        - CPPLIB_REGISTRY_IMAGE
        variables:
        # dotenv variables must be set again here.
        F_BRANCH: $F_BRANCH
        trigger:
        project: caosdb/src/caosdb-cppinttest
        branch: $CPPINT_REF
        strategy: depend
        # After the cppinttest have been successful, also start tests for Octave...
        trigger_octavelib:
        stage: deploy
        needs: [ trigger_prepare, trigger_inttest ]
        inherit:
        variables:
        # List the variables that shall be inherited, which also means they will override any equally
        # named varibles in child pipelines.
        - TRIGGERED_BY_REPO
        - TRIGGERED_BY_REF
        - TRIGGERED_BY_HASH
        - CPPLIB_REGISTRY_IMAGE
        variables:
        # dotenv variables must be set again here.
        F_BRANCH: $F_BRANCH
        trigger:
        project: caosdb/src/caosdb-octavelib
        branch: $OCTAVELIB_REF
        # It's ok if octave fails in case of features that might already be
        # implemented in proto, server, and cpplib, but not yet in Octave.
        allow_failure: true
        # fail if the request failed
        - grep -c "HTTPCODE=2" HTTPCODE
        # ... and for Julia.
        trigger_julialib:
        stage: deploy
        needs: [ trigger_prepare, trigger_inttest ]
        inherit:
        variables:
        # List the variables that shall be inherited, which also means they will override any equally
        # named varibles in child pipelines.
        - TRIGGERED_BY_REPO
        - TRIGGERED_BY_REF
        - TRIGGERED_BY_HASH
        - CPPLIB_REGISTRY_IMAGE
        variables:
        # dotenv variables must be set again here.
        F_BRANCH: $F_BRANCH
        trigger:
        project: caosdb/src/caosdb-julialib
        branch: $JULIALIB_REF
        # It's ok if julia fails in case of features that might already be
        # implemented in proto, server, and cpplib, but not yet in Julia.
        allow_failure: true
        # Build the sphinx documentation and make it ready for deployment by Gitlab Pages
        # Special job for serving a static website. See https://docs.gitlab.com/ee/ci/yaml/README.html#pages
        ......@@ -143,12 +223,8 @@ trigger_inttest:
        tags: [ cached-dind ]
        stage: deploy
        script:
        - mkdir -p build
        - cd build
        - conan install .. -s "compiler.libcxx=libstdc++11"
        - cmake ..
        - cmake --build . --target doc-sphinx
        - cp -r doc/sphinx_out ../public
        - make doc
        - cp -r build/doc/sphinx_out ./public
        test_pages:
        <<: *pages_prepare
        ......
        ## Summary
        *Please give a short summary of what the issue is.*
        ## Expected Behavior
        *What did you expect how the software should behave?*
        ## Actual Behavior
        *What did the software actually do?*
        ## Steps to Reproduce the Problem
        *Please describe, step by step, how others can reproduce the problem. Please try these steps for yourself on a clean system.*
        1.
        2.
        3.
        ## Specifications
        - Version: *Which version of this software?*
        - Platform: *Which operating system, which other relevant software versions?*
        ## Possible fixes
        *Do you have ideas how the issue can be resolved?*
        # Summary
        Insert a meaningful description for this merge request here. What is the
        new/changed behavior? Which bug has been fixed? Are there related Issues?
        *Insert a meaningful description for this merge request here: What is the new/changed behavior?
        Which bug has been fixed? Are there related issues?*
        # Focus
        Point the reviewer to the core of the code change. Where should they start
        reading? What should they focus on (e.g. security, performance,
        maintainability, user-friendliness, compliance with the specs, finding more
        corner cases, concrete questions)?
        *Point the reviewer to the core of the code change. Where should they start reading? What should
        they focus on (e.g. security, performance, maintainability, user-friendliness, compliance with the
        specs, finding more corner cases, concrete questions)?*
        # Test Environment
        How to set up a test environment for manual testing?
        *How to set up a test environment for manual testing?*
        # Check List for the Author
        Please, prepare your MR for a review. Be sure to write a summary and a
        focus and create gitlab comments for the reviewer. They should guide the
        reviewer through the changes, explain your changes and also point out open
        questions. For further good practices have a look at [our review
        Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab
        comments for the reviewer. They should guide the reviewer through the changes, explain your changes
        and also point out open questions. For further good practices have a look at [our review
        guidelines](https://gitlab.com/caosdb/caosdb/-/blob/dev/REVIEW_GUIDELINES.md)
        - [ ] All automated tests pass
        - [ ] Reference related Issues
        - [ ] Up-to-date CHANGELOG.md
        - [ ] Reference related issues
        - [ ] Up-to-date CHANGELOG.md (or not necessary)
        - [ ] Up-to-date JSON schema (or not necessary)
        - [ ] Appropriate user and developer documentation (or not necessary)
        - Update / write published documentation (`make doc`).
        - How do I use the software? Assume "stupid" users.
        - How do I develop or debug the software? Assume novice developers.
        - [ ] Annotations in code (Gitlab comments)
        - Intent of new code
        - Problems with old code
        ......@@ -33,12 +39,13 @@ guidelines](https://gitlab.com/caosdb/caosdb/-/blob/dev/REVIEW_GUIDELINES.md)
        # Check List for the Reviewer
        - [ ] I understand the intent of this MR
        - [ ] All automated tests pass
        - [ ] Up-to-date CHANGELOG.md
        - [ ] The test environment setup works and the intended behavior is
        reproducible in the test environment
        - [ ] Up-to-date CHANGELOG.md (or not necessary)
        - [ ] Appropriate user and developer documentation (or not necessary), also in published
        documentation.
        - [ ] The test environment setup works and the intended behavior is reproducible in the test
        environment
        - [ ] In-code documentation and comments are up-to-date.
        - [ ] Check: Are there specifications? Are they satisfied?
        ......
        # Changelog
        All notable changes to this project will be documented in this file.
        The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
        and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
        ## [0.0.13 - Unreleased]
        ### Added
        * New functions getEnumNameFromValue() and getEnumValueFromName().
        * Extern C now supports the full C++ functionalities.
        ### Changed
        * Integer values are 32 bit now.
        ### Deprecated
        ### Removed
        ### Fixed
        * #11 - Transaction::GetResultSet() now always returns a valid reference.
        ### Security
        doc/CHANGELOG.md
        \ No newline at end of file
        ......@@ -20,11 +20,11 @@
        cmake_minimum_required(VERSION 3.13)
        set(libcaosdb_VERSION 0.0.13)
        set(libcaosdb_VERSION 0.3.0)
        set(libcaosdb_COMPATIBLE_SERVER_VERSION_MAJOR 0)
        set(libcaosdb_COMPATIBLE_SERVER_VERSION_MINOR 5)
        set(libcaosdb_COMPATIBLE_SERVER_VERSION_MINOR 9)
        set(libcaosdb_COMPATIBLE_SERVER_VERSION_PATCH 0)
        set(libcaosdb_COMPATIBLE_SERVER_VERSION_PRE_RELEASE "GRPC${libcaosdb_VERSION}")
        set(libcaosdb_COMPATIBLE_SERVER_VERSION_PRE_RELEASE "")
        project(libcaosdb
        VERSION ${libcaosdb_VERSION}
        ......@@ -46,6 +46,11 @@ IF (WIN32)
        set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
        ENDIF()
        IF (BUILD_ACM)
        message(STATUS "BUILD_ACM")
        add_compile_definitions("BUILD_ACM")
        ENDIF()
        ###########################################
        ### DEPENDENCY MANAGEMENT with CONAN
        ###########################################
        ......@@ -63,6 +68,8 @@ string(REGEX REPLACE "grpc\\+?\\+?_unsecure" "" CONAN_LIBS
        string(REGEX REPLACE "grpc\\+?\\+?_unsecure" "" CONAN_PKG_LIBS
        "${CONAN_PKG_LIBS}")
        message(STATUS "CONAN_LIBS: ${CONAN_LIBS}")
        ###########################################
        ### GENERAL SETUP of SOURCES
        ###########################################
        ......@@ -77,10 +84,16 @@ add_subdirectory(doc)
        # Protobuf/Grpc source files
        set(PROTO_FILES
        ${PROJECT_SOURCE_DIR}/proto/proto/caosdb/info/v1alpha1/main.proto
        ${PROJECT_SOURCE_DIR}/proto/proto/caosdb/entity/v1alpha1/main.proto
        ${PROJECT_SOURCE_DIR}/proto/proto/caosdb/info/v1/main.proto
        ${PROJECT_SOURCE_DIR}/proto/proto/caosdb/entity/v1/main.proto
        )
        IF (BUILD_ACM)
        list(APPEND PROTO_FILES
        ${PROJECT_SOURCE_DIR}/proto/proto/caosdb/acm/v1alpha1/main.proto
        )
        ENDIF()
        set(PROTO_PATH ${PROJECT_SOURCE_DIR}/proto/proto)
        # compiler binaries
        ......@@ -155,6 +168,8 @@ if("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
        $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include>
        $<INSTALL_INTERFACE:include>
        )
        target_include_directories(caosdb_grpc SYSTEM PUBLIC
        ${CONAN_INCLUDE_DIRS}
        )
        else()
        ......@@ -164,30 +179,48 @@ else()
        endif()
        target_link_libraries(caosdb
        ${CONAN_LIBS}
        stdc++fs
        )
        target_include_directories(caosdb PUBLIC
        $<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include>
        $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include>
        $<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/src>
        $<INSTALL_INTERFACE:include>
        )
        target_include_directories(caosdb SYSTEM PUBLIC
        ${CONAN_INCLUDE_DIRS}
        )
        add_library(ccaosdb SHARED src/ccaosdb.cpp)
        target_link_libraries(ccaosdb
        ${LIBCAOSDB}
        ${CONAN_LIBS}
        ${LIBCAOSDB}
        stdc++fs
        )
        target_include_directories(ccaosdb PUBLIC
        $<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include>
        $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include>
        $<INSTALL_INTERFACE:include>
        )
        target_include_directories(ccaosdb SYSTEM PUBLIC
        ${CONAN_INCLUDE_DIRS}
        )
        add_executable(ccaosdbcli EXCLUDE_FROM_ALL src/ccaosdbcli.c)
        target_include_directories(ccaosdbcli PUBLIC
        $<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include>
        $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include>
        $<INSTALL_INTERFACE:include>
        )
        target_include_directories(ccaosdbcli SYSTEM PUBLIC
        ${CONAN_INCLUDE_DIRS}
        )
        target_link_libraries(ccaosdbcli
        ccaosdb
        ${CONAN_LIBS}
        ${LIBCAOSDB}
        ccaosdb
        )
        add_executable(cxxcaosdbcli EXCLUDE_FROM_ALL src/cxxcaosdbcli.cpp)
        ......@@ -195,6 +228,8 @@ target_include_directories(cxxcaosdbcli PUBLIC
        $<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include>
        $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include>
        $<INSTALL_INTERFACE:include>
        )
        target_include_directories(cxxcaosdbcli SYSTEM PUBLIC
        ${CONAN_INCLUDE_DIRS}
        )
        target_link_libraries(cxxcaosdbcli
        ......@@ -208,12 +243,6 @@ target_link_libraries(cxxcaosdbcli
        ### LINTING with CLANG-TIDY and INCLUDE-WHAT-YOU-USE
        #######################################################
        ###########################################
        ### PARANOID COMPILER SETTINGS
        ###########################################
        option(PARANOID_COMPILER_SETTINGS "Enable extra-paranoid compiler settings
        (which may even flag errors for code in the dependencies. These only apply in
        Debug BUILD_TYPE with SKIP_LINTING=Off or when LINTING=On." OFF)
        include(CheckCXXCompilerFlag)
        include(CheckCCompilerFlag)
        ......@@ -300,7 +329,7 @@ if(_LINTING)
        else()
        message(STATUS "clang-tidy: ${clang_tidy}")
        set(_CMAKE_CXX_CLANG_TIDY_CHECKS
        "--checks=*,-fuchsia-*,-llvmlibc-*,-readability-convert-member-functions-to-static,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-hicpp-no-array-decay,-llvm-else-after-return,-readability-else-after-return,-modernize-use-trailing-return-type,-bugprone-branch-clone")
        "--checks=*,-fuchsia-*,-llvmlibc-*,-readability-convert-member-functions-to-static,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-hicpp-no-array-decay,-llvm-else-after-return,-readability-else-after-return,-modernize-use-trailing-return-type,-bugprone-branch-clone,-altera-*")
        set(_CMAKE_C_CLANG_TIDY_CHECKS "${_CMAKE_CXX_CLANG_TIDY_CHECKS}")
        set(_CMAKE_CXX_CLANG_TIDY "${clang_tidy}"
        "--header-filter=caosdb/.*[^\(\.pb\.h\)]$"
        ......@@ -415,7 +444,7 @@ option(AUTOFORMATTING "call clang-format at configure time" ON)
        if(AUTOFORMATTING AND NOT SKIP_LINTING)
        find_program(clang_format NAMES clang-format-11 clang-format)
        file(GLOB format_test_sources test/*.cpp test/*.h test/*.h.in)
        execute_process(COMMAND $(clang-format) -i --verbose ${libcaosdb_INCL}
        execute_process(COMMAND ${clang_format} -i --verbose ${libcaosdb_INCL}
        ${libcaosdb_SRC} ${libcaosdb_TEST_SRC}
        ${PROJECT_SOURCE_DIR}/src/cxxcaosdbcli.cpp
        ${PROJECT_SOURCE_DIR}/src/ccaosdbcli.c
        ......
        # GENERAL
        * >=conan-1.37.2 (e.g. with `pip install conan`)
        * >=cmake-3.13
        * >=gcc-10.2.0 | >=clang-11
        # OPTIONAL
        * For checking the schema of a json configuration file: >=jsonschema-3.2.0
        # BUILD DOCS
        * doxygen
        * >=python-3.7
        * >=pip-21.0.1
        * python packages from the `doc/requirements.txt` file.
        # BUILD AND RUN TESTS
        * >=clang-tidy-11
        * >=gtest-1.10.0
        # COVERAGE
        * >=gcc-10.2.0
        * >=lcov-1.15
        # FORMATTING
        * >=clang-formatting-11
        doc/DEPENDENCIES.md
        \ No newline at end of file
        doc/FEATURES.md
        \ No newline at end of file
        ......@@ -22,26 +22,69 @@
        # This Makefile is a wrapper for several other scripts.
        CLANG-FORMAT = clang-format-11
        CLANG_FORMAT ?= clang-format-11
        CONAN_SETTINGS = "compiler.libcxx=libstdc++11"
        # OS specific handling, with code by Ken Jackson and oHo,
        # from https://stackoverflow.com/a/52062069/232888 and
        # https://stackoverflow.com/a/14777895/232888
        ifeq '$(findstring ;,$(PATH))' ';'
        DETECTED_OS := Windows
        else
        DETECTED_OS := $(shell uname 2>/dev/null || echo Unknown)
        DETECTED_OS := $(patsubst CYGWIN%,Cygwin,$(DETECTED_OS))
        DETECTED_OS := $(patsubst MSYS%,MSYS,$(DETECTED_OS))
        DETECTED_OS := $(patsubst MINGW%,MSYS,$(DETECTED_OS))
        endif
        ifeq ($(DETECTED_OS),Darwin) # Test if we are on MacOS
        CONAN_SETTINGS := "compiler.cppstd=17"
        endif
        .PHONY: help
        help:
        @echo "Targets:"
        @echo " conan-install - Install locally with Conan."
        @echo " style - auto-format the source files."
        @echo " conan-install-deps - Install dependencies locally with Conan."
        @echo -e " conan-create - Create Conan binary package in the local conan\n"\
        " repostory."
        @echo " conan - Install dependencies, then build and install package."
        style:
        $(CLANG-FORMAT) -i --verbose \
        $(CLANG_FORMAT) -i --verbose \
        $$(find test/ src/ include/ -type f -iname "*.cpp" -o -iname "*.h" -o -iname "*.h.in")
        .PHONY: style
        conan-install:
        conan install . -s "compiler.libcxx=libstdc++11"
        .PHONY: conan-install
        conan-install-deps:
        conan install . -s $(CONAN_SETTINGS) || \
        (echo "'conan install' failed, trying to build from sources..."; \
        conan install . -s $(CONAN_SETTINGS) --build=missing)
        .PHONY: conan-install-deps
        conan-install-debug:
        conan install . -s $(CONAN_SETTINGS) -s build_type=Debug || \
        (echo "'conan install' failed, trying to build from sources..."; \
        conan install . -s $(CONAN_SETTINGS) -s build_type=Debug --build=missing)
        .PHONY: conan-install-debug
        conan-create:
        conan create . -s "compiler.libcxx=libstdc++11"
        conan create -s $(CONAN_SETTINGS) -o caosdb:build_acm=True . "caosdb/$$(conan inspect --raw version .)@_/_"
        .PHONY: conan-create
        conan: conan-install conan-create
        conan-create-debug:
        conan create -s $(CONAN_SETTINGS) -s build_type=Debug -o caosdb:build_acm=True . "caosdb/$$(conan inspect --raw version .)@_/_"
        .PHONY: conan-create-debug
        conan: conan-install-deps conan-create
        .PHONY: conan
        doc:
        @doxygen --version || ( echo "Doxygen not found. Please install Doxygen first." ; exit 1 )
        mkdir -p build && cd build && conan install .. --build=missing -s $(CONAN_SETTINGS) \
        && cmake .. && cmake --build . --target doc-sphinx \
        && echo "The documentation starts at build/doc/sphinx_out/index.html ."
        .PHONY: doc
        conan-debug: conan-install-debug conan-create-debug
        .PHONY: conan-debug
        ......@@ -7,8 +7,8 @@ for CaosDB and a part of the CaosDB project.
        ## Setup
        Please read the [README_SETUP.md](README_SETUP.md) for instructions on how to
        develop, build and use this code.
        Please read the installation notes [online](https://docs.indiscale.com/caosdb-cpplib/Install_develop.html) or [in the source repository](doc/Install_develop.rst) for instructions
        on how to build, use and develop this code.
        ## Further Reading
        ......@@ -20,7 +20,7 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md).
        ## License
        * Copyright (C) 2021 Indiscale GmbH <info@indiscale.com>
        * Copyright (C) 2022 Indiscale GmbH <info@indiscale.com>
        All files in this repository are licensed under a [GNU Affero General Public
        License](LICENCE.md) (version 3 or later).
        License](LICENSE.md) (version 3 or later).
        doc/README_SETUP.md
        \ No newline at end of file
        ......@@ -9,24 +9,40 @@ guidelines of the CaosDB Project
        * All tests are passing.
        * FEATURES.md is up-to-date and a public API is being declared in that document.
        * CHANGELOG.md is up-to-date.
        * DEPENDENCIES.md is up-to-date.
        * DEPENDENCIES.md is up-to-date (e.g. server version)
        ## Steps
        1. Create a release branch from the dev branch. This prevents further changes
        to the code base and a never ending release process. Naming: `release-<VERSION>`
        1. Create a release branch from the dev branch. This prevents further changes to
        the code base and a never ending release process. Naming:
        `release-<VERSION>`. Also create a branch with the same name in cppinttests.
        2. Update CHANGELOG.md
        3. Check all general prerequisites.
        4. Prepare [CMakeLists.txt](./CMakeLists.txt): Check the `MAJOR`, `MINOR`, `PATCH`
        version variables.
        4. Update version numbers:
        1. In [CMakeLists.txt](./CMakeLists.txt): Check the version variables and
        make sure that the compatible caosdb-server version is set correctly.
        2. In `conanfile.py`: Update the `version` variable.
        3. In `caosdb-cppinttest/conanfile.py`: Update the version
        5. Merge the release branch into the main branch.
        6. Tag the latest commit of the main branch with `v<VERSION>`.
        6. Tag the latest commit of the main branch with `v<VERSION>`. Push the tag and the main branch.
        7. Delete the release branch.
        7. Create release in Gitlab:
        1. On [Releases](https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib/-/releases), click "New release"
        2. Choose tag, type release title (same as tag), no milestone, possibly short release note, no
        manual assets are necessary, possibly link to documentation.
        8. TODO...
        8. Delete the release branch.
        9. Release cppinttests with updated cpplib version
        10. Merge `main` back into `dev` and increase patch version by one to begin next
        release cycle.
        * update `conanfile.py`
        * update `CMakeLists.txt`
        * update `CHANGELOG.md` with empty `[Unreleased]` sections.
        * Don't forget to update cppintest.
        ......@@ -136,6 +136,18 @@
        include(CMakeParseArguments)
        option(CODE_COVERAGE_VERBOSE "Verbose information" FALSE)
        option(SKIP_CODE_COVERAGE "Skip code coverage" OFF)
        if (SKIP_CODE_COVERAGE)
        return()
        endif()
        find_library(covlib NAMES gcov lcov)
        message(STATUS "covlib: >${covlib}<")
        if (${covlib} STREQUAL "covlib-NOTFOUND")
        message(STATUS "lcov or gcov libraries not found, skipping code coverage.")
        return()
        endif()
        # Check prereqs
        find_program( GCOV_PATH gcov )
        ......
        ......@@ -3,24 +3,42 @@ from conans import ConanFile, CMake, tools
        class CaosdbConan(ConanFile):
        name = "caosdb"
        version = "0.0.13"
        version = "0.3.0-dev"
        license = "AGPL-3.0-or-later"
        author = "Timm C. Fitschen <t.fitschen@indiscale.com>"
        url = "https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib.git"
        description = "C++ library for the CaosDB project"
        topics = ("data management", "caosdb")
        settings = "os", "compiler", "build_type", "arch"
        options = {"shared": [True, False], "fPIC": [True, False]}
        default_options = {"shared": False, "fPIC": True}
        options = {
        "shared": [True, False],
        "fPIC": [True, False],
        "build_acm": [True, False],
        }
        default_options = {
        "shared": False,
        "fPIC": True,
        "build_acm": False,
        }
        generators = "cmake"
        requires = [("boost/1.76.0"), ("gtest/1.11.0"), ("grpc/1.38.0")]
        exports = "*.cpp", "*.h", "*.cmake", "*CMakeLists.txt", "*.in", "*.proto", "*.c"
        requires = [
        ("grpc/1.48.0"),
        ]
        build_requires = [
        ("boost/1.78.0"),
        ("gtest/1.11.0"),
        ]
        exports = ("*.cmake", "*CMakeLists.txt", "*.in",
        "*.h", "*.proto", "*.c", "*.cpp",
        "*.rst", "*.md",
        )
        exports_sources = "src", "doc", "include", "test", "cmake", "proto"
        def config_options(self):
        if self.settings.os == "Windows":
        del self.options.fPIC
        self.options["boost"].without_python = True
        self.options["boost"].filesystem_version = "3"
        # def source(self):
        # self.run("git clone https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib.git")
        ......@@ -32,14 +50,12 @@ class CaosdbConan(ConanFile):
        def build(self):
        cmake = CMake(self)
        if self.options.build_acm:
        cmake.definitions["BUILD_ACM"] = "On"
        cmake.configure(source_folder="")
        cmake.build()
        # Explicit way:
        # self.run('cmake %s/hello %s'
        # % (self.source_folder, cmake.command_line))
        # self.run("cmake --build . %s" % cmake.build_config)
        def package(self):
        self.copy("*.h", dst="include", src="include")
        self.copy("*.dll", dst="bin", keep_path=False)
        ......
        # Changelog
        All notable changes to this project will be documented in this file.
        The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
        and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
        ## [Unreleased] - YYYY-MM-DD ##
        (*Maintainer*)
        ### Added
        - Connection::ListUsers method
        ### Changed
        - Updated dependency versions.
        ### Deprecated
        ### Removed
        ### Fixed
        - Values can now hold empty vectors and do not silently convert them into a scalar.
        ### Security
        ### Documentation
        ## [0.2.2] - 2023-06-15 ##
        (Timm Fitschen)
        ### Added
        * Support for `SELECT` queries.
        ## [0.2.1] - 2022-09-22 ##
        (Daniel Hornung)
        ### Changed ###
        * Updated dependencies
        * Simplified implementation code a bit
        ## [0.2.0] - 2022-07-13
        (Timm Fitschen)
        ### Added
        * Simple `User` class and methods for user creation/retrieval/deletion.
        * Added more variants for the `operator<<` of `LoggerOutputStream` (for `bool`
        and `std::endl`).
        ### Changed
        * Transaction::ExecuteAsynchronously is actually asynchronous now.
        * Removed boost from the headers. Boost is only a build dependency from now on.
        ### Fixed
        * Calling "GetFileDescriptor().wrapped->path()" after retrieval leads to SegFault.
        * #41 Updated Conan version in CI pipeline.
        ## [0.1.2] - 2022-05-31
        (Florian Spreckelsen)
        ### Fixed
        * #41 Updated Conan version in CI pipeline.
        ## [0.1.1 - 2022-04-12]
        ### Security
        * Bumped zlib dependency to 1.2.12.
        ## [0.1.0 - 2021-12-11]
        Initial Release.
        Please review [FEATURES.md](./FEATURES.md) for an overview of the features of
        this library. Apart from that, the API documentation for
        [C++](https://docs.indiscale.com/caosdb-cpplib/cppapi/index.html) and [plain
        old C](https://docs.indiscale.com/caosdb-cpplib/capi/index.html) specify the
        public API.
        Note that this is still a pre-stable release as indicated by the major version
        number. The API is still under development and is likely to change.
        ......@@ -18,6 +18,7 @@
        # along with this program. If not, see <https://www.gnu.org/licenses/>.
        #
        cmake_minimum_required(VERSION 3.13)
        find_package(Doxygen)
        if (DOXYGEN_FOUND)
        ......@@ -83,18 +84,22 @@ if (DOXYGEN_FOUND)
        sphinx_out
        DEPENDS doc-doxygen
        Examples.rst
        README_SETUP.md
        Install_develop.rst
        FEATURES.md
        CHANGELOG.md
        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
        COMMENT "Generating API documentation with Sphinx"
        VERBATIM
        )
        # Copying files is necessary: https://stackoverflow.com/a/45808534/232888
        # TODO fix for docs
        #FILE(COPY
        #Examples.rst
        #README_SETUP.md
        file(COPY
        Examples.rst
        Install_develop.rst
        DEPENDENCIES.md
        CHANGELOG.md
        FEATURES.md
        # Tutorial.rst
        #DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
        DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
        else ()
        message("Sphinx need to be installed to generate the sphinx documentation")
        endif ()
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment