From 529721923f52d6d9c86b3008fe4168b38d2495e3 Mon Sep 17 00:00:00 2001 From: Max Kainov Date: Tue, 19 Nov 2024 17:14:55 +0100 Subject: [PATCH] CI: Enable fuzzer job in Nightly workflow --- .github/workflows/nightly.yml | 34 ++++++++++++++++++++++++++++++++-- tests/ci/ci_config.py | 6 ++++++ tests/ci/ci_definitions.py | 1 + 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1cea94e7500..739958b6f90 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -27,7 +27,7 @@ jobs: id: runconfig run: | echo "::group::configure CI run" - python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --configure --skip-jobs --outfile ${{ runner.temp }}/ci_run_data.json + python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --configure --workflow NightlyBuilds --outfile ${{ runner.temp }}/ci_run_data.json echo "::endgroup::" echo "::group::CI run configure results" @@ -44,9 +44,39 @@ jobs: with: data: "${{ needs.RunConfig.outputs.data }}" set_latest: true + + Builds_1: + needs: [RunConfig] + if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Builds_1') }} + 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 }} + Builds_2: + needs: [RunConfig, Builds_1] + if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Builds_2') }} + uses: ./.github/workflows/reusable_build_stage.yml + with: + stage: Builds_2 + data: ${{ needs.RunConfig.outputs.data }} + Tests_2: + needs: [RunConfig, Builds_1, Tests_1] + if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Tests_2') }} + uses: ./.github/workflows/reusable_test_stage.yml + with: + stage: Tests_2 + data: ${{ needs.RunConfig.outputs.data }} + CheckWorkflow: if: ${{ !cancelled() }} - needs: [RunConfig, BuildDockers] + needs: [RunConfig, BuildDockers, Tests_2] runs-on: [self-hosted, style-checker-aarch64] steps: - name: Check out repository code diff --git a/tests/ci/ci_config.py b/tests/ci/ci_config.py index 67cdbbdcf6d..9135d50337b 100644 --- a/tests/ci/ci_config.py +++ b/tests/ci/ci_config.py @@ -46,6 +46,12 @@ class CI: JobNames.JEPSEN_KEEPER, JobNames.JEPSEN_SERVER, ] + ), + WorkFlowNames.NIGHTLY: LabelConfig( + run_jobs=[ + BuildNames.FUZZERS, + JobNames.LIBFUZZER_TEST, + ] ) } # type: Dict[str, LabelConfig] diff --git a/tests/ci/ci_definitions.py b/tests/ci/ci_definitions.py index fb3e55fdbe3..aefed29dceb 100644 --- a/tests/ci/ci_definitions.py +++ b/tests/ci/ci_definitions.py @@ -92,6 +92,7 @@ class WorkFlowNames(metaclass=WithIter): JEPSEN = "JepsenWorkflow" CreateRelease = "CreateRelease" + NIGHTLY = "NightlyBuilds" class BuildNames(metaclass=WithIter):