Skip to content

Commit a213d9f

Browse files
committed
fix: use freshly-built mcpp for test step (bootstrap lacks --mirror)
The bootstrap mcpp (from xlings cache) may not support `self config --mirror`. Use the freshly-built binary for test + mirror config.
1 parent d71b427 commit a213d9f

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,20 @@ jobs:
8888
restore-keys: |
8989
mcpp-target-${{ runner.os }}-
9090
91-
- name: Build mcpp from source (self-host)
91+
- name: Configure mirror + Build mcpp from source (self-host)
9292
run: |
9393
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
94+
# Set GLOBAL mirror via xlings directly (bootstrap mcpp may lack --mirror flag)
95+
"$XLINGS_BIN" config --mirror GLOBAL 2>/dev/null || true
96+
"$MCPP" self config --mirror GLOBAL 2>/dev/null || true
9497
"$MCPP" build
9598
9699
- name: Unit + integration tests via `mcpp test`
97100
run: |
98-
# Ensure GLOBAL mirror for package downloads (runner is outside CN)
99-
"$MCPP" self config --mirror GLOBAL
100-
"$MCPP" test
101+
# Use freshly-built mcpp for test (it has --mirror support)
102+
MCPP_FRESH=$(realpath "$(find target -type f -name mcpp -printf '%T@ %p\n' | sort -rn | head -1 | cut -d' ' -f2)")
103+
"$MCPP_FRESH" self config --mirror GLOBAL
104+
"$MCPP_FRESH" test
101105
102106
- name: E2E suite
103107
run: |

0 commit comments

Comments
 (0)