From 64d3a8417e91f7930512981b4a55a10faf746d2a Mon Sep 17 00:00:00 2001 From: Max K Date: Fri, 31 May 2024 16:40:23 +0200 Subject: [PATCH] CI: MergeQueue: add binary_release and unit tests --- .github/workflows/merge_queue.yml | 18 +++++++++++++++++- tests/ci/ci.py | 14 ++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge_queue.yml b/.github/workflows/merge_queue.yml index d1b03198485..c8b2452829b 100644 --- a/.github/workflows/merge_queue.yml +++ b/.github/workflows/merge_queue.yml @@ -80,11 +80,27 @@ jobs: run_command: | python3 fast_test_check.py + Builds_1: + needs: [RunConfig, BuildDockers] + if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Builds_1') }} + # using callable wf (reusable_stage.yml) allows grouping all nested jobs under a tab + uses: ./.github/workflows/reusable_build_stage.yml + with: + stage: Builds_1 + data: ${{ needs.RunConfig.outputs.data }} + Tests_1: + needs: [RunConfig, Builds_1] + if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Tests_1') }} + uses: ./.github/workflows/reusable_test_stage.yml + with: + stage: Tests_1 + data: ${{ needs.RunConfig.outputs.data }} + ################################# Stage Final ################################# # FinishCheck: if: ${{ !failure() && !cancelled() }} - needs: [RunConfig, BuildDockers, StyleCheck, FastTest] + needs: [RunConfig, BuildDockers, StyleCheck, FastTest, Builds_1, Tests_1] runs-on: [self-hosted, style-checker-aarch64] steps: - name: Check out repository code diff --git a/tests/ci/ci.py b/tests/ci/ci.py index d8bd5c504dd..5a3f6cab70c 100644 --- a/tests/ci/ci.py +++ b/tests/ci/ci.py @@ -1215,7 +1215,9 @@ def _pre_action(s3, indata, pr_info): ci_cache = CiCache(s3, indata["jobs_data"]["digests"]) # for release/master branches reports must be from the same branch - report_prefix = normalize_string(pr_info.head_ref) if pr_info.number == 0 else "" + report_prefix = "" + if pr_info.is_master or pr_info.is_release: + report_prefix = normalize_string(pr_info.head_ref) print( f"Use report prefix [{report_prefix}], pr_num [{pr_info.number}], head_ref [{pr_info.head_ref}]" ) @@ -1374,7 +1376,12 @@ def _configure_jobs( # FIXME: find better place for these config variables DOCS_CHECK_JOBS = [JobNames.DOCS_CHECK, JobNames.STYLE_CHECK] - MQ_JOBS = [JobNames.STYLE_CHECK, JobNames.FAST_TEST] + MQ_JOBS = [ + JobNames.STYLE_CHECK, + JobNames.FAST_TEST, + Build.BINARY_RELEASE, + JobNames.UNIT_TEST, + ] # Must always calculate digest for these jobs for CI Cache to function (they define s3 paths where records are stored) REQUIRED_DIGESTS = [JobNames.DOCS_CHECK, Build.PACKAGE_RELEASE] if pr_info.has_changes_in_documentation_only(): @@ -1391,6 +1398,9 @@ def _configure_jobs( ): # We still need digest for JobNames.DOCS_CHECK since CiCache depends on it (FIXME) continue + if pr_info.is_master and job in MQ_JOBS: + # On master - skip jobs that run in MQ + continue if ( pr_info.has_changes_in_documentation_only() and job not in DOCS_CHECK_JOBS