Skip to content

Commit 01cfb77

Browse files
committed
update ci and doc
1 parent f07693e commit 01cfb77

File tree

8 files changed

+40
-23
lines changed

8 files changed

+40
-23
lines changed

.github/actions/cmake-build/action.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,25 @@ runs:
2626
steps:
2727
- name: Configure CMake
2828
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 }}
29+
run: cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DSEVEN_BIT_DI_BUILD_SHARED=${{ inputs.build-shared }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" -DSEVEN_BIT_DI_BUILD_TESTS_HO:BOOL=${{ inputs.use-header-only }} -DSEVEN_BIT_DI_BUILD_EXAMPLES_HO:BOOL=${{ inputs.use-header-only }} -DSEVEN_BIT_DI_BUILD_TESTS:BOOL=ON -DSEVEN_BIT_DI_BUILD_EXAMPLES:BOOL=ON ${{ inputs.args }}
30+
shell: pwsh
31+
32+
- name: Configure CMake
33+
if: ${{ inputs.library-type }} == "Static"
34+
working-directory: ${{ inputs.build-dir }}
35+
run: cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DSEVEN_BIT_DI_BUILD_SHARED=false -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }}
36+
shell: pwsh
37+
38+
- name: Configure CMake
39+
if: ${{ inputs.library-type }} == "Shared"
40+
working-directory: ${{ inputs.build-dir }}
41+
run: cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DSEVEN_BIT_DI_BUILD_SHARED=true -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" ${{ inputs.args }}
42+
shell: pwsh
43+
44+
- name: Configure CMake
45+
if: ${{ inputs.library-type }} == "HeaderOnly"
46+
working-directory: ${{ inputs.build-dir }}
47+
run: cmake .. -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DCMAKE_TOOLCHAIN_FILE:STRING="${{ inputs.toolchain }}" -DSEVEN_BIT_DI_BUILD_TESTS_HO:BOOL=true -DSEVEN_BIT_DI_BUILD_EXAMPLES_HO:BOOL=true ${{ inputs.args }}
3048
shell: pwsh
3149

3250
- name: Build

.github/workflows/DevCI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
libraryType: [HeaderOnly, Static, Shared]
20+
library-type: [HeaderOnly, Static, Shared]
2121
os: [ubuntu-22.04, macos-12, windows-2022]
2222

2323
runs-on: ${{matrix.os}}
@@ -35,7 +35,7 @@ jobs:
3535
with:
3636
build-dir: ${{ env.BUILD_DIR }}
3737
build-type: ${{ env.BUILD_TYPE }}
38-
library-type: ${{ matrix.libraryType }}
38+
library-type: ${{ matrix.library-type }}
3939

4040
- name: Test
4141
working-directory: ${{ env.BUILD_DIR }}

.github/workflows/MainCI.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
test-gcc:
1717
strategy:
1818
matrix:
19-
libraryType: [Static]
2019
version: [7, 8, 10, 11]
2120
os: [ubuntu-20.04]
2221

@@ -48,7 +47,6 @@ jobs:
4847
test-clang:
4948
strategy:
5049
matrix:
51-
libraryType: [Static]
5250
version: [6, 13, 14, 15]
5351
os: [ubuntu-20.04]
5452

Docs/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ add_custom_target(GenerateDoc
3030
)
3131

3232
include(GNUInstallDirs)
33+
3334
install(DIRECTORY ${SPHINX_BUILD}
34-
DESTINATION ${CMAKE_INSTALL_DOCDIR})
35+
DESTINATION doc)

Docs/getting-started.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ Installation
3737

3838
.. code-block:: CMake
3939
40-
include_directories(/SevenBitDI/include)
40+
include_directories(/SevenBitDI/Include)
4141
4242
#. Building library as Static/Shared
4343
Download source code from the most recent release,
44-
build the project using CMake_, set CMake cache var "LIBRARY_TYPE" to "Static" or "Shared",
44+
build the project using CMake_, set CMake cache var "SEVEN_BIT_DI_BUILD_SHARED" to build Shared library,
4545
run install command
4646

4747
.. code-block:: sh

Examples/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ foreach(SOURCE ${SOURCES})
1010

1111
if(SEVEN_BIT_DI_BUILD_EXAMPLE_HO)
1212
target_link_libraries(${FILE_NAME}
13-
SevenBitDI_header_only
13+
7BitDI_header_only
1414
)
1515
else()
1616
target_link_libraries(${FILE_NAME}
17-
SevenBitDI
17+
7BitDI
1818
)
1919
endif()
2020

Source/CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11

22
if(SEVEB_BIT_DI_BUILD_SHARED OR BUILD_SHARED_LIBS)
3-
add_library(SevenBitDI SHARED
3+
add_library(7BitDI SHARED
44
Source.cpp ${SEVEB_BIT_DI_ALL_HEADERS}
55
)
6-
target_compile_definitions(SevenBitDI PUBLIC SEVEB_BIT_DI_BUILD_SHARED)
6+
target_compile_definitions(7BitDI PUBLIC SEVEB_BIT_DI_BUILD_SHARED)
77
else()
8-
add_library(SevenBitDI STATIC
8+
add_library(7BitDI STATIC
99
Source.cpp ${SEVEB_BIT_DI_ALL_HEADERS}
1010
)
1111
endif()
1212

13-
target_compile_definitions(SevenBitDI PUBLIC SEVEN_BIT_DI_COMPILED_LIB)
13+
target_compile_definitions(7BitDI PUBLIC SEVEN_BIT_DI_COMPILED_LIB)
1414

15-
target_include_directories(SevenBitDI INTERFACE "$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Include>"
15+
target_include_directories(7BitDI INTERFACE "$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Include>"
1616
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
1717

18-
set_target_properties(SevenBitDI PROPERTIES VERSION ${SEVEN_BIT_DI_VERSION})
19-
set_target_properties(SevenBitDI PROPERTIES DEBUG_POSTFIX d)
18+
set_target_properties(7BitDI PROPERTIES VERSION ${SEVEN_BIT_DI_VERSION})
19+
set_target_properties(7BitDI PROPERTIES DEBUG_POSTFIX d)
2020

21-
add_library(SevenBitDI_header_only INTERFACE)
21+
add_library(7BitDI_header_only INTERFACE)
2222

23-
target_include_directories(SevenBitDI_header_only INTERFACE "$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Include>"
23+
target_include_directories(7BitDI_header_only INTERFACE "$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/Include>"
2424
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
2525

2626
install(
27-
TARGETS SevenBitDI SevenBitDI_header_only
28-
EXPORT SevenBitDI)
27+
TARGETS 7BitDI 7BitDI_header_only
28+
EXPORT 7BitDI)

Tests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ target_link_libraries(Tests PUBLIC
1313

1414
if(SEVEN_BIT_DI_BUILD_TESTS_HO)
1515
target_link_libraries(Tests PUBLIC
16-
SevenBitDI_header_only
16+
7BitDI_header_only
1717
)
1818
else()
1919
target_link_libraries(Tests PUBLIC
20-
SevenBitDI
20+
7BitDI
2121
)
2222
endif()
2323

0 commit comments

Comments
 (0)