File tree Expand file tree Collapse file tree 6 files changed +34
-6
lines changed
Expand file tree Collapse file tree 6 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 1+ name : CI for Linux
2+
3+ on : push
4+
5+ jobs :
6+ test :
7+ runs-on : ubuntu-latest
8+
9+ steps :
10+ - uses : actions/checkout@v2
11+ - name : build
12+ run : |
13+ mkdir build && cd build
14+ cmake ../src
15+ make
16+ cd ..
17+ - name : regression test
18+ run : |
19+ cd tests
20+ pwd
21+ ls -l
22+ ./run_tests.sh
Original file line number Diff line number Diff line change @@ -21,12 +21,17 @@ project("datalog-cpp")
2121# specify the C++ standard
2222set (CMAKE_CXX_STANDARD 17)
2323
24+ # unit-test library
25+ add_library (tests_main STATIC ../tests/tests_main.cpp)
26+
2427# types_test target
2528add_executable (types_test ../tests/types_test.cpp)
2629target_include_directories (types_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} )
30+ target_link_libraries (types_test tests_main)
2731target_compile_definitions (types_test PUBLIC UNIX )
2832
2933# variable_test target
3034add_executable (variable_test ../tests/variable_test.cpp)
3135target_include_directories (variable_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} )
36+ target_link_libraries (variable_test tests_main)
3237target_compile_definitions (variable_test PUBLIC UNIX )
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+ ../build/types_test
4+ ../build/variable_test
Original file line number Diff line number Diff line change 1+ // tests-main.cpp
2+ #define CATCH_CONFIG_MAIN
3+ #include " catch.hpp"
Original file line number Diff line number Diff line change 1- // Let Catch provide main():
2- #define CATCH_CONFIG_MAIN
3-
41#include " catch.hpp"
52#include " Datalog.h"
63
Original file line number Diff line number Diff line change 1- // Let Catch provide main():
2- #define CATCH_CONFIG_MAIN
3-
41#include " catch.hpp"
52#include " Variable.h"
63
You can’t perform that action at this time.
0 commit comments