|
19 | 19 | branches: [main] |
20 | 20 | pull_request: |
21 | 21 | workflow_dispatch: |
22 | | - |
| 22 | + inputs: |
| 23 | + mcpp_ref: |
| 24 | + description: "Branch of mcpp-community/mcpp to build and test against (empty = the released pin)" |
| 25 | + required: false |
| 26 | + default: "" |
23 | 27 | env: |
24 | | - MCPP_VERSION: 2026.8.25.1 |
| 28 | + MCPP_SOURCE_REF: ${{ github.event.inputs.mcpp_ref || vars.MCPP_SOURCE_REF }} |
| 29 | + MCPP_VERSION: 2026.8.25.2 |
25 | 30 | XLINGS_VERSION: v2026.8.17.2 |
26 | 31 | XLINGS_NON_INTERACTIVE: '1' |
27 | 32 |
|
|
71 | 76 | xlings install "mcpp@$MCPP_VERSION" -y -g |
72 | 77 | mcpp --version |
73 | 78 | mcpp self config --mirror GLOBAL |
| 79 | + # ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE. |
| 80 | + # |
| 81 | + # Empty in the ordinary run, so this job keeps testing the RELEASED |
| 82 | + # mcpp the pin above names. Set it — `workflow_dispatch` input, or the |
| 83 | + # repository variable — and the same job runs against that source. |
| 84 | + # |
| 85 | + # ⚠️ THIS EXISTS BECAUSE THE ORDER USED TO BE WRONG. Several mcpp |
| 86 | + # releases went out green and only then turned this ecosystem red: the |
| 87 | + # engine's own CI cannot see a defect that appears only in a real |
| 88 | + # dependency graph, and this repository could not see the engine until |
| 89 | + # it had been published. Validating before the release closes that gap. |
| 90 | + # |
| 91 | + # The released mcpp installed just above is the bootstrap that compiles |
| 92 | + # it; mcpp builds itself and there is no other compiler for it here. |
| 93 | + if [ -n "${MCPP_SOURCE_REF:-}" ]; then |
| 94 | + src="$RUNNER_TEMP/mcpp-src" |
| 95 | + [ -d "$src" ] || git clone --quiet --depth 1 \ |
| 96 | + --branch "$MCPP_SOURCE_REF" \ |
| 97 | + https://github.com/mcpp-community/mcpp.git "$src" |
| 98 | + ( cd "$src" && mcpp build --release ) |
| 99 | + built=$(find "$src/target" -type f -name mcpp -perm -u+x | head -1) |
| 100 | + [ -n "$built" ] || { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; } |
| 101 | + echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH" |
| 102 | + # ⚠️ Reported, because a PATH entry that does not win looks exactly |
| 103 | + # like one that does until something built with the wrong engine. |
| 104 | + echo "under review: $("$built" --version) (from $MCPP_SOURCE_REF)" |
| 105 | + fi |
74 | 106 |
|
75 | 107 | - name: Select the toolchain |
76 | 108 | run: | |
@@ -140,6 +172,33 @@ jobs: |
140 | 172 | xlings update |
141 | 173 | xlings install "mcpp@$MCPP_VERSION" -y -g |
142 | 174 | mcpp self config --mirror GLOBAL |
| 175 | + # ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE. |
| 176 | + # |
| 177 | + # Empty in the ordinary run, so this job keeps testing the RELEASED |
| 178 | + # mcpp the pin above names. Set it — `workflow_dispatch` input, or the |
| 179 | + # repository variable — and the same job runs against that source. |
| 180 | + # |
| 181 | + # ⚠️ THIS EXISTS BECAUSE THE ORDER USED TO BE WRONG. Several mcpp |
| 182 | + # releases went out green and only then turned this ecosystem red: the |
| 183 | + # engine's own CI cannot see a defect that appears only in a real |
| 184 | + # dependency graph, and this repository could not see the engine until |
| 185 | + # it had been published. Validating before the release closes that gap. |
| 186 | + # |
| 187 | + # The released mcpp installed just above is the bootstrap that compiles |
| 188 | + # it; mcpp builds itself and there is no other compiler for it here. |
| 189 | + if [ -n "${MCPP_SOURCE_REF:-}" ]; then |
| 190 | + src="$RUNNER_TEMP/mcpp-src" |
| 191 | + [ -d "$src" ] || git clone --quiet --depth 1 \ |
| 192 | + --branch "$MCPP_SOURCE_REF" \ |
| 193 | + https://github.com/mcpp-community/mcpp.git "$src" |
| 194 | + ( cd "$src" && mcpp build --release ) |
| 195 | + built=$(find "$src/target" -type f -name mcpp -perm -u+x | head -1) |
| 196 | + [ -n "$built" ] || { echo "::error::mcpp did not build from $MCPP_SOURCE_REF"; exit 1; } |
| 197 | + echo "$(cd "$(dirname "$built")" && pwd)" >> "$GITHUB_PATH" |
| 198 | + # ⚠️ Reported, because a PATH entry that does not win looks exactly |
| 199 | + # like one that does until something built with the wrong engine. |
| 200 | + echo "under review: $("$built" --version) (from $MCPP_SOURCE_REF)" |
| 201 | + fi |
143 | 202 |
|
144 | 203 | - name: Every interface, every kind of examination |
145 | 204 | env: |
|
0 commit comments