/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/pr-github-actions.yaml
723 строки
29 KB
Nikita Menkovich
fix: trying to fix reporting on timed out/cancelled/failed workflows (#6408)
04 авг 2026, 18:48
Не верифицирован
04 авг 2026, 18:48
3a311a0
Код
Авторство
О чём код?
name: Check github workflow on: pull_request: branches: - main paths: - ".github/**" - "!.github/vscode-yatool-extension/**" types: - "opened" - "synchronize" - "reopened" - "labeled" workflow_dispatch: inputs: allow_downgrade: description: "Allow downgrade" required: false type: choice default: "no" options: - "yes" - "no" large_tests: description: "Launch large tests" required: false type: choice default: "no" options: - "yes" - "no" permissions: actions: read contents: read pull-requests: write issues: write defaults: run: shell: bash env: allow_downgrade: ${{ vars.GLOBAL_ALLOW_DOWNGRADE == 'yes' || ((github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'allow-downgrade')) || inputs.allow_downgrade == 'yes') }} large_tests: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'large-tests')) && 'true' || inputs.large_tests == 'yes' }} concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number }} cancel-in-progress: true jobs: check-running-allowed: runs-on: [self-hosted, "self-hosted", "runner_light"] outputs: result: ${{ steps.allow-local.outputs.result || steps.check-ownership-membership.outputs.result }} steps: - name: Allow local act run if: ${{ env.ACT == 'true' }} id: allow-local run: echo "result=true" >> "$GITHUB_OUTPUT" - name: checkout workflow scripts uses: actions/checkout@v7 with: submodules: false sparse-checkout: ".github" clean: true ref: ${{ github.event.pull_request.head.sha }} - name: disable sparse checkout (workaround for actions/checkout/issues/2249) if: ${{ always() }} run: git config core.sparseCheckout false continue-on-error: true - name: Check if running tests is allowed if: ${{ env.ACT != 'true' }} id: check-ownership-membership uses: actions/github-script@v9 with: github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} script: | const checkOwnershipMembership = require('./.github/scripts/check-ownership-membership.js'); return await checkOwnershipMembership({ github, context, core }); - name: comment-if-waiting-on-ok if: env.ACT != 'true' && steps.check-ownership-membership.outputs.result == 'false' && github.event.action == 'opened' uses: actions/github-script@v9 with: script: | github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: 'Hi! Thank you for contributing!\nThe tests on this PR will run after a maintainer adds an `ok-to-test` label to this PR manually. Thank you for your patience!' }); - name: cleanup-labels if: ${{ env.ACT != 'true' }} uses: actions/github-script@v9 with: script: | let labelsToRemove = ['ok-to-test', 'recheck']; const prNumber = context.payload.pull_request.number; const prLabels = new Set(context.payload.pull_request.labels.map(l => l.name)); for await (const label of labelsToRemove.filter(l => prLabels.has(l))) { core.info(`remove label=${label} for pr=${prNumber}`); try { const result = await github.rest.issues.removeLabel({ ...context.repo, issue_number: prNumber, name: label }); } catch(error) { // ignore the 404 error that arises // when the label did not exist for the // organization member if (error.status && error.status != 404) { throw error; } } } check-trigger-label: needs: - check-running-allowed uses: ./.github/workflows/check-test-launch-label.yaml set-env: needs: - check-running-allowed runs-on: [self-hosted, "self-hosted", "runner_light"] outputs: allow_downgrade: ${{ env.allow_downgrade == 'false' && 'no' || 'yes' }} large_tests: ${{ env.large_tests == 'false' && 'no' || 'yes' }} # we don't need anything, but otherwise github will complain steps: - name: set env id: set-env run: echo shell: needs: [set-env, check-running-allowed, check-trigger-label] if: needs.check-running-allowed.outputs.result == 'true' && needs.check-trigger-label.outputs.allowed == 'true' runs-on: [self-hosted, "self-hosted", "runner_light"] steps: - name: checkout uses: actions/checkout@v7 with: submodules: false sparse-checkout: ".github" clean: true - name: disable sparse checkout (workaround for actions/checkout/issues/2249) if: ${{ always() }} run: git config core.sparseCheckout false continue-on-error: true - name: set up dependencies run: pip install -r .github/packer/scripts/requirements_dev.txt - name: Prepare s3 if: ${{ env.ACT != 'true' }} id: s3 uses: ./.github/actions/s3cmd with: s3_bucket: ${{ vars.POOLED_LIGHT_AWS_BUCKET }} s3_endpoint: ${{ vars.POOLED_LIGHT_AWS_ENDPOINT }} s3_website_suffix: ${{ vars.POOLED_LIGHT_AWS_WEBSITE_SUFFIX }} s3_key_id: ${{ secrets.POOLED_LIGHT_AWS_KEY_ID }} s3_key_secret: ${{ secrets.POOLED_LIGHT_AWS_SECRET_KEY }} folder_prefix: nebius- build_preset: "relwithdebinfo" install: false - name: install shell linters run: bash .github/packer/scripts/install-github-release-tools.sh shellcheck shfmt - name: generate shellscripts from github actions run: | python3 .github/scripts/shell_extractor.py find .temporary/ -type f -name "*.sh" - name: shellcheck id: shellcheck uses: ./.github/actions/shellcheck - name: shfmt id: shfmt uses: ./.github/actions/shfmt - name: comment on issue if: ${{ env.ACT != 'true' && github.event_name == 'pull_request' && always() && (steps.shellcheck.outputs.has_report == 'true' || steps.shfmt.outputs.has_report == 'true') }} uses: actions/github-script@v9 env: SHELLCHECK_HAS_REPORT: ${{ steps.shellcheck.outputs.has_report }} SHFMT_HAS_REPORT: ${{ steps.shfmt.outputs.has_report }} SHELLCHECK_EXIT_CODE: ${{ steps.shellcheck.outputs.exit_code }} SHFMT_EXIT_CODE: ${{ steps.shfmt.outputs.exit_code }} with: script: | const s3_path = process.env.S3_URL_PREFIX; const lines = []; if (process.env.SHELLCHECK_HAS_REPORT == 'true') { const status = process.env.SHELLCHECK_EXIT_CODE == '0' ? ':green_circle:' : ':red_circle:'; lines.push('shellcheck - ' + status + ' [log](' + s3_path + '/test_reports/ga-scripts-shellcheck.log)'); } if (process.env.SHFMT_HAS_REPORT == 'true') { const status = process.env.SHFMT_EXIT_CODE == '0' ? ':green_circle:' : ':red_circle:'; lines.push('shfmt - ' + status + ' [log](' + s3_path + '/test_reports/ga-scripts-shfmt.log)'); } const success = process.env.SHELLCHECK_EXIT_CODE == '0' && process.env.SHFMT_EXIT_CODE == '0'; const status_emoji = success ? ':green_circle:' : ':red_circle:'; let comment = 'status: ' + status_emoji + '\n\n' + lines.join('\n'); github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: comment }) - name: fail on shell checks if: ${{ always() }} env: SHELLCHECK_EXIT_CODE: ${{ steps.shellcheck.outputs.exit_code }} SHFMT_EXIT_CODE: ${{ steps.shfmt.outputs.exit_code }} run: | status=0 if [ "${SHELLCHECK_EXIT_CODE:-1}" != "0" ]; then echo "::error::shellcheck failed" status=1 fi if [ "${SHFMT_EXIT_CODE:-1}" != "0" ]; then echo "::error::shfmt failed" status=1 fi exit "$status" python: needs: [set-env, check-running-allowed, check-trigger-label] if: needs.check-running-allowed.outputs.result == 'true' && needs.check-trigger-label.outputs.allowed == 'true' runs-on: [self-hosted, "self-hosted", "runner_light"] steps: - name: checkout uses: actions/checkout@v7 with: submodules: false sparse-checkout: ".github" clean: true - name: disable sparse checkout (workaround for actions/checkout/issues/2249) if: ${{ always() }} run: git config core.sparseCheckout false continue-on-error: true - name: Prepare s3 if: ${{ env.ACT != 'true' }} id: s3 uses: ./.github/actions/s3cmd with: s3_bucket: ${{ vars.POOLED_LIGHT_AWS_BUCKET }} s3_endpoint: ${{ vars.POOLED_LIGHT_AWS_ENDPOINT }} s3_website_suffix: ${{ vars.POOLED_LIGHT_AWS_WEBSITE_SUFFIX }} s3_key_id: ${{ secrets.POOLED_LIGHT_AWS_KEY_ID }} s3_key_secret: ${{ secrets.POOLED_LIGHT_AWS_SECRET_KEY }} folder_prefix: nebius- build_preset: "relwithdebinfo" install: false - name: set up python environment uses: actions/setup-python@v6.3.0 with: # used in ubuntu 22.04 python-version: "3.10" - name: set up dependencies run: | pip install -r .github/scripts/requirements.txt pip install -r .github/packer/scripts/requirements_dev.txt - name: flake8 id: flake8 uses: ./.github/actions/lint_report with: title: "GA Scripts flake8" tool: flake8 report_name: ga-scripts-flake8 show_summary_table: "false" command: flake8 --max-line-length 128 --ignore Q000,D100,D101,D102,D103,D104,D105,D106,D107,D401,D205,D400,E704,W503 .github/ - name: black id: black uses: ./.github/actions/lint_report with: title: "GA Scripts black" tool: black report_name: ga-scripts-black show_summary_table: "false" command: black --check .github/ - name: pytest id: pytest shell: bash run: | set -x export PYTHONPATH="${PYTHONPATH:-}:$GITHUB_WORKSPACE/.github" pytest --tb=short --disable-warnings --maxfail=1 \ --junitxml="${GITHUB_WORKSPACE}/ga-scripts-pytest-results.xml" \ --html="${GITHUB_WORKSPACE}/ga-scripts-pytest-report.html" \ --self-contained-html \ .github/scripts/*_test.py \ .github/scripts/tests - name: Upload pytest test results artifact if: ${{ env.ACT != 'true' && always() }} id: upload uses: actions/upload-artifact@v7.0.1 with: name: ga-scripts-pytest-results path: ga-scripts-pytest-results.xml - name: Upload pytest html report artifact if: ${{ env.ACT != 'true' && always() }} id: upload-html uses: actions/upload-artifact@v7.0.1 with: name: ga-scripts-pytest-report-html path: ga-scripts-pytest-report.html - name: upload test results to s3 if: ${{ env.ACT != 'true' && always() }} run: | set -x aws s3 cp --acl public-read --follow-symlinks --no-progress ga-scripts-pytest-report.html "$S3_BUCKET_PATH/test_reports/ga-scripts-pytest-report.html" aws s3 cp --acl public-read --follow-symlinks --no-progress ga-scripts-pytest-results.xml "$S3_BUCKET_PATH/test_reports/ga-scripts-pytest-results.xml" - name: build pytest summary table if: ${{ always() }} id: pytest-summary shell: bash run: | set -euo pipefail export PYTHONPATH="${PYTHONPATH:-}:$GITHUB_WORKSPACE/.github" SUMMARY_OUT=$(mktemp) python3 -m scripts.tests.pytest_summary \ --title "GA Scripts pytest" \ ga-scripts-pytest-results.xml > "$SUMMARY_OUT" { echo "markdown<<EOF" cat "$SUMMARY_OUT" echo "EOF" } >> "$GITHUB_OUTPUT" - name: add test report links to summary if: ${{ always() }} shell: bash env: PYTEST_SUMMARY_MARKDOWN: ${{ steps.pytest-summary.outputs.markdown }} run: | { echo "### GA Scripts pytest reports" if [ -n "${PYTEST_SUMMARY_MARKDOWN}" ]; then echo printf '%s\n' "${PYTEST_SUMMARY_MARKDOWN}" echo fi if [ "${ACT}" = "true" ]; then echo "- Local act run: reports were written to ga-scripts-pytest-report.html and ga-scripts-pytest-results.xml" else echo "- [pytest report (s3)]($S3_URL_PREFIX/test_reports/ga-scripts-pytest-report.html)" echo "- [pytest results xml (s3)]($S3_URL_PREFIX/test_reports/ga-scripts-pytest-results.xml)" echo "- [pytest report (artifact)](${{ steps.upload-html.outputs.artifact-url }})" echo "- [pytest results (artifact)](${{ steps.upload.outputs.artifact-url }})" fi } >> "$GITHUB_STEP_SUMMARY" - name: comment on issue if: ${{ env.ACT != 'true' && github.event_name == 'pull_request' && always() }} uses: actions/github-script@v9 env: STEP_OUTCOME: ${{ steps.pytest.outcome }} FLAKE8_EXIT_CODE: ${{ steps.flake8.outputs.exit_code }} BLACK_EXIT_CODE: ${{ steps.black.outputs.exit_code }} ARTIFACT_URL: ${{ steps.upload.outputs.artifact-url }} HTML_ARTIFACT_URL: ${{ steps.upload-html.outputs.artifact-url }} PYTEST_SUMMARY_MARKDOWN: ${{ steps.pytest-summary.outputs.markdown }} with: script: | const outcome = process.env.STEP_OUTCOME; const flake8ExitCode = process.env.FLAKE8_EXIT_CODE || '1'; const blackExitCode = process.env.BLACK_EXIT_CODE || '1'; const success = outcome == 'success' && flake8ExitCode == '0' && blackExitCode == '0'; const status_emoji = success ? ':green_circle:' : ':red_circle:'; const s3_path = process.env.S3_URL_PREFIX; const flake8Status = flake8ExitCode == '0' ? ':green_circle:' : ':red_circle:'; const blackStatus = blackExitCode == '0' ? ':green_circle:' : ':red_circle:'; let comment = 'status: ' + status_emoji + ' [GA scripts pytest result (artifact)](' + process.env.ARTIFACT_URL + ')' + ' [GA scripts pytest report (artifact)](' + process.env.HTML_ARTIFACT_URL + ')' + ' [GA scripts pytest report (s3)](' + s3_path + '/test_reports/ga-scripts-pytest-report.html)' + ' [GA scripts pytest results (s3)](' + s3_path + '/test_reports/ga-scripts-pytest-results.xml)'; if (process.env.PYTEST_SUMMARY_MARKDOWN) { comment += '\n\n' + process.env.PYTEST_SUMMARY_MARKDOWN; } comment += '\n\nblack - ' + blackStatus + ' [log](' + s3_path + '/test_reports/ga-scripts-black.log)' + '\nflake8 - ' + flake8Status + ' [log](' + s3_path + '/test_reports/ga-scripts-flake8.log)'; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: comment }) - name: fail on python checks if: ${{ always() }} env: FLAKE8_EXIT_CODE: ${{ steps.flake8.outputs.exit_code }} BLACK_EXIT_CODE: ${{ steps.black.outputs.exit_code }} PYTEST_OUTCOME: ${{ steps.pytest.outcome }} run: | status=0 if [ "${FLAKE8_EXIT_CODE:-1}" != "0" ]; then echo "::error::flake8 failed" status=1 fi if [ "${BLACK_EXIT_CODE:-1}" != "0" ]; then echo "::error::black failed" status=1 fi if [ "${PYTEST_OUTCOME}" != "success" ]; then echo "::error::pytest failed" status=1 fi exit "$status" workflows: needs: [set-env, check-running-allowed, check-trigger-label] if: needs.check-running-allowed.outputs.result == 'true' && needs.check-trigger-label.outputs.allowed == 'true' runs-on: [self-hosted, "self-hosted", "runner_light"] steps: - name: checkout uses: actions/checkout@v7 with: submodules: false sparse-checkout: ".github" clean: true - name: disable sparse checkout (workaround for actions/checkout/issues/2249) if: ${{ always() }} run: git config core.sparseCheckout false continue-on-error: true - name: set up home shell: bash run: echo "HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV - name: install workflow linters run: bash .github/packer/scripts/install-github-release-tools.sh action-validator actionlint - name: Prepare s3 if: ${{ env.ACT != 'true' }} id: s3 uses: ./.github/actions/s3cmd with: s3_bucket: ${{ vars.POOLED_LIGHT_AWS_BUCKET }} s3_endpoint: ${{ vars.POOLED_LIGHT_AWS_ENDPOINT }} s3_website_suffix: ${{ vars.POOLED_LIGHT_AWS_WEBSITE_SUFFIX }} s3_key_id: ${{ secrets.POOLED_LIGHT_AWS_KEY_ID }} s3_key_secret: ${{ secrets.POOLED_LIGHT_AWS_SECRET_KEY }} folder_prefix: nebius- build_preset: "relwithdebinfo" install: false - name: check workflows syntax id: lint continue-on-error: true run: | set -x TMP_OUT=$(mktemp) status=0 while read -r path; do { echo "Checking $path" action-validator --verbose "$path" || status=1 } >> "$TMP_OUT" done < <(find .github/workflows .github/actions -type f \( -iname \*.yaml -o -iname \*.yml \) -print) echo "WORKFLOW_LINT=$(cat $TMP_OUT | awk -v ORS='\\n' 1)" cat $TMP_OUT >> "$GITHUB_STEP_SUMMARY" echo "WORKFLOW_LINT=$(cat $TMP_OUT | awk -v ORS='\\n' 1)" >> "$GITHUB_OUTPUT" echo "S3_WEBSITE_PREFIX=$TMP_OUT" | tee -a "$GITHUB_ENV" | tee -a "$GITHUB_OUTPUT" echo "OUTPUT_FILE=$TMP_OUT" | tee -a "$GITHUB_ENV" | tee -a "$GITHUB_OUTPUT" chmod 644 $TMP_OUT exit "$status" - name: upload workflow lint results if: ${{ env.ACT != 'true' && always() }} id: upload-workflow-lint-to-s3 run: | set -x aws s3 cp --acl public-read --follow-symlinks --no-progress "$OUTPUT_FILE" "$S3_BUCKET_PATH/workflow_lint/workflow-lint.txt" - name: actionlint id: actionlint uses: ./.github/actions/lint_report with: title: "GitHub Actions actionlint" tool: command report_name: ga-workflows-actionlint command: actionlint -config-file .github/actionlint.yml -shellcheck= -pyflakes= - name: comment on issue uses: actions/github-script@v9 if: ${{ env.ACT != 'true' && github.event_name == 'pull_request' && always() }} env: ACTION_VALIDATOR_OUTCOME: ${{ steps.lint.outcome }} ACTIONLINT_EXIT_CODE: ${{ steps.actionlint.outputs.exit_code }} with: script: | const actionValidatorStatus = process.env.ACTION_VALIDATOR_OUTCOME == 'success' ? ':green_circle:' : ':red_circle:'; const actionlintStatus = process.env.ACTIONLINT_EXIT_CODE == '0' ? ':green_circle:' : ':red_circle:'; const success = process.env.ACTION_VALIDATOR_OUTCOME == 'success' && process.env.ACTIONLINT_EXIT_CODE == '0'; const status_emoji = success ? ':green_circle:' : ':red_circle:'; const s3_path = process.env.S3_URL_PREFIX; const comment = 'status: ' + status_emoji + '\n\naction-validator - ' + actionValidatorStatus + ' [log](' + s3_path + '/workflow_lint/workflow-lint.txt)' + '\nactionlint - ' + actionlintStatus + ' [log](' + s3_path + '/test_reports/ga-workflows-actionlint.log)'; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: comment }) - name: fail on workflow checks if: ${{ always() }} env: ACTION_VALIDATOR_OUTCOME: ${{ steps.lint.outcome }} ACTIONLINT_EXIT_CODE: ${{ steps.actionlint.outputs.exit_code }} run: | status=0 if [ "${ACTION_VALIDATOR_OUTCOME}" != "success" ]; then echo "::error::action-validator failed" status=1 fi if [ "${ACTIONLINT_EXIT_CODE:-1}" != "0" ]; then echo "::error::actionlint failed" status=1 fi exit "$status" packer: needs: [check-running-allowed, check-trigger-label] if: needs.check-running-allowed.outputs.result == 'true' && needs.check-trigger-label.outputs.allowed == 'true' name: Packer build uses: ./.github/workflows/packer.yaml secrets: inherit with: image_id: "" build_image: true check_vm_creation: true update_image_id: false update_pooled_image_ids: false update_runner_version: false cleanup_built_image: true create-build-and-test-target-var: needs: - check-trigger-label - check-running-allowed if: needs.check-running-allowed.outputs.result == 'true' && needs.check-trigger-label.outputs.allowed == 'true' runs-on: [self-hosted, "self-hosted", "runner_light"] outputs: matrix_include: ${{ steps.set-build-and-test-targets.outputs.matrix_include }} matrix_include_asan: ${{ steps.set-build-and-test-targets.outputs.matrix_include_asan }} matrix_include_tsan: ${{ steps.set-build-and-test-targets.outputs.matrix_include_tsan }} matrix_include_msan: ${{ steps.set-build-and-test-targets.outputs.matrix_include_msan }} matrix_include_ubsan: ${{ steps.set-build-and-test-targets.outputs.matrix_include_ubsan }} steps: - name: checkout PR uses: actions/checkout@v7 if: github.event.pull_request.head.sha != '' with: submodules: false sparse-checkout: ".github" ref: ${{ github.event.pull_request.head.sha }} fetch-depth: ${{ !contains(github.event.pull_request.labels.*.name, 'rebase') && 1 || 0 }} - name: rebase PR if: ${{ github.event.pull_request.head.sha != '' && contains(github.event.pull_request.labels.*.name, 'rebase') }} shell: bash run: | if [ -d ".git/rebase-merge" ] || [ -d ".git/rebase-apply" ]; then echo "Removing stale rebase state left on runner checkout" rm -rf .git/rebase-merge .git/rebase-apply fi git config user.email "robot-nbs@nebius.com" git config user.name "Robot NBS" git fetch origin ${{ github.event.pull_request.base.ref }} git rebase origin/${{ github.event.pull_request.base.ref }} - name: checkout uses: actions/checkout@v7 if: github.event.pull_request.head.sha == '' with: submodules: false sparse-checkout: ".github" clean: true - name: disable sparse checkout (workaround for actions/checkout/issues/2249) if: ${{ always() }} run: git config core.sparseCheckout false continue-on-error: true - name: Calculate pr build and test targets matrix id: set-build-and-test-targets uses: ./.github/actions/nebius_calculate_pr_matrix with: scheduling_type: ${{ vars.NEBIUS_SCHEDULING_TYPE || 'on_demand' }} build_and_test: needs: [check-running-allowed, create-build-and-test-target-var] if: needs.check-running-allowed.outputs.result == 'true' strategy: fail-fast: false matrix: ${{ fromJson(needs.create-build-and-test-target-var.outputs.matrix_include) }} name: Build and test (${{ matrix.mode }}${{ matrix.vm_name_suffix }}) uses: ./.github/workflows/build_and_test_proxy.yaml with: mode: ${{ matrix.mode }} allow_split_workload: ${{ !contains(toJSON(matrix), '"allow_split_workload"') || matrix.allow_split_workload }} build_target: ${{ matrix.build_target }} test_target: ${{ matrix.test_target }} build_preset: ${{ matrix.build_preset }} run_build: ${{ !contains(toJSON(matrix), '"run_build"') || matrix.run_build }} run_tests: ${{ !contains(toJSON(matrix), '"run_tests"') || matrix.run_tests }} target_platform: ${{ matrix.target_platform }} test_size: ${{ contains(github.event.pull_request.labels.*.name, 'large-tests') && 'small,medium,large' || 'small' }} test_type: ${{ matrix.test_type }} vm_name_suffix: ${{ matrix.vm_name_suffix }} number_of_retries: ${{ matrix.number_of_retries }} cache_update_build: false cache_update_tests: false sleep_after_tests: ${{ contains(github.event.pull_request.labels.*.name, 'sleep') && '7200' || '1' }} secrets: inherit nightly-builds: needs: [check-running-allowed, check-trigger-label] if: >- ${{ needs.check-running-allowed.outputs.result == 'true' && needs.check-trigger-label.outputs.allowed == 'true' && ( contains(github.event.pull_request.labels.*.name, 'nightly-tests') || contains(github.event.pull_request.labels.*.name, 'nightly-asan') || contains(github.event.pull_request.labels.*.name, 'nightly-tsan') || contains(github.event.pull_request.labels.*.name, 'nightly-msan') || contains(github.event.pull_request.labels.*.name, 'nightly-ubsan') || contains(github.event.pull_request.labels.*.name, 'nightly-arm') || contains(github.event.pull_request.labels.*.name, 'nightly-sanitizers') || contains(github.event.pull_request.labels.*.name, 'nightly-all') ) }} runs-on: [self-hosted, "self-hosted", "runner_light"] timeout-minutes: 540 steps: - name: checkout workflow scripts uses: actions/checkout@v7 with: submodules: false sparse-checkout: '.github' clean: true ref: ${{ github.event.pull_request.base.sha }} - name: disable sparse checkout (workaround for actions/checkout/issues/2249) if: ${{ always() }} run: git config core.sparseCheckout false continue-on-error: true - name: Prepare s3cmd uses: ./.github/actions/s3cmd continue-on-error: true with: s3_bucket: ${{ vars.POOLED_HEAVY_AWS_BUCKET }} s3_endpoint: ${{ vars.POOLED_HEAVY_AWS_ENDPOINT }} s3_website_suffix: ${{ vars.POOLED_HEAVY_AWS_WEBSITE_SUFFIX }} s3_key_id: ${{ secrets.POOLED_HEAVY_AWS_KEY_ID }} s3_key_secret: ${{ secrets.POOLED_HEAVY_AWS_SECRET_KEY }} folder_prefix: nebius- build_preset: relwithdebinfo - name: Dispatch and collect nightly builds uses: ./.github/actions/nightly_pr_check with: github_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - name: Cancel dispatched nightly builds if: ${{ cancelled() }} uses: ./.github/actions/nightly_pr_check with: mode: cancel github_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} finalize-build-and-test-comments: needs: [check-running-allowed, create-build-and-test-target-var, build_and_test] if: ${{ always() && needs.check-running-allowed.outputs.result == 'true' && needs.create-build-and-test-target-var.outputs.matrix_include != '' }} runs-on: [self-hosted, "self-hosted", "runner_light"] steps: - name: checkout uses: actions/checkout@v7 with: submodules: false sparse-checkout: '.github' clean: true - name: disable sparse checkout (workaround for actions/checkout/issues/2249) if: ${{ always() }} run: git config core.sparseCheckout false continue-on-error: true - name: set up dependencies run: pip install -r .github/scripts/requirements.txt continue-on-error: true - name: finalize workload comments env: GITHUB_TOKEN: ${{ github.token }} MATRIX_INCLUDE: ${{ needs.create-build-and-test-target-var.outputs.matrix_include }} run: | set -euo pipefail export PYTHONPATH="${PYTHONPATH:-}:$GITHUB_WORKSPACE/.github" platform_name=$(uname | tr '[:upper:]' '[:lower:]')-$(arch) python3 -m scripts.tests.finalize_workload_comments \ --matrix-include "$MATRIX_INCLUDE" \ --platform-name "$platform_name" \ --workload-status completed continue-on-error: true