File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767 - name : CMake build examples
6868 run : cmake --build demos/build
6969
70+ - name : Run tests
71+ run : ctest --test-dir demos/build
72+
7073 - name : Create package
7174 if : github.event.action == 'published'
7275 run : cpack --config build/CPackConfig.cmake
@@ -122,7 +125,7 @@ jobs:
122125 with :
123126 version : " 2.0"
124127
125- - uses : actions/checkout@v2
128+ - uses : actions/checkout@v4
126129
127130 - name : Configure
128131 run : cmake -Bbuild --toolchain cmake/dos.cmake
Original file line number Diff line number Diff line change 1+ if (NOT EXISTS "${in} " )
2+ message (FATAL_ERROR "Input file ${in} does not exist" )
3+ endif ()
4+
5+ execute_process (COMMAND "${exe} "
6+ #INPUT_FILE "${in}"
7+ COMMAND_ERROR_IS_FATAL ANY
8+ )
Original file line number Diff line number Diff line change 77
88project (PDcursesDemos LANGUAGES C )
99
10+ enable_testing ()
11+
1012find_package (PDCurses CONFIG REQUIRED )
1113
1214foreach (f IN ITEMS testcurs ozdemo xmas firework ptest rain worm)
@@ -17,5 +19,19 @@ endforeach()
1719add_executable (tuidemo tui.c tuidemo.c )
1820target_link_libraries (tuidemo PRIVATE CURSES::CURSES )
1921
20- # --- auto-ignore build directory
2122file (GENERATE OUTPUT .gitignore CONTENT "*" )
23+
24+ set (CI $ENV{CI} )
25+
26+ file (GENERATE OUTPUT q.txt CONTENT "q" )
27+
28+ foreach (t IN ITEMS rain ptest)
29+
30+ add_test (NAME ${t}
31+ COMMAND ${CMAKE_COMMAND} -Dexe=$<TARGET_FILE:${t}> -Din=${CMAKE_CURRENT_BINARY_DIR}/q.txt
32+ -P ${CMAKE_CURRENT_SOURCE_DIR} /../cmake/test_run.cmake )
33+
34+ set_property (TEST ${t} PROPERTY DISABLED $<OR :$<BOOL :${WIN32} >,${CI} >)
35+ set_property (TEST ${t} PROPERTY TIMEOUT 7 )
36+
37+ endforeach ()
You can’t perform that action at this time.
0 commit comments