From 3230c402c505e15ed65f42cc02edb669f7f5f1b3 Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 17:54:45 +0200 Subject: [PATCH 01/11] update CI --- .github/actions/CMake/action.yml | 48 -------- .github/actions/cmake-build/action.yml | 35 ++++++ .github/actions/conan-install/action.yml | 20 ++++ .github/workflows/BasicTest.yml | 45 -------- .github/workflows/DevCI.yml | 38 +++++++ .github/workflows/MainCI.yml | 138 +++++++++++++++++++++++ README.md | 4 +- 7 files changed, 234 insertions(+), 94 deletions(-) delete mode 100644 .github/actions/CMake/action.yml create mode 100644 .github/actions/cmake-build/action.yml create mode 100644 .github/actions/conan-install/action.yml delete mode 100644 .github/workflows/BasicTest.yml create mode 100644 .github/workflows/DevCI.yml create mode 100644 .github/workflows/MainCI.yml diff --git a/.github/actions/CMake/action.yml b/.github/actions/CMake/action.yml deleted file mode 100644 index 2a293ff..0000000 --- a/.github/actions/CMake/action.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Run CMake -description: "Runs CMake" -inputs: - args: - description: "Other arguments" - required: false - default: "" - cmake-version: - description: "The CMake version to run" - required: true - library-type: - description: "Library Type" - required: true - - -runs: - using: composite - steps: - - name: CMake ${{ inputs.cmake-version }} - uses: jwlawson/actions-setup-cmake@v1.13 - with: - cmake-version: "${{ inputs.cmake-version }}" - - - name: Install Conan - uses: turtlebrowser/get-conan@main - - - name: Configure Conan - run: conan profile detect - shell: bash - - - name: Install Conan Packages - run: conan install . --output-folder=${{github.workspace}}/build --build=missing - shell: bash - - - name: Configure CMake - working-directory: ${{github.workspace}}/build - run: cmake .. -DLIBRARY_TYPE=${{ inputs.library-type }} -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS:BOOL=true -DBUILD_EXAMPLES:BOOL=true -DCMAKE_TOOLCHAIN_FILE:STRING="conan_toolchain.cmake" ${{ inputs.args }} - shell: bash - - - name: Build - working-directory: ${{github.workspace}}/build - run: cmake --build . --config ${{ env.BUILD_TYPE }} - shell: bash - - - name: Test - working-directory: ${{github.workspace}}/build - run: ctest -C ${{env.BUILD_TYPE}} - shell: bash diff --git a/.github/actions/cmake-build/action.yml b/.github/actions/cmake-build/action.yml new file mode 100644 index 0000000..ea460ea --- /dev/null +++ b/.github/actions/cmake-build/action.yml @@ -0,0 +1,35 @@ +name: Run CMake +description: "Runs CMake" +inputs: + args: + description: "Other arguments" + required: false + default: -DBUILD_TESTS:BOOL=true -DBUILD_EXAMPLES:BOOL=true + build-type: + description: "Build type" + required: false + default: Release + toolchain: + description: "Toolchain file" + required: false + default: conan_toolchain.cmake + library-type: + description: "Library type" + required: false + default: Static + build-dir: + description: "Build directory" + required: true + +runs: + using: composite + steps: + - name: Configure CMake + working-directory: ${{ input.build-dir }} + run: cmake .. -DCMAKE_BUILD_TYPE=${{ input.build-type }} -DLIBRARY_TYPE=${{ inputs.library-type }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }} + shell: bash + + - name: Build + working-directory: ${{ input.build-dir }} + run: cmake --build . --config ${{ input.build-type }} + shell: bash diff --git a/.github/actions/conan-install/action.yml b/.github/actions/conan-install/action.yml new file mode 100644 index 0000000..84cc2cd --- /dev/null +++ b/.github/actions/conan-install/action.yml @@ -0,0 +1,20 @@ +name: Run CMake +description: "Runs CMake" +inputs: + install-dir: + description: "Installation directory" + required: true + +runs: + using: composite + steps: + - name: Install Conan + uses: turtlebrowser/get-conan@main + + - name: Configure Conan + run: conan profile detect + shell: bash + + - name: Install Conan Packages in ${{ install-dir }} + run: conan install . --output-folder=${{ install-dir }} --build=missing + shell: bash diff --git a/.github/workflows/BasicTest.yml b/.github/workflows/BasicTest.yml deleted file mode 100644 index d3dd3ad..0000000 --- a/.github/workflows/BasicTest.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: BasicTest - -on: - push: - branches: ["dev"] - pull_request: - branches: ["dev"] - -env: - BUILD_TYPE: Release - BUILD_DIR: ${{github.workspace}}/build - -jobs: - test: - strategy: - fail-fast: false - matrix: - libraryType: [Static] - os: [ubuntu-22.04, macos-12, windows-2022] - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v3 - - - name: Install Conan - uses: turtlebrowser/get-conan@main - - - name: Configure Conan - run: conan profile detect - - - name: Install Conan Packages - run: conan install . --output-folder=${{ env.BUILD_DIR }} --build=missing - - - name: Configure CMake - working-directory: ${{ env.BUILD_DIR }} - run: cmake .. -DLIBRARY_TYPE=${{ matrix.libraryType }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_TESTS:BOOL=true -DBUILD_EXAMPLES:BOOL=true -DCMAKE_TOOLCHAIN_FILE:STRING="conan_toolchain.cmake" - - - name: Build - working-directory: ${{ env.BUILD_DIR }} - run: cmake --build . --config ${{ env.BUILD_TYPE }} - - - name: Test - working-directory: ${{ env.BUILD_DIR }} - run: ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/DevCI.yml b/.github/workflows/DevCI.yml new file mode 100644 index 0000000..7644d9c --- /dev/null +++ b/.github/workflows/DevCI.yml @@ -0,0 +1,38 @@ +name: DevCI + +on: + push: + branches: ["dev"] + pull_request: + branches: ["dev"] + +env: + BUILD_TYPE: Release + BUILD_DIR: ${{github.workspace}}/build + +jobs: + test: + strategy: + fail-fast: false + matrix: + libraryType: [Static] + os: [ubuntu-22.04, macos-12, windows-2022] + + runs-on: ${{matrix.os}} + + steps: + - uses: actions/checkout@v3 + + - name: Install Conan Packages + uses: ./.github/actions/conan-install + with: + install-dir: ${{ env.BUILD_DIR }} + + - name: CMake Build + uses: ./.github/actions/cmake-build + with: + build-dir: ${{ env.BUILD_DIR }} + build-type: ${{ env.BUILD_TYPE }} + + - name: Test + run: ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/MainCI.yml b/.github/workflows/MainCI.yml new file mode 100644 index 0000000..9f2333b --- /dev/null +++ b/.github/workflows/MainCI.yml @@ -0,0 +1,138 @@ +name: MainCI + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + BUILD_TYPE: Release + BUILD_DIR: ${{github.workspace}}/build + +jobs: + test-gcc: + strategy: + matrix: + libraryType: [HeaderOnly, Static, Shared] + version: [7, 10, 12] + os: [ubuntu-22.04] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Install GCC + uses: egor-tensin/setup-gcc@v1.3 + with: + version: ${{ matrix.version }} + + - name: Install Conan Packages + uses: ./.github/actions/conan-install + with: + install-dir: ${{ env.BUILD_DIR }} + + - name: CMake Build + uses: ./.github/actions/cmake-build + with: + build-dir: ${{ env.BUILD_DIR }} + build-type: ${{ env.BUILD_TYPE }} + + - name: Test + run: ctest -C ${{env.BUILD_TYPE}} + + test-mingw: + strategy: + matrix: + libraryType: [HeaderOnly, Static] + version: [7, 10, 12] + os: [windows-2022] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Install MinGW + uses: egor-tensin/setup-mingw@v2.2.0 + with: + version: ${{ matrix.version }} + + - name: Install Conan Packages + uses: ./.github/actions/conan-install + with: + install-dir: ${{ env.BUILD_DIR }} + + - name: CMake Build + uses: ./.github/actions/cmake-build + with: + build-dir: ${{ env.BUILD_DIR }} + build-type: ${{ env.BUILD_TYPE }} + + - name: Test + run: ctest -C ${{env.BUILD_TYPE}} + + test-clang: + strategy: + matrix: + libraryType: [HeaderOnly, Static] + version: [6, 10, 15] + os: [windows-2022, ubuntu-22.04] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Install Clang + uses: egor-tensin/setup-clang@v1.4 + with: + version: ${{ matrix.version }} + + - name: Install Conan Packages + uses: ./.github/actions/conan-install + with: + install-dir: ${{ env.BUILD_DIR }} + + - name: CMake Build + uses: ./.github/actions/cmake-build + with: + build-dir: ${{ env.BUILD_DIR }} + build-type: ${{ env.BUILD_TYPE }} + + - name: Test + run: ctest -C ${{env.BUILD_TYPE}} + + test-msvc: + strategy: + fail-fast: false + matrix: + libraryType: [HeaderOnly, Static] + version: [14, 15, 17] + os: [windows-2022] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Install MSVC + uses: TheMrMilchmann/setup-msvc-dev@v2.0.0 + with: + toolset: ${{ matrix.version }} + arch: x64 + + - name: Install Conan Packages + uses: ./.github/actions/conan-install + with: + install-dir: ${{ env.BUILD_DIR }} + + - name: CMake Build + uses: ./.github/actions/cmake-build + with: + build-dir: ${{ env.BUILD_DIR }} + build-type: ${{ env.BUILD_TYPE }} + + - name: Test + run: ctest -C ${{env.BUILD_TYPE}} diff --git a/README.md b/README.md index f37f470..00d5d6e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -[![CI](https://github.com/7bitcoder/7bitinjector/actions/workflows/BasicTest.yml/badge.svg?branch=dev)](https://github.com/7bitcoder/7bitinjector/actions/workflows/BasicTest.ym) +[![DevCI](https://github.com/7bitcoder/7bitinjector/actions/workflows/DevCI.yml/badge.svg?branch=dev)](https://github.com/7bitcoder/7bitinjector/actions/workflows/DevCI.ym) + +[![MainCI](https://github.com/7bitcoder/7bitinjector/actions/workflows/MainCI.yml/badge.svg?branch=main)](https://github.com/7bitcoder/7bitinjector/actions/workflows/MainCI.ym)
logo From ee9bc89dfb106b2b30bd6e6a06b0ade3db459c9b Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 17:57:29 +0200 Subject: [PATCH 02/11] fix CI --- .github/actions/cmake-build/action.yml | 8 ++++---- .github/actions/conan-install/action.yml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/cmake-build/action.yml b/.github/actions/cmake-build/action.yml index ea460ea..7befe95 100644 --- a/.github/actions/cmake-build/action.yml +++ b/.github/actions/cmake-build/action.yml @@ -25,11 +25,11 @@ runs: using: composite steps: - name: Configure CMake - working-directory: ${{ input.build-dir }} - run: cmake .. -DCMAKE_BUILD_TYPE=${{ input.build-type }} -DLIBRARY_TYPE=${{ inputs.library-type }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }} + working-directory: ${{ inputs.build-dir }} + run: cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DLIBRARY_TYPE=${{ inputs.library-type }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }} shell: bash - name: Build - working-directory: ${{ input.build-dir }} - run: cmake --build . --config ${{ input.build-type }} + working-directory: ${{ inputs.build-dir }} + run: cmake --build . --config ${{ inputs.build-type }} shell: bash diff --git a/.github/actions/conan-install/action.yml b/.github/actions/conan-install/action.yml index 84cc2cd..e271b52 100644 --- a/.github/actions/conan-install/action.yml +++ b/.github/actions/conan-install/action.yml @@ -15,6 +15,6 @@ runs: run: conan profile detect shell: bash - - name: Install Conan Packages in ${{ install-dir }} - run: conan install . --output-folder=${{ install-dir }} --build=missing + - name: Install Conan Packages in ${{ inputs.install-dir }} + run: conan install . --output-folder=${{ inputs.install-dir }} --build=missing shell: bash From e9eefd02dd685552891bd9b33aab4b914f82c789 Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 18:01:34 +0200 Subject: [PATCH 03/11] update test dir --- .github/workflows/DevCI.yml | 1 + .github/workflows/MainCI.yml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/DevCI.yml b/.github/workflows/DevCI.yml index 7644d9c..3dd8b17 100644 --- a/.github/workflows/DevCI.yml +++ b/.github/workflows/DevCI.yml @@ -35,4 +35,5 @@ jobs: build-type: ${{ env.BUILD_TYPE }} - name: Test + working-directory: ${{ env.BUILD_DIR }} run: ctest -C ${{env.BUILD_TYPE}} diff --git a/.github/workflows/MainCI.yml b/.github/workflows/MainCI.yml index 9f2333b..2444695 100644 --- a/.github/workflows/MainCI.yml +++ b/.github/workflows/MainCI.yml @@ -40,6 +40,7 @@ jobs: build-type: ${{ env.BUILD_TYPE }} - name: Test + working-directory: ${{ env.BUILD_DIR }} run: ctest -C ${{env.BUILD_TYPE}} test-mingw: @@ -71,6 +72,7 @@ jobs: build-type: ${{ env.BUILD_TYPE }} - name: Test + working-directory: ${{ env.BUILD_DIR }} run: ctest -C ${{env.BUILD_TYPE}} test-clang: @@ -102,6 +104,7 @@ jobs: build-type: ${{ env.BUILD_TYPE }} - name: Test + working-directory: ${{ env.BUILD_DIR }} run: ctest -C ${{env.BUILD_TYPE}} test-msvc: @@ -135,4 +138,5 @@ jobs: build-type: ${{ env.BUILD_TYPE }} - name: Test + working-directory: ${{ env.BUILD_DIR }} run: ctest -C ${{env.BUILD_TYPE}} From cac8c540f8b6bae159a974e42162870c5ad61541 Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 18:13:27 +0200 Subject: [PATCH 04/11] fix CI --- .github/actions/cmake-build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/cmake-build/action.yml b/.github/actions/cmake-build/action.yml index 7befe95..e1ded1c 100644 --- a/.github/actions/cmake-build/action.yml +++ b/.github/actions/cmake-build/action.yml @@ -27,9 +27,9 @@ runs: - name: Configure CMake working-directory: ${{ inputs.build-dir }} run: cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DLIBRARY_TYPE=${{ inputs.library-type }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }} - shell: bash + shell: pwsh - name: Build working-directory: ${{ inputs.build-dir }} run: cmake --build . --config ${{ inputs.build-type }} - shell: bash + shell: pwsh From 6779e9d735d76fc60422a12f94154d24bdca9aa1 Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 18:24:17 +0200 Subject: [PATCH 05/11] fix CI --- .github/actions/cmake-build/action.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/actions/cmake-build/action.yml b/.github/actions/cmake-build/action.yml index e1ded1c..0df9f9a 100644 --- a/.github/actions/cmake-build/action.yml +++ b/.github/actions/cmake-build/action.yml @@ -25,11 +25,9 @@ runs: using: composite steps: - name: Configure CMake - working-directory: ${{ inputs.build-dir }} - run: cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DLIBRARY_TYPE=${{ inputs.library-type }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }} + run: cd ${{ inputs.build-dir }} && cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DLIBRARY_TYPE=${{ inputs.library-type }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }} shell: pwsh - name: Build - working-directory: ${{ inputs.build-dir }} - run: cmake --build . --config ${{ inputs.build-type }} + run: cd ${{ inputs.build-dir }} && cmake --build . --config ${{ inputs.build-type }} shell: pwsh From 7f3b6fb8761adfa9f624d10abcd6b2a5d36d109c Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 18:31:22 +0200 Subject: [PATCH 06/11] fix CI --- .github/actions/cmake-build/action.yml | 6 ++++-- .github/actions/conan-install/action.yml | 4 ++-- .github/workflows/DevCI.yml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/actions/cmake-build/action.yml b/.github/actions/cmake-build/action.yml index 0df9f9a..e1ded1c 100644 --- a/.github/actions/cmake-build/action.yml +++ b/.github/actions/cmake-build/action.yml @@ -25,9 +25,11 @@ runs: using: composite steps: - name: Configure CMake - run: cd ${{ inputs.build-dir }} && cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DLIBRARY_TYPE=${{ inputs.library-type }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }} + working-directory: ${{ inputs.build-dir }} + run: cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DLIBRARY_TYPE=${{ inputs.library-type }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }} shell: pwsh - name: Build - run: cd ${{ inputs.build-dir }} && cmake --build . --config ${{ inputs.build-type }} + working-directory: ${{ inputs.build-dir }} + run: cmake --build . --config ${{ inputs.build-type }} shell: pwsh diff --git a/.github/actions/conan-install/action.yml b/.github/actions/conan-install/action.yml index e271b52..c8b2cf0 100644 --- a/.github/actions/conan-install/action.yml +++ b/.github/actions/conan-install/action.yml @@ -13,8 +13,8 @@ runs: - name: Configure Conan run: conan profile detect - shell: bash + shell: pwsh - name: Install Conan Packages in ${{ inputs.install-dir }} run: conan install . --output-folder=${{ inputs.install-dir }} --build=missing - shell: bash + shell: pwsh diff --git a/.github/workflows/DevCI.yml b/.github/workflows/DevCI.yml index 3dd8b17..669ff74 100644 --- a/.github/workflows/DevCI.yml +++ b/.github/workflows/DevCI.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: libraryType: [Static] - os: [ubuntu-22.04, macos-12, windows-2022] + os: [windows-2022] runs-on: ${{matrix.os}} From 5f5490ce0ac13b30de574c7ae01ea613101ac6b0 Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 18:37:07 +0200 Subject: [PATCH 07/11] enable all in dev ci --- .github/workflows/DevCI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/DevCI.yml b/.github/workflows/DevCI.yml index 669ff74..dccb78a 100644 --- a/.github/workflows/DevCI.yml +++ b/.github/workflows/DevCI.yml @@ -15,8 +15,8 @@ jobs: strategy: fail-fast: false matrix: - libraryType: [Static] - os: [windows-2022] + libraryType: [HeaderOnly, Static, Shared] + os: [ubuntu-22.04, macos-12, windows-2022] runs-on: ${{matrix.os}} From c9287f10dedc15ca59e7f844bce863cdc5d87a9a Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 18:39:10 +0200 Subject: [PATCH 08/11] update dev CI --- .github/workflows/DevCI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/DevCI.yml b/.github/workflows/DevCI.yml index dccb78a..b8d053b 100644 --- a/.github/workflows/DevCI.yml +++ b/.github/workflows/DevCI.yml @@ -33,6 +33,7 @@ jobs: with: build-dir: ${{ env.BUILD_DIR }} build-type: ${{ env.BUILD_TYPE }} + library-type: ${{ matrix.libraryType }} - name: Test working-directory: ${{ env.BUILD_DIR }} From 5a9997aa376d24cd4133dedfdf158acb60a5accc Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 19:52:11 +0200 Subject: [PATCH 09/11] fix compilation error shared lib msvc --- Include/SevenBit/DI/Details/Impl/ServicesMap.hpp | 5 ----- Include/SevenBit/DI/Details/ServiceDescriptorList.hpp | 5 +++-- Include/SevenBit/DI/Details/ServiceList.hpp | 7 +++++-- Include/SevenBit/DI/Details/ServicesMap.hpp | 2 -- Include/SevenBit/DI/Export.hpp | 4 +++- Source/Source.cpp | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Include/SevenBit/DI/Details/Impl/ServicesMap.hpp b/Include/SevenBit/DI/Details/Impl/ServicesMap.hpp index 4c6971d..20eda12 100644 --- a/Include/SevenBit/DI/Details/Impl/ServicesMap.hpp +++ b/Include/SevenBit/DI/Details/Impl/ServicesMap.hpp @@ -27,11 +27,6 @@ namespace sb::di::details return it != _serviceListMap.end() ? &it->second : nullptr; } - INLINE const ServiceList *ServicesMap::getList(TypeId serviceTypeId) const - { - auto it = _serviceListMap.find(serviceTypeId); - return it != _serviceListMap.end() ? &it->second : nullptr; - } INLINE void ServicesMap::clear() { if (_strongDestructionOrder) diff --git a/Include/SevenBit/DI/Details/ServiceDescriptorList.hpp b/Include/SevenBit/DI/Details/ServiceDescriptorList.hpp index cb22ebc..e4d0bd8 100644 --- a/Include/SevenBit/DI/Details/ServiceDescriptorList.hpp +++ b/Include/SevenBit/DI/Details/ServiceDescriptorList.hpp @@ -19,10 +19,11 @@ namespace sb::di::details public: ServiceDescriptorList() = default; - ServiceDescriptorList(ServiceDescriptorList &&) = default; ServiceDescriptorList(const ServiceDescriptorList &) = delete; - ServiceDescriptorList &operator=(const ServiceDescriptorList &) = delete; + ServiceDescriptorList(ServiceDescriptorList &&) = default; + ServiceDescriptorList &operator=(ServiceDescriptorList &&) = default; + ServiceDescriptorList &operator=(const ServiceDescriptorList &) = delete; auto begin() const { return _serviceDescriptors.begin(); } auto end() const { return _serviceDescriptors.end(); } diff --git a/Include/SevenBit/DI/Details/ServiceList.hpp b/Include/SevenBit/DI/Details/ServiceList.hpp index 9afbbb1..57a804e 100644 --- a/Include/SevenBit/DI/Details/ServiceList.hpp +++ b/Include/SevenBit/DI/Details/ServiceList.hpp @@ -20,9 +20,12 @@ namespace sb::di::details public: ServiceList() = default; + // fix compilation errors should not be used!! + ServiceList(const ServiceList &) {}; ServiceList(ServiceList &&) = default; - ServiceList(const ServiceList &) = delete; - ServiceList &operator=(const ServiceList &) = delete; + + // fix compilation errors should not be used!! + ServiceList &operator=(const ServiceList &) { return *this; }; ServiceList &operator=(ServiceList &&) = default; auto begin() const { return _services.begin(); } diff --git a/Include/SevenBit/DI/Details/ServicesMap.hpp b/Include/SevenBit/DI/Details/ServicesMap.hpp index 240678c..c59147a 100644 --- a/Include/SevenBit/DI/Details/ServicesMap.hpp +++ b/Include/SevenBit/DI/Details/ServicesMap.hpp @@ -30,8 +30,6 @@ namespace sb::di::details ServiceList *getList(TypeId serviceTypeId); - const ServiceList *getList(TypeId serviceTypeId) const; - void clear(); ~ServicesMap(); diff --git a/Include/SevenBit/DI/Export.hpp b/Include/SevenBit/DI/Export.hpp index c81d3db..520f6bf 100644 --- a/Include/SevenBit/DI/Export.hpp +++ b/Include/SevenBit/DI/Export.hpp @@ -7,9 +7,11 @@ #if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64) // Microsoft -#if defined(SevenBitInjector_EXPORTS) +#ifdef SevenBitInjector_EXPORTS +/* We are building this library */ #define EXPORT __declspec(dllexport) #else +/* We are using this library */ #define EXPORT __declspec(dllimport) #endif diff --git a/Source/Source.cpp b/Source/Source.cpp index 39ac278..fe1f078 100644 --- a/Source/Source.cpp +++ b/Source/Source.cpp @@ -2,6 +2,8 @@ #include "ConfigCheck.hpp" #include "SevenBit/DI/Details/Impl/CircularDependencyGuard.hpp" +#include "SevenBit/DI/Details/Impl/DefaultServiceProvider.hpp" +#include "SevenBit/DI/Details/Impl/DefaultServiceProviderRoot.hpp" #include "SevenBit/DI/Details/Impl/Exceptions.hpp" #include "SevenBit/DI/Details/Impl/ScopedGuard.hpp" #include "SevenBit/DI/Details/Impl/ServiceCollection.hpp" @@ -10,6 +12,4 @@ #include "SevenBit/DI/Details/Impl/ServiceDescriptorsMap.hpp" #include "SevenBit/DI/Details/Impl/ServiceLifeTime.hpp" #include "SevenBit/DI/Details/Impl/ServiceList.hpp" -#include "SevenBit/DI/Details/Impl/DefaultServiceProvider.hpp" -#include "SevenBit/DI/Details/Impl/DefaultServiceProviderRoot.hpp" #include "SevenBit/DI/Details/Impl/ServicesMap.hpp" \ No newline at end of file From d288a5fe09c521b01ec2a9875ae1bfe002b27b53 Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 20:09:35 +0200 Subject: [PATCH 10/11] update CIs --- .github/workflows/DevCI.yml | 9 ++++++++- .github/workflows/MainCI.yml | 12 ++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/DevCI.yml b/.github/workflows/DevCI.yml index b8d053b..6e57f91 100644 --- a/.github/workflows/DevCI.yml +++ b/.github/workflows/DevCI.yml @@ -3,9 +3,16 @@ name: DevCI on: push: branches: ["dev"] + paths-ignore: + - "Docs/**" + - ".readthedocs.yaml" + - "Readme.md" pull_request: branches: ["dev"] - + paths-ignore: + - "Docs/**" + - ".readthedocs.yaml" + - "Readme.md" env: BUILD_TYPE: Release BUILD_DIR: ${{github.workspace}}/build diff --git a/.github/workflows/MainCI.yml b/.github/workflows/MainCI.yml index 2444695..ede4e8d 100644 --- a/.github/workflows/MainCI.yml +++ b/.github/workflows/MainCI.yml @@ -2,9 +2,17 @@ name: MainCI on: push: - branches: ["main"] + branches: ["dev"] + paths-ignore: + - "Docs/**" + - ".readthedocs.yaml" + - "Readme.md" pull_request: - branches: ["main"] + branches: ["dev"] + paths-ignore: + - "Docs/**" + - ".readthedocs.yaml" + - "Readme.md" env: BUILD_TYPE: Release From c1e08c7b31e3b921a9c70d13916ae0539c569c8a Mon Sep 17 00:00:00 2001 From: 7bitcoder Date: Fri, 12 May 2023 20:10:56 +0200 Subject: [PATCH 11/11] update CIs --- .github/workflows/MainCI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/MainCI.yml b/.github/workflows/MainCI.yml index ede4e8d..c2737d3 100644 --- a/.github/workflows/MainCI.yml +++ b/.github/workflows/MainCI.yml @@ -2,13 +2,13 @@ name: MainCI on: push: - branches: ["dev"] + branches: ["main"] paths-ignore: - "Docs/**" - ".readthedocs.yaml" - "Readme.md" pull_request: - branches: ["dev"] + branches: ["main"] paths-ignore: - "Docs/**" - ".readthedocs.yaml"