File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : ci
1+ name : build-test
22on :
33 pull_request :
44 branches :
2727 echo "PARENT_DIR=$PWD" >> $GITHUB_ENV
2828 echo "CONAN_HOME=$PWD/.conan2" >> $GITHUB_ENV
2929 echo "GTEST_COLOR=1" >> $GITHUB_ENV
30+
31+ - name : set env variables for cdash
32+ run : |
33+ if [[ $GITHUB_EVENT_NAME == "push" ]]; then
34+ echo "TEST_MODEL=Continuous" >> $GITHUB_ENV
35+ echo "TEST_NAME=\"${{ matrix.compiler }} (master)\"" >> $GITHUB_ENV
36+ elif [[ $GITHUB_EVENT_NAME == "schedule" ]]; then
37+ echo "TEST_MODEL=Nightly" >> $GITHUB_ENV
38+ echo "TEST_NAME=\"${{ matrix.compiler }} (master)\"" >> $GITHUB_ENV
39+ else
40+ echo "TEST_MODEL=Experimental" >> $GITHUB_ENV
41+ export PULL_NR=${{ github.event.number }}
42+ echo "TEST_NAME=\"$${{ matrix.compiler }} (pr.${PULL_NR})\"" >> $GITHUB_ENV
43+ fi
44+
45+ # Be very careful about CTEST_BUILD_NAME. It shouldn't contain additional double quotations
46+ - name : build-test-submit
47+ run : |
48+ ctest -S cmake/ctest_dashboard.cmake -VV\
49+ -DTEST_MODEL=${TEST_MODEL}\
50+ -DCTEST_CONFIGURATION_TYPE=Debug\
51+ -DCTEST_BUILD_NAME=${{ env.TEST_NAME }}\
52+ -DCTEST_SITE="Github CI/CD"\
53+ -DCONFIGURE_PRESET="debug-${{ matrix.compiler }}"\
54+ --output-on-failure
Original file line number Diff line number Diff line change @@ -8,3 +8,5 @@ target_sources(
88 PRIVATE centipede_unit_test.cpp unit_tests/centipede.cpp
99)
1010target_link_libraries (unit_test PRIVATE GTest::gtest_main centipede::centipede )
11+
12+ gtest_discover_tests (unit_test )
You can’t perform that action at this time.
0 commit comments