|
47 | 47 | outputs: |
48 | 48 | all_cov_file_url: ${{ steps.cov_upload.outputs.all_cov_file_url }} |
49 | 49 | unittest_failed_url: ${{ steps.cov_upload.outputs.unittest_failed_url }} |
| 50 | + unittest_logs_url: ${{ steps.cov_upload.outputs.unittest_logs_url }} |
50 | 51 | diff_cov_result_json_url: ${{ steps.cov_upload.outputs.diff_cov_result_json_url }} |
51 | 52 | steps: |
52 | 53 | - name: Code Prepare |
@@ -173,6 +174,8 @@ jobs: |
173 | 174 | export RDMA_DEVICES=$(find /dev/infiniband/uverbs* -maxdepth 1 -not -type d | xargs -I{} echo '--device {}:{}') |
174 | 175 |
|
175 | 176 | docker run --rm --net=host \ |
| 177 | + --sysctl kernel.msgmax=1048576 \ |
| 178 | + --sysctl kernel.msgmnb=268435456 \ |
176 | 179 | --name ${runner_name} \ |
177 | 180 | --cap-add=SYS_PTRACE --cap-add=IPC_LOCK \ |
178 | 181 | --shm-size=64G \ |
@@ -309,6 +312,15 @@ jobs: |
309 | 312 | echo "unittest_failed_url=${UNIT_TEST_RESULT_URL}" >> $GITHUB_ENV |
310 | 313 | fi |
311 | 314 |
|
| 315 | + # Only upload logs when tests failed |
| 316 | + unittest_logs_archive="unittest_logs.tar.gz" |
| 317 | + if [ "$HAS_FAILED_TESTS" = true ]; then |
| 318 | + python ${push_file} ${unittest_logs_archive} ${target_path}/UnitTestResult |
| 319 | + UNIT_TEST_LOGS_URL=https://paddle-github-action.bj.bcebos.com/${target_path_stripped}/UnitTestResult/${unittest_logs_archive} |
| 320 | + echo "unittest_logs_url=${UNIT_TEST_LOGS_URL}" >> $GITHUB_OUTPUT |
| 321 | + echo "unittest_logs_url=${UNIT_TEST_LOGS_URL}" >> $GITHUB_ENV |
| 322 | + fi |
| 323 | +
|
312 | 324 | if [[ "$IS_PR" != "true" ]]; then |
313 | 325 | full_cov_file="full_coverage_report.txt" |
314 | 326 | full_cov_csv="full_coverage_report.csv" |
@@ -345,6 +357,7 @@ jobs: |
345 | 357 | if [ -f "${filename}" ];then |
346 | 358 | echo "Failed test cases:" |
347 | 359 | cat "${filename}" |
| 360 | + echo "unittest_logs_url=${unittest_logs_url}" |
348 | 361 | fi |
349 | 362 | exit "$TEST_EXIT_CODE" |
350 | 363 | fi |
|
0 commit comments