Update CMake configuration and CI/CD workflows
- Upgraded CMake minimum version requirement to 3.16 and updated project version to 0.3.0. - Introduced new CMake presets for build configurations, including default, debug, and release options. - Added CI/CD workflows for continuous integration and release management, enhancing automated testing and deployment processes. - Integrated Asar assembler support with new wrapper classes and CLI commands for patching ROMs. - Implemented comprehensive tests for Asar integration, ensuring robust functionality and error handling. - Enhanced packaging configuration for cross-platform support, including Windows, macOS, and Linux. - Updated documentation and added test assets for improved clarity and usability.
This commit is contained in:
@@ -18,6 +18,7 @@ add_executable(
|
||||
rom_test.cc
|
||||
test_editor.cc
|
||||
hex_test.cc
|
||||
core/asar_wrapper_test.cc
|
||||
gfx/snes_tile_test.cc
|
||||
gfx/compression_test.cc
|
||||
gfx/snes_palette_test.cc
|
||||
@@ -37,6 +38,8 @@ add_executable(
|
||||
emu/audio/apu_test.cc
|
||||
emu/audio/ipl_handshake_test.cc
|
||||
integration/dungeon_editor_test.cc
|
||||
integration/asar_integration_test.cc
|
||||
integration/asar_rom_test.cc
|
||||
zelda3/object_parser_test.cc
|
||||
zelda3/object_parser_structs_test.cc
|
||||
zelda3/test_dungeon_objects.cc
|
||||
@@ -82,9 +85,10 @@ target_include_directories(
|
||||
app/
|
||||
lib/
|
||||
${CMAKE_SOURCE_DIR}/incl/
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src/
|
||||
${CMAKE_SOURCE_DIR}/test/
|
||||
${CMAKE_SOURCE_DIR}/src/lib/imgui_test_engine
|
||||
${ASAR_INCLUDE_DIR}
|
||||
${ASAR_INCLUDE_DIRS}
|
||||
${SDL2_INCLUDE_DIR}
|
||||
${PNG_INCLUDE_DIRS}
|
||||
${PROJECT_BINARY_DIR}
|
||||
@@ -106,9 +110,51 @@ target_link_libraries(
|
||||
gtest_main
|
||||
gtest
|
||||
)
|
||||
target_compile_definitions(yaze_test PRIVATE "linux")
|
||||
target_compile_definitions(yaze_test PRIVATE "stricmp=strcasecmp")
|
||||
# ROM Testing Configuration
|
||||
if(YAZE_ENABLE_ROM_TESTS)
|
||||
target_compile_definitions(yaze_test PRIVATE
|
||||
YAZE_ENABLE_ROM_TESTS=1
|
||||
YAZE_TEST_ROM_PATH="${YAZE_TEST_ROM_PATH}"
|
||||
)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(yaze_test PRIVATE "IMGUI_ENABLE_TEST_ENGINE")
|
||||
|
||||
# Platform-specific definitions
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_compile_definitions(yaze_test PRIVATE "linux" "stricmp=strcasecmp")
|
||||
elseif(APPLE)
|
||||
target_compile_definitions(yaze_test PRIVATE "MACOS" "stricmp=strcasecmp")
|
||||
elseif(WIN32)
|
||||
target_compile_definitions(yaze_test PRIVATE "WINDOWS")
|
||||
endif()
|
||||
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(yaze_test)
|
||||
|
||||
# Configure test discovery with labels
|
||||
gtest_discover_tests(yaze_test
|
||||
PROPERTIES
|
||||
LABELS "UNIT_TEST"
|
||||
)
|
||||
|
||||
# Add labels for ROM-dependent tests
|
||||
if(YAZE_ENABLE_ROM_TESTS)
|
||||
gtest_discover_tests(yaze_test
|
||||
TEST_FILTER "*AsarRomIntegrationTest*"
|
||||
PROPERTIES
|
||||
LABELS "ROM_DEPENDENT;INTEGRATION_TEST"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Add labels for other integration tests
|
||||
gtest_discover_tests(yaze_test
|
||||
TEST_FILTER "*AsarIntegrationTest*"
|
||||
PROPERTIES
|
||||
LABELS "INTEGRATION_TEST"
|
||||
)
|
||||
|
||||
gtest_discover_tests(yaze_test
|
||||
TEST_FILTER "*AsarWrapperTest*"
|
||||
PROPERTIES
|
||||
LABELS "UNIT_TEST"
|
||||
)
|
||||
Reference in New Issue
Block a user