|
5 | 5 | branches: [main] |
6 | 6 | pull_request: |
7 | 7 | workflow_dispatch: |
| 8 | + inputs: |
| 9 | + mcpp_ref: |
| 10 | + description: "Branch of mcpp-community/mcpp to build and test against (empty = the released pin)" |
| 11 | + required: false |
| 12 | + default: "" |
| 13 | +env: |
| 14 | + MCPP_SOURCE_REF: ${{ github.event.inputs.mcpp_ref || vars.MCPP_SOURCE_REF }} |
| 15 | + MCPP_SOURCE_REF: ${{ github.event.inputs.mcpp_ref || vars.MCPP_SOURCE_REF }} |
8 | 16 |
|
9 | 17 | jobs: |
10 | 18 | build: |
11 | 19 | name: boots under real OpenSBI |
12 | 20 | runs-on: ubuntu-24.04 |
13 | 21 | timeout-minutes: 40 |
14 | 22 | env: |
15 | | - MCPP_VERSION: 2026.8.25.1 |
| 23 | + MCPP_VERSION: 2026.8.25.2 |
16 | 24 | XLINGS_VERSION: v2026.8.17.2 |
17 | 25 | XLINGS_NON_INTERACTIVE: '1' |
18 | 26 | # The branch of the specification this backend is verified against. It |
|
65 | 73 | done |
66 | 74 | mcpp --version |
67 | 75 | mcpp self config --mirror GLOBAL |
| 76 | + # ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE. |
| 77 | + # |
| 78 | + # Empty in the ordinary run, so this job keeps testing the RELEASED |
| 79 | + # mcpp the pin above names. Set it — `workflow_dispatch` input, or the |
| 80 | + # repository variable — and the same job runs against that source. |
| 81 | + # |
| 82 | + # ⚠️ THIS EXISTS BECAUSE THE ORDER USED TO BE WRONG. Several mcpp |
| 83 | + # releases went out green and only then turned this ecosystem red: the |
| 84 | + # engine's own CI cannot see a defect that appears only in a real |
| 85 | + # dependency graph, and this repository could not see the engine until |
| 86 | + # it had been published. Validating before the release closes that gap. |
| 87 | + # |
| 88 | + # The released mcpp installed just above is the bootstrap that compiles |
| 89 | + # it; mcpp builds itself and there is no other compiler for it here. |
| 90 | + if [ -n "${MCPP_SOURCE_REF:-}" ]; then |
| 91 | + src="$RUNNER_TEMP/mcpp-src" |
| 92 | + [ -d "$src" ] || git clone --quiet --depth 1 \ |
| 93 | + --branch "$MCPP_SOURCE_REF" \ |
| 94 | + https://github.com/mcpp-community/mcpp.git "$src" |
| 95 | + ( cd "$src" && mcpp build --release ) |
| 96 | + built=$(find "$src/target" -type f -name mcpp -perm -u+x | head -1) |
| 97 | + [ -n "$built" ] || { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; } |
| 98 | + echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH" |
| 99 | + # ⚠️ Reported, because a PATH entry that does not win looks exactly |
| 100 | + # like one that does until something built with the wrong engine. |
| 101 | + echo "under review: $("$built" --version) (from $MCPP_SOURCE_REF)" |
| 102 | + fi |
68 | 103 |
|
69 | 104 | - name: Install the emulator |
70 | 105 | run: | |
@@ -181,7 +216,7 @@ jobs: |
181 | 216 | run: |
182 | 217 | shell: bash |
183 | 218 | env: |
184 | | - MCPP_VERSION: 2026.8.25.1 |
| 219 | + MCPP_VERSION: 2026.8.25.2 |
185 | 220 | XLINGS_VERSION: v2026.8.17.2 |
186 | 221 | XLINGS_NON_INTERACTIVE: '1' |
187 | 222 | steps: |
@@ -236,6 +271,33 @@ jobs: |
236 | 271 | done |
237 | 272 | mcpp --version |
238 | 273 | mcpp self config --mirror GLOBAL |
| 274 | + # ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE. |
| 275 | + # |
| 276 | + # Empty in the ordinary run, so this job keeps testing the RELEASED |
| 277 | + # mcpp the pin above names. Set it — `workflow_dispatch` input, or the |
| 278 | + # repository variable — and the same job runs against that source. |
| 279 | + # |
| 280 | + # ⚠️ THIS EXISTS BECAUSE THE ORDER USED TO BE WRONG. Several mcpp |
| 281 | + # releases went out green and only then turned this ecosystem red: the |
| 282 | + # engine's own CI cannot see a defect that appears only in a real |
| 283 | + # dependency graph, and this repository could not see the engine until |
| 284 | + # it had been published. Validating before the release closes that gap. |
| 285 | + # |
| 286 | + # The released mcpp installed just above is the bootstrap that compiles |
| 287 | + # it; mcpp builds itself and there is no other compiler for it here. |
| 288 | + if [ -n "${MCPP_SOURCE_REF:-}" ]; then |
| 289 | + src="$RUNNER_TEMP/mcpp-src" |
| 290 | + [ -d "$src" ] || git clone --quiet --depth 1 \ |
| 291 | + --branch "$MCPP_SOURCE_REF" \ |
| 292 | + https://github.com/mcpp-community/mcpp.git "$src" |
| 293 | + ( cd "$src" && mcpp build --release ) |
| 294 | + built=$(find "$src/target" -type f -name mcpp -perm -u+x | head -1) |
| 295 | + [ -n "$built" ] || { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; } |
| 296 | + echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH" |
| 297 | + # ⚠️ Reported, because a PATH entry that does not win looks exactly |
| 298 | + # like one that does until something built with the wrong engine. |
| 299 | + echo "under review: $("$built" --version) (from $MCPP_SOURCE_REF)" |
| 300 | + fi |
239 | 301 |
|
240 | 302 | - name: The backend cross-builds |
241 | 303 | run: | |
|
0 commit comments