83
83
echo "PUBLIC_DIR_URL=$PUBLIC_DIR_URL" >> $GITHUB_ENV
84
84
mkdir -p $PUBLIC_DIR
85
85
86
- export YA_MAKE_OUT_DIR=$TMP_DIR/out
87
- echo "YA_MAKE_OUT_DIR=$YA_MAKE_OUT_DIR" >> $GITHUB_ENV
88
- mkdir -p $YA_MAKE_OUT_DIR
89
-
90
86
echo "JUNIT_REPORT_XML=$PUBLIC_DIR/junit.xml" >> $GITHUB_ENV
91
87
echo "TESTMO_URL=${{ inputs.testman_url }}" >> $GITHUB_ENV
92
88
echo "SUMMARY_LINKS=$PUBLIC_DIR/summary_links.txt" >> $GITHUB_ENV
@@ -244,31 +240,68 @@ runs:
244
240
params+=(-A)
245
241
fi
246
242
243
+ params+=(
244
+ --stat -DCONSISTENT_DEBUG --no-dir-outputs
245
+ --test-failure-code 0 --build-all
246
+ --cache-size 2TB --force-build-depends
247
+ )
248
+
247
249
echo "::debug::get version"
248
250
./ya --version
249
251
252
+ YA_MAKE_OUT_DIR=$TMP_DIR/out
253
+
250
254
YA_MAKE_OUTPUT="$PUBLIC_DIR/ya_make_output.log"
251
255
YA_MAKE_OUTPUT_URL="$PUBLIC_DIR_URL/ya_make_output.log"
252
256
echo "10 [Ya make output]($YA_MAKE_OUTPUT_URL)" >> $SUMMARY_LINKS
253
257
254
- echo "Build+Tests **{platform_name}-${BUILD_PRESET}** is running..." | GITHUB_TOKEN="${{ github.token }}" .github/scripts/tests/comment-pr.py
255
- set +ex
256
- (./ya make ${{ inputs.build_target }} "${params[@]}" \
257
- --stat --log-file "$PUBLIC_DIR/ya_log.log" -DCONSISTENT_DEBUG \
258
- --no-dir-outputs --test-failure-code 0 --build-all \
259
- --cache-size 2TB --force-build-depends --evlog-file "$PUBLIC_DIR/ya_evlog.jsonl" \
260
- --junit "$JUNIT_REPORT_XML" --output "$YA_MAKE_OUT_DIR"; echo $? > exit_code) |& tee $YA_MAKE_OUTPUT
261
- set -e
262
- RC=`cat exit_code`
263
-
264
-
265
- if [ $RC -ne 0 ]; then
266
- echo "ya make returned $RC, build failed"
267
- echo "status=failed" >> $GITHUB_OUTPUT
268
- else
258
+ BUILD_FAILED=0
259
+
260
+ for RETRY in {1..3}
261
+ do
262
+ echo "Build+Tests **{platform_name}-${BUILD_PRESET}** is running..." | GITHUB_TOKEN="${{ github.token }}" .github/scripts/tests/comment-pr.py
263
+ CURRENT_JUNIT_XML_PATH=$PUBLIC_DIR/junit_try_$RETRY.xml
264
+ set +ex
265
+ (./ya make ${{ inputs.build_target }} "${params[@]}" \
266
+ --log-file "$PUBLIC_DIR/ya_log.log" \
267
+ --evlog-file "$PUBLIC_DIR/ya_evlog.jsonl" \
268
+ --junit "$CURRENT_JUNIT_XML_PATH" --output "$YA_MAKE_OUT_DIR"; echo $? > exit_code) |& tee $YA_MAKE_OUTPUT
269
+ set -e
270
+ RC=`cat exit_code`
271
+
272
+ if [ $RC -ne 0 ]; then
273
+ echo "ya make returned $RC, build failed"
274
+ echo "status=failed" >> $GITHUB_OUTPUT
275
+ BUILD_FAILED=1
276
+ break
277
+ fi
278
+
279
+ # fix junit files (add links, logs etc)
280
+ # archive unitest reports (orig)
281
+ gzip -c $CURRENT_JUNIT_XML_PATH > $PUBLIC_DIR/orig_junit_try_$RETRY.xml.gz
282
+
283
+ # postprocess junit report
284
+ .github/scripts/tests/transform-ya-junit.py -i \
285
+ -m .github/config/muted_ya.txt \
286
+ --ya_out "$YA_MAKE_OUT_DIR" \
287
+ --public_dir "$PUBLIC_DIR" \
288
+ --public_dir_url "$PUBLIC_DIR_URL" \
289
+ --log_out_dir "artifacts/logs/" \
290
+ --test_stuff_out "test_artifacts/" \
291
+ "$CURRENT_JUNIT_XML_PATH"
292
+
293
+ TESTS_RESULT=0
294
+ .github/scripts/tests/fail-checker.py "$CURRENT_JUNIT_XML_PATH" || TESTS_RESULT=$?
295
+
296
+ if [ $TESTS_RESULT = 0 ]
297
+ break
298
+ fi
299
+ done;
300
+
301
+ if [ $BUILD_FAILED = 0 ]; then
269
302
echo "status=true" >> $GITHUB_OUTPUT
270
303
fi
271
-
304
+
272
305
273
306
- name : comment-build-status
274
307
if : github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
@@ -289,24 +322,6 @@ runs:
289
322
-d '{"state":"success","description":"The check has been completed successfully","context":"build_${{inputs.build_preset}}"}'
290
323
echo "Build successful." | .github/scripts/tests/comment-pr.py --ok
291
324
fi
292
-
293
- - name : process reports
294
- if : inputs.run_tests
295
- shell : bash
296
- run : |
297
- set -x
298
- # archive unitest reports (orig)
299
- gzip -c $JUNIT_REPORT_XML > $PUBLIC_DIR/orig_junit.xml.gz
300
-
301
- # postprocess junit report
302
- .github/scripts/tests/transform-ya-junit.py -i \
303
- -m .github/config/muted_ya.txt \
304
- --ya_out "$YA_MAKE_OUT_DIR" \
305
- --public_dir "$PUBLIC_DIR" \
306
- --public_dir_url "$PUBLIC_DIR_URL" \
307
- --log_out_dir "artifacts/logs/" \
308
- --test_stuff_out "test_artifacts/" \
309
- "$JUNIT_REPORT_XML"
310
325
311
326
- name : Test history upload results to YDB
312
327
if : inputs.run_tests
0 commit comments