Skip to content

Commit e1e0224

Browse files
authored
Merge pull request #6 from 7bitcoder/dev
Update CI and docs
2 parents 70521c6 + c1e08c7 commit e1e0224

File tree

13 files changed

+268
-108
lines changed

13 files changed

+268
-108
lines changed

.github/actions/CMake/action.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Run CMake
2+
description: "Runs CMake"
3+
inputs:
4+
args:
5+
description: "Other arguments"
6+
required: false
7+
default: -DBUILD_TESTS:BOOL=true -DBUILD_EXAMPLES:BOOL=true
8+
build-type:
9+
description: "Build type"
10+
required: false
11+
default: Release
12+
toolchain:
13+
description: "Toolchain file"
14+
required: false
15+
default: conan_toolchain.cmake
16+
library-type:
17+
description: "Library type"
18+
required: false
19+
default: Static
20+
build-dir:
21+
description: "Build directory"
22+
required: true
23+
24+
runs:
25+
using: composite
26+
steps:
27+
- name: Configure CMake
28+
working-directory: ${{ inputs.build-dir }}
29+
run: cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DLIBRARY_TYPE=${{ inputs.library-type }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }}
30+
shell: pwsh
31+
32+
- name: Build
33+
working-directory: ${{ inputs.build-dir }}
34+
run: cmake --build . --config ${{ inputs.build-type }}
35+
shell: pwsh
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Run CMake
2+
description: "Runs CMake"
3+
inputs:
4+
install-dir:
5+
description: "Installation directory"
6+
required: true
7+
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Install Conan
12+
uses: turtlebrowser/get-conan@main
13+
14+
- name: Configure Conan
15+
run: conan profile detect
16+
shell: pwsh
17+
18+
- name: Install Conan Packages in ${{ inputs.install-dir }}
19+
run: conan install . --output-folder=${{ inputs.install-dir }} --build=missing
20+
shell: pwsh

.github/workflows/BasicTest.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/DevCI.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: DevCI
2+
3+
on:
4+
push:
5+
branches: ["dev"]
6+
paths-ignore:
7+
- "Docs/**"
8+
- ".readthedocs.yaml"
9+
- "Readme.md"
10+
pull_request:
11+
branches: ["dev"]
12+
paths-ignore:
13+
- "Docs/**"
14+
- ".readthedocs.yaml"
15+
- "Readme.md"
16+
env:
17+
BUILD_TYPE: Release
18+
BUILD_DIR: ${{github.workspace}}/build
19+
20+
jobs:
21+
test:
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
libraryType: [HeaderOnly, Static, Shared]
26+
os: [ubuntu-22.04, macos-12, windows-2022]
27+
28+
runs-on: ${{matrix.os}}
29+
30+
steps:
31+
- uses: actions/checkout@v3
32+
33+
- name: Install Conan Packages
34+
uses: ./.github/actions/conan-install
35+
with:
36+
install-dir: ${{ env.BUILD_DIR }}
37+
38+
- name: CMake Build
39+
uses: ./.github/actions/cmake-build
40+
with:
41+
build-dir: ${{ env.BUILD_DIR }}
42+
build-type: ${{ env.BUILD_TYPE }}
43+
library-type: ${{ matrix.libraryType }}
44+
45+
- name: Test
46+
working-directory: ${{ env.BUILD_DIR }}
47+
run: ctest -C ${{env.BUILD_TYPE}}

.github/workflows/MainCI.yml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
name: MainCI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths-ignore:
7+
- "Docs/**"
8+
- ".readthedocs.yaml"
9+
- "Readme.md"
10+
pull_request:
11+
branches: ["main"]
12+
paths-ignore:
13+
- "Docs/**"
14+
- ".readthedocs.yaml"
15+
- "Readme.md"
16+
17+
env:
18+
BUILD_TYPE: Release
19+
BUILD_DIR: ${{github.workspace}}/build
20+
21+
jobs:
22+
test-gcc:
23+
strategy:
24+
matrix:
25+
libraryType: [HeaderOnly, Static, Shared]
26+
version: [7, 10, 12]
27+
os: [ubuntu-22.04]
28+
29+
runs-on: ${{ matrix.os }}
30+
31+
steps:
32+
- uses: actions/checkout@v3
33+
34+
- name: Install GCC
35+
uses: egor-tensin/setup-gcc@v1.3
36+
with:
37+
version: ${{ matrix.version }}
38+
39+
- name: Install Conan Packages
40+
uses: ./.github/actions/conan-install
41+
with:
42+
install-dir: ${{ env.BUILD_DIR }}
43+
44+
- name: CMake Build
45+
uses: ./.github/actions/cmake-build
46+
with:
47+
build-dir: ${{ env.BUILD_DIR }}
48+
build-type: ${{ env.BUILD_TYPE }}
49+
50+
- name: Test
51+
working-directory: ${{ env.BUILD_DIR }}
52+
run: ctest -C ${{env.BUILD_TYPE}}
53+
54+
test-mingw:
55+
strategy:
56+
matrix:
57+
libraryType: [HeaderOnly, Static]
58+
version: [7, 10, 12]
59+
os: [windows-2022]
60+
61+
runs-on: ${{ matrix.os }}
62+
63+
steps:
64+
- uses: actions/checkout@v3
65+
66+
- name: Install MinGW
67+
uses: egor-tensin/setup-mingw@v2.2.0
68+
with:
69+
version: ${{ matrix.version }}
70+
71+
- name: Install Conan Packages
72+
uses: ./.github/actions/conan-install
73+
with:
74+
install-dir: ${{ env.BUILD_DIR }}
75+
76+
- name: CMake Build
77+
uses: ./.github/actions/cmake-build
78+
with:
79+
build-dir: ${{ env.BUILD_DIR }}
80+
build-type: ${{ env.BUILD_TYPE }}
81+
82+
- name: Test
83+
working-directory: ${{ env.BUILD_DIR }}
84+
run: ctest -C ${{env.BUILD_TYPE}}
85+
86+
test-clang:
87+
strategy:
88+
matrix:
89+
libraryType: [HeaderOnly, Static]
90+
version: [6, 10, 15]
91+
os: [windows-2022, ubuntu-22.04]
92+
93+
runs-on: ${{ matrix.os }}
94+
95+
steps:
96+
- uses: actions/checkout@v3
97+
98+
- name: Install Clang
99+
uses: egor-tensin/setup-clang@v1.4
100+
with:
101+
version: ${{ matrix.version }}
102+
103+
- name: Install Conan Packages
104+
uses: ./.github/actions/conan-install
105+
with:
106+
install-dir: ${{ env.BUILD_DIR }}
107+
108+
- name: CMake Build
109+
uses: ./.github/actions/cmake-build
110+
with:
111+
build-dir: ${{ env.BUILD_DIR }}
112+
build-type: ${{ env.BUILD_TYPE }}
113+
114+
- name: Test
115+
working-directory: ${{ env.BUILD_DIR }}
116+
run: ctest -C ${{env.BUILD_TYPE}}
117+
118+
test-msvc:
119+
strategy:
120+
fail-fast: false
121+
matrix:
122+
libraryType: [HeaderOnly, Static]
123+
version: [14, 15, 17]
124+
os: [windows-2022]
125+
126+
runs-on: ${{ matrix.os }}
127+
128+
steps:
129+
- uses: actions/checkout@v3
130+
131+
- name: Install MSVC
132+
uses: TheMrMilchmann/setup-msvc-dev@v2.0.0
133+
with:
134+
toolset: ${{ matrix.version }}
135+
arch: x64
136+
137+
- name: Install Conan Packages
138+
uses: ./.github/actions/conan-install
139+
with:
140+
install-dir: ${{ env.BUILD_DIR }}
141+
142+
- name: CMake Build
143+
uses: ./.github/actions/cmake-build
144+
with:
145+
build-dir: ${{ env.BUILD_DIR }}
146+
build-type: ${{ env.BUILD_TYPE }}
147+
148+
- name: Test
149+
working-directory: ${{ env.BUILD_DIR }}
150+
run: ctest -C ${{env.BUILD_TYPE}}

Include/SevenBit/DI/Details/Impl/ServicesMap.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ namespace sb::di::details
2727
return it != _serviceListMap.end() ? &it->second : nullptr;
2828
}
2929

30-
INLINE const ServiceList *ServicesMap::getList(TypeId serviceTypeId) const
31-
{
32-
auto it = _serviceListMap.find(serviceTypeId);
33-
return it != _serviceListMap.end() ? &it->second : nullptr;
34-
}
3530
INLINE void ServicesMap::clear()
3631
{
3732
if (_strongDestructionOrder)

Include/SevenBit/DI/Details/ServiceDescriptorList.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ namespace sb::di::details
1919
public:
2020
ServiceDescriptorList() = default;
2121

22-
ServiceDescriptorList(ServiceDescriptorList &&) = default;
2322
ServiceDescriptorList(const ServiceDescriptorList &) = delete;
24-
ServiceDescriptorList &operator=(const ServiceDescriptorList &) = delete;
23+
ServiceDescriptorList(ServiceDescriptorList &&) = default;
24+
2525
ServiceDescriptorList &operator=(ServiceDescriptorList &&) = default;
26+
ServiceDescriptorList &operator=(const ServiceDescriptorList &) = delete;
2627

2728
auto begin() const { return _serviceDescriptors.begin(); }
2829
auto end() const { return _serviceDescriptors.end(); }

Include/SevenBit/DI/Details/ServiceList.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ namespace sb::di::details
2020
public:
2121
ServiceList() = default;
2222

23+
// fix compilation errors should not be used!!
24+
ServiceList(const ServiceList &) {};
2325
ServiceList(ServiceList &&) = default;
24-
ServiceList(const ServiceList &) = delete;
25-
ServiceList &operator=(const ServiceList &) = delete;
26+
27+
// fix compilation errors should not be used!!
28+
ServiceList &operator=(const ServiceList &) { return *this; };
2629
ServiceList &operator=(ServiceList &&) = default;
2730

2831
auto begin() const { return _services.begin(); }

0 commit comments

Comments
 (0)