File tree Expand file tree Collapse file tree 5 files changed +16
-13
lines changed Expand file tree Collapse file tree 5 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 25
25
virtualenvs-create : true
26
26
virtualenvs-in-project : true
27
27
- name : Install Python dependencies
28
- run : |
29
- poetry --version
30
- poetry install --no-interaction
28
+ run : poetry install --no-interaction
31
29
- name : Build the game
32
30
run : python -m build --executable
33
31
- name : Upload the release
Original file line number Diff line number Diff line change @@ -45,19 +45,23 @@ jobs:
45
45
steps :
46
46
- name : Checkout repository
47
47
uses : actions/checkout@v4.1.1
48
+ - name : Set up MSVC
49
+ uses : ilammy/msvc-dev-cmd@v1.12.1
48
50
- name : Set up CMake
49
51
uses : lukka/get-cmake@v3.27.7
50
- - name : Configure and build CMake
52
+ - name : Build CMake and run CTest
51
53
working-directory : ${{ github.workspace }}/src/hades_extensions
52
54
run : |
53
- cmake --preset Coverage
55
+ cmake -DDO_PYTHON=OFF - -preset Coverage
54
56
cmake --build build-coverage
55
- - name : Run CTest and generate the coverage report
57
+ ctest --output-on-failure --no-tests=error --test-dir ${{ github.workspace }}/src/hades_extensions/build-coverage/tests
58
+ - name : Generate the coverage report
59
+ if : matrix.os == 'ubuntu-latest'
56
60
run : |
57
61
pip install gcovr
58
- ctest --output-on-failure --no-tests=error --test-dir ${{ github.workspace }}/src/hades_extensions/build-coverage/tests
59
62
gcovr -r ${{ github.workspace }} --exclude src/hades_extensions/build-coverage --exclude src/hades_extensions/tests --exclude src/hades_extensions/src/binding.cpp --coveralls coverage.json
60
63
- name : Upload coverage report
64
+ if : matrix.os == 'ubuntu-latest'
61
65
uses : coverallsapp/github-action@v2.2.3
62
66
with :
63
67
file : coverage.json
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
6
6
set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
7
7
set (CMAKE_POSITION_INDEPENDENT_CODE ON )
8
8
set (ENABLE_COVERAGE OFF CACHE BOOL "Enable coverage reporting for GCC/Clang" )
9
- set (ENABLE_STATIC_ANALYSIS OFF CACHE BOOL "Enable static analysis using clang-tidy " )
9
+ set (DO_PYTHON ON CACHE BOOL "Enable Python bindings " )
10
10
set (DO_TESTS ON CACHE BOOL "Enable testing" )
11
11
12
12
# Define the module names and initialise the project
@@ -40,6 +40,5 @@ if (DO_TESTS)
40
40
add_subdirectory (tests )
41
41
endif ()
42
42
43
- # TODO: maybe add vcpkg to the c++ project
44
43
# TODO: maybe switch to catch2
45
44
# TODO: maybe change the components to pass by value and use std::move to signify that ownership is being transferred (or find another way)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ find_package(Python COMPONENTS Interpreter Development REQUIRED)
3
3
FetchContent_Declare (
4
4
pybind11_source
5
5
GIT_REPOSITORY https://github.com/pybind/pybind11.git
6
- GIT_TAG v2.10.3
6
+ GIT_TAG v2.11.1
7
7
)
8
8
FetchContent_GetProperties (pybind11_source )
9
9
FetchContent_Populate (pybind11_source )
@@ -30,5 +30,7 @@ add_library(${CPP_LIB} STATIC
30
30
target_include_directories (${CPP_LIB} PUBLIC ${CMAKE_SOURCE_DIR} /include )
31
31
32
32
# Create the Python module
33
- pybind11_add_module (${PY_MODULE} ${CMAKE_SOURCE_DIR} /src/binding.cpp )
34
- target_link_libraries (${PY_MODULE} PRIVATE ${CPP_LIB} )
33
+ if (DO_PYTHON )
34
+ pybind11_add_module (${PY_MODULE} ${CMAKE_SOURCE_DIR} /src/binding.cpp )
35
+ target_link_libraries (${PY_MODULE} PRIVATE ${CPP_LIB} )
36
+ endif ()
Original file line number Diff line number Diff line change 2
2
FetchContent_Declare (
3
3
googletest
4
4
GIT_REPOSITORY https://github.com/google/googletest.git
5
- GIT_TAG v1.13 .0
5
+ GIT_TAG v1.14 .0
6
6
)
7
7
set (gtest_force_shared_crt ON CACHE BOOL "Always use msvcrt.dll" FORCE )
8
8
FetchContent_MakeAvailable (googletest )
You can’t perform that action at this time.
0 commit comments