File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -476,6 +476,7 @@ jobs:
476476 - name : Build
477477 run : |
478478 set -e
479+ export USE_COVERAGE=ON
479480 cd ${DEEPLINK_PATH}/ && ls -al && find ${DEEPLINK_PATH}/ -maxdepth 1 -mmin +300 -type d |xargs rm -rf
480481 cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER} && rm -rf ${BUILD_TEST1} && cp -R source ${BUILD_TEST1} && cd ${BUILD_TEST1}
481482 source /mnt/cache/share/deeplinkci/env.sh
@@ -497,3 +498,12 @@ jobs:
497498 ln -sf /mnt/cache/share/deeplinkci/data/inputs ./cache/diopi && ln -sf /mnt/cache/share/deeplinkci/data/outputs ./cache/diopi && ln -sf /mnt/cache/share/deeplinkci/data/diopi_case_items.cfg ./cache/diopi
498499 python main.py --mode gen_case --impl_folder ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}/impl/kunlunxin/
499500 python main.py --mode run_test
501+ if [ "${ALL_COVERAGE}" = "ON" ]; then
502+ bash /mnt/cache/share/platform/dep/sonar/coverage_DIOPI.sh ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1} || echo "get coverage fail"
503+ fi
504+ - name : increment coverage check
505+ if : ${{ contains( github.event_name, 'pull_request' ) && contains( github.base_ref, 'main' ) }}
506+ run : |
507+ set -e
508+ cd ${DEEPLINK_PATH}/${GITHUB_RUN_NUMBER}/${BUILD_TEST1}
509+ bash scripts/increment_coverage.sh ${REQUIRE_COVERAGE}
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ case $1 in
7272 ;;
7373 kunlunxin)
7474 mkdir -p build && cd build
75- cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DIMPL_OPT=kunlunxin -DCMAKE_BUILD_TYPE=Release -DTEST=ON
75+ cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DIMPL_OPT=kunlunxin -DCMAKE_BUILD_TYPE=Release -DTEST=ON -DENABLE_COVERAGE= ${USE_COVERAGE}
7676 make -j32
7777 ;;
7878 * )
You can’t perform that action at this time.
0 commit comments