From 8c2ad025b1a43115fc80617eb6097b3c66506b5b Mon Sep 17 00:00:00 2001 From: numzero Date: Sat, 30 Sep 2023 21:25:14 +0300 Subject: [PATCH] Add CTest --- .github/workflows/build.yml | 4 ++++ CMakeLists.txt | 2 ++ test/CMakeLists.txt | 1 + 3 files changed, 7 insertions(+) create mode 100644 test/CMakeLists.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e76368f1..cb80bbb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,10 @@ jobs: cmake . make VERBOSE=1 -j2 + - name: Test + run: | + ctest --output-on-failure + - name: Package run: | make DESTDIR=$PWD/_install install diff --git a/CMakeLists.txt b/CMakeLists.txt index d39d21b7..7c078761 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,9 @@ if(NOT CMAKE_BUILD_TYPE) endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +enable_testing() add_subdirectory(source/Irrlicht) +add_subdirectory(test) option(BUILD_EXAMPLES "Build example applications" FALSE) if(BUILD_EXAMPLES) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 00000000..681e06d4 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1 @@ +link_libraries(IrrlichtMt::IrrlichtMt)