Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions .github/actions/CMake/action.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/actions/cmake-build/action.yml
Original file line number Diff line number Diff line change
@@ -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: ${{ 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
working-directory: ${{ inputs.build-dir }}
run: cmake --build . --config ${{ inputs.build-type }}
shell: pwsh
20 changes: 20 additions & 0 deletions .github/actions/conan-install/action.yml
Original file line number Diff line number Diff line change
@@ -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: pwsh

- name: Install Conan Packages in ${{ inputs.install-dir }}
run: conan install . --output-folder=${{ inputs.install-dir }} --build=missing
shell: pwsh
45 changes: 0 additions & 45 deletions .github/workflows/BasicTest.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/DevCI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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

jobs:
test:
strategy:
fail-fast: false
matrix:
libraryType: [HeaderOnly, Static, Shared]
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 }}
library-type: ${{ matrix.libraryType }}

- name: Test
working-directory: ${{ env.BUILD_DIR }}
run: ctest -C ${{env.BUILD_TYPE}}
150 changes: 150 additions & 0 deletions .github/workflows/MainCI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
name: MainCI

on:
push:
branches: ["main"]
paths-ignore:
- "Docs/**"
- ".readthedocs.yaml"
- "Readme.md"
pull_request:
branches: ["main"]
paths-ignore:
- "Docs/**"
- ".readthedocs.yaml"
- "Readme.md"

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
working-directory: ${{ env.BUILD_DIR }}
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
working-directory: ${{ env.BUILD_DIR }}
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
working-directory: ${{ env.BUILD_DIR }}
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
working-directory: ${{ env.BUILD_DIR }}
run: ctest -C ${{env.BUILD_TYPE}}
5 changes: 0 additions & 5 deletions Include/SevenBit/DI/Details/Impl/ServicesMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions Include/SevenBit/DI/Details/ServiceDescriptorList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down
7 changes: 5 additions & 2 deletions Include/SevenBit/DI/Details/ServiceList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }
Expand Down
Loading