@@ -57,34 +57,6 @@ defaults:
5757runs :
5858 using : " composite"
5959 steps :
60- - name : comment-build-start
61- if : github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
62- shell : bash
63- env :
64- BUILD_PRESET : ${{ inputs.build_preset }}
65- GITHUB_TOKEN : ${{ github.token }}
66- run : |
67- jobs_url="https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/jobs"
68- # tricky: we are searching job with name that contains build_preset
69- check_url=$(curl -s $jobs_url | jq --arg n "$BUILD_PRESET" -r '.jobs[] | select(.name | contains($n)) | .html_url')
70-
71- platform_name="$(echo "$(uname -s)-$(uname -p)" | tr '[:upper:]' '[:lower:]')-$BUILD_PRESET"
72- echo "Pre-commit [check]($check_url) **$platform_name** for $(git rev-parse HEAD) has started." | .github/scripts/tests/comment-pr.py --rewrite
73-
74- curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{github.token}}" -H "X-GitHub-Api-Version: 2022-11-28" \
75- https://api.github.com/repos/${{github.repository}}/statuses/${{github.event.pull_request.head.sha}} \
76- -d '{"state":"pending","description":"The check has been started","context":"build_${{inputs.build_preset}}"}'
77-
78- if [[ "${{inputs.run_tests}}" == "true" ]];then
79- curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{github.token}}" -H "X-GitHub-Api-Version: 2022-11-28" \
80- https://api.github.com/repos/${{github.repository}}/statuses/${{github.event.pull_request.head.sha}} \
81- -d '{"state":"pending","description":"The check has been started","context":"test_${{inputs.build_preset}}"}'
82- fi
83-
84- - name : Clean ya cache
85- shell : bash
86- run : rm -rf ~/.ya
87-
8860 - name : Prepare s3cmd
8961 uses : ./.github/actions/s3cmd
9062 with :
@@ -116,57 +88,3 @@ runs:
11688 bazel_remote_password : ${{ fromJSON( inputs.secs ).REMOTE_CACHE_PASSWORD || '' }}
11789 put_build_results_to_cache : ${{ inputs.put_build_results_to_cache }}
11890 test_retry_count : ${{ inputs.test_retry_count }}
119-
120- - name : build_stats
121- shell : bash
122- continue-on-error : true
123- if : always()
124- run : |
125- set -x
126- export build_preset="${{ inputs.build_preset }}"
127- export commit_git_sha="$(git rev-parse HEAD)"
128-
129- python3 -m pip install ydb ydb[yc]
130- python3 .github/scripts/send_build_stats.py
131-
132- - name : show_build_size_diff
133- shell : bash
134- continue-on-error : true
135- if : always()
136- env :
137- GITHUB_TOKEN : ${{ github.token }}
138- run : |
139- set -x
140- export build_preset="${{ inputs.build_preset }}"
141- export branch_to_compare="$GITHUB_REF_NAME"
142- export yellow_treshold=102400
143- export red_treshold=2097152
144- export commit_git_sha="$(git rev-parse HEAD)"
145-
146- python3 -m pip install ydb ydb[yc] humanize
147-
148- get_sizes_comment_script=.github/scripts/get_build_diff.py
149- comment_raw=`$get_sizes_comment_script`
150-
151- IFS=';;;'
152- read -ra comment_arr <<< "$comment_raw"
153-
154- printf "$comment"
155- if [[ ${comment_raw} != "Error"* ]];then
156- color=${comment_arr[0]}
157- replace=$color";;;"
158- comment=${comment_raw/$replace/""}
159-
160- printf "$comment" | .github/scripts/tests/comment-pr.py --color $color
161-
162- else
163- echo "Skipped build size difference, comment_raw = ${comment_raw}"
164- fi
165-
166- - name : comment-if-cancel
167- shell : bash
168- if : cancelled() && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target')
169- env :
170- BUILD_PRESET : ${{ inputs.build_preset }}
171- GITHUB_TOKEN : ${{ github.token }}
172- run : echo "Check cancelled" | .github/scripts/tests/comment-pr.py --color black
0 commit comments