@@ -41,31 +41,85 @@ jobs:
4141 return all_file_count === docs_file_count;
4242 result-encoding : string
4343
44- rust :
44+ # Build guests once, upload as artifacts for other jobs to download
45+ build-guests :
46+ needs : docs-pr
47+ uses : ./.github/workflows/dep_build_guests.yml
48+ secrets : inherit
49+ with :
50+ docs_only : ${{ needs.docs-pr.outputs.docs-only }}
51+
52+ # Code checks (fmt, clippy, MSRV) - runs in parallel with build-guests
53+ code-checks :
54+ needs : docs-pr
55+ uses : ./.github/workflows/dep_code_checks.yml
56+ secrets : inherit
57+ with :
58+ docs_only : ${{ needs.docs-pr.outputs.docs-only }}
59+
60+ # Build and test - needs guest artifacts
61+ build-test :
62+ needs :
63+ - docs-pr
64+ - build-guests
65+ strategy :
66+ fail-fast : true
67+ matrix :
68+ hypervisor : [hyperv, 'hyperv-ws2025', mshv3, kvm]
69+ cpu : [amd, intel]
70+ config : [debug, release]
71+ uses : ./.github/workflows/dep_build_test.yml
72+ secrets : inherit
73+ with :
74+ docs_only : ${{ needs.docs-pr.outputs.docs-only }}
75+ hypervisor : ${{ matrix.hypervisor }}
76+ cpu : ${{ matrix.cpu }}
77+ config : ${{ matrix.config }}
78+
79+ # Run examples - needs guest artifacts, runs in parallel with build-test
80+ run-examples :
4581 needs :
4682 - docs-pr
83+ - build-guests
4784 strategy :
4885 fail-fast : true
4986 matrix :
5087 hypervisor : [hyperv, 'hyperv-ws2025', mshv3, kvm]
5188 cpu : [amd, intel]
5289 config : [debug, release]
53- uses : ./.github/workflows/dep_rust .yml
90+ uses : ./.github/workflows/dep_run_examples .yml
5491 secrets : inherit
5592 with :
56- docs_only : ${{needs.docs-pr.outputs.docs-only}}
93+ docs_only : ${{ needs.docs-pr.outputs.docs-only }}
5794 hypervisor : ${{ matrix.hypervisor }}
5895 cpu : ${{ matrix.cpu }}
5996 config : ${{ matrix.config }}
6097
98+ # Run benchmarks - release only, needs guest artifacts, runs in parallel with build-test
99+ benchmarks :
100+ needs :
101+ - docs-pr
102+ - build-guests
103+ strategy :
104+ fail-fast : true
105+ matrix :
106+ hypervisor : [hyperv, 'hyperv-ws2025', mshv3, kvm]
107+ cpu : [amd, intel]
108+ uses : ./.github/workflows/dep_benchmarks.yml
109+ secrets : inherit
110+ with :
111+ docs_only : ${{ needs.docs-pr.outputs.docs-only }}
112+ hypervisor : ${{ matrix.hypervisor }}
113+ cpu : ${{ matrix.cpu }}
114+
61115 fuzzing :
62116 needs :
63117 - docs-pr
64118 uses : ./.github/workflows/dep_fuzzing.yml
65119 with :
66- targets : ' ["fuzz_host_print", "fuzz_guest_call", "fuzz_host_call", "fuzz_guest_estimate_trace_event", "fuzz_guest_trace"]' # Pass as a JSON array
67- max_total_time : 300 # 5 minutes in seconds
68- docs_only : ${{needs.docs-pr.outputs.docs-only}}
120+ targets : ' ["fuzz_host_print", "fuzz_guest_call", "fuzz_host_call", "fuzz_guest_estimate_trace_event", "fuzz_guest_trace"]'
121+ max_total_time : 300
122+ docs_only : ${{ needs.docs-pr.outputs.docs-only }}
69123 secrets : inherit
70124
71125 spelling :
@@ -85,21 +139,20 @@ jobs:
85139 run : ./dev/check-license-headers.sh
86140
87141 # Gate PR merges on this specific "join-job" which requires all other
88- # jobs to run first. We need this job since we cannot gate on particular jobs
89- # in the workflow, since they can sometimes be skipped (e.g. if the PR only touches docs).
90- # This step fixes this issue by always running.
142+ # jobs to run first.
91143 report-ci-status :
92144 needs :
93145 - docs-pr
94- - rust
146+ - build-guests
147+ - code-checks
148+ - build-test
149+ - run-examples
150+ - benchmarks
95151 - fuzzing
96152 - spelling
97153 - license-headers
98154 if : always()
99155 runs-on : ubuntu-latest
100156 steps :
101- # Calculate the exit status of the whole CI workflow.
102- # If all dependent jobs were successful, this exits with 0 (and the outcome job continues successfully).
103- # If a some dependent job has failed, this exits with 1.
104157 - name : calculate the correct exit status
105158 run : jq --exit-status 'all(.result == "success" or .result == "skipped")' <<< '${{ toJson(needs) }}'
0 commit comments