|
20 | 20 | description: "comma list: simx,rtlsim,xrtsim,opaesim (blank = all)" |
21 | 21 | default: "" |
22 | 22 | tier: |
23 | | - description: "comma list: smoke,fast,slow,nightly (blank = all)" |
| 23 | + description: "comma list: smoke,full,nightly (blank = all)" |
24 | 24 | default: "" |
25 | 25 |
|
26 | 26 | env: |
@@ -68,15 +68,17 @@ jobs: |
68 | 68 | IN_DRIVERS: ${{ github.event.inputs.drivers }} |
69 | 69 | IN_TIER: ${{ github.event.inputs.tier }} |
70 | 70 | TOOLCHAIN_CACHE_HIT: ${{ steps.tc.outputs.cache-hit }} |
| 71 | + PUSH_BEFORE: ${{ github.event.before }} |
| 72 | + PR_BASE: ${{ github.event.pull_request.base.sha }} |
71 | 73 | run: | |
72 | 74 | set -euo pipefail |
73 | 75 | # Driver/tier policy by event (workflow_dispatch overrides). |
74 | 76 | case "$EVENT" in |
75 | 77 | schedule) DRIVERS=""; TIER="" ;; # everything |
76 | | - pull_request) DRIVERS="simx,rtlsim"; TIER="smoke,fast,slow" ;; |
77 | | - push) DRIVERS="simx"; TIER="smoke,fast" ;; |
| 78 | + pull_request) DRIVERS="simx,rtlsim"; TIER="smoke,full" ;; |
| 79 | + push) DRIVERS="simx"; TIER="smoke" ;; |
78 | 80 | workflow_dispatch) DRIVERS="$IN_DRIVERS"; TIER="$IN_TIER" ;; |
79 | | - *) DRIVERS="simx"; TIER="smoke,fast" ;; |
| 81 | + *) DRIVERS="simx"; TIER="smoke" ;; |
80 | 82 | esac |
81 | 83 | # Toolchain (re)built -> 100% coverage. If the toolchain cache missed |
82 | 84 | # (deleted / out-of-date / evicted / key changed / first run) the build |
|
90 | 92 | DRIVERS=""; TIER="" |
91 | 93 | fi |
92 | 94 | fi |
| 95 | + # Change-aware driver escalation: simx is a separate C++ model and cannot |
| 96 | + # exercise the RTL, so a change under hw/rtl, hw/dpi, sim/rtlsim|xrtsim| |
| 97 | + # opaesim, or vendored RTL must force the matching sim driver in even on a |
| 98 | + # push (which is otherwise simx-only). An indeterminate diff (zero/missing |
| 99 | + # base, e.g. a new branch or force-push) escalates to full coverage. |
| 100 | + if { [ "$EVENT" = "push" ] || [ "$EVENT" = "pull_request" ]; } && [ -n "$DRIVERS" ]; then |
| 101 | + BASE="$PUSH_BEFORE"; [ "$EVENT" = "pull_request" ] && BASE="$PR_BASE" |
| 102 | + ESC=$(python3 ci/testcase.py drivers --changed-from="$BASE" || echo ALL) |
| 103 | + if [ "$ESC" = "ALL" ]; then |
| 104 | + echo "indeterminate diff -> full driver coverage"; DRIVERS="" |
| 105 | + elif [ -n "$ESC" ]; then |
| 106 | + DRIVERS=$(printf '%s\n' "$DRIVERS" "$ESC" | tr ',' '\n' | grep . | sort -u | paste -sd,) |
| 107 | + echo "RTL-affecting change -> drivers=$DRIVERS" |
| 108 | + fi |
| 109 | + fi |
93 | 110 | F="" |
94 | 111 | [ -n "$DRIVERS" ] && F="$F --drivers=$DRIVERS" |
95 | 112 | [ -n "$TIER" ] && F="$F --tier=$TIER" |
@@ -185,6 +202,14 @@ jobs: |
185 | 202 | chmod -R +x . |
186 | 203 | EXPR="${{ matrix.category }}" |
187 | 204 | [ "${{ matrix.driver }}" != "host" ] && EXPR="$EXPR and ${{ matrix.driver }}" |
| 205 | + # model_parity / perf_gate are cross-cutting check markers with |
| 206 | + # their own dedicated cells; exclude them from every other category's |
| 207 | + # cell so a distributed check spec runs once (in its check cell), not |
| 208 | + # twice (also in its owning category's cell). |
| 209 | + case "${{ matrix.category }}" in |
| 210 | + model_parity|perf_gate) ;; |
| 211 | + *) EXPR="$EXPR and not model_parity and not perf_gate" ;; |
| 212 | + esac |
188 | 213 | VX_XLEN=${{ matrix.xlen }} python3 -m pytest ci -m "$EXPR" --strict-markers \ |
189 | 214 | -v \ |
190 | 215 | --junitxml="$GITHUB_WORKSPACE/junit-${{ matrix.category }}-${{ matrix.driver }}-${{ matrix.xlen }}.xml" |
|
0 commit comments