Skip to content

Commit f7ceefc

Browse files
committed
ci: bootstrap from the index when validating an unreleased mcpp
The pin may name the very release the run is validating, which does not exist yet — that is what MCPP_SOURCE_REF is for. Bootstrap from whatever the index has; the build under review replaces it a step later.
1 parent 5a3dd3e commit f7ceefc

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,15 @@ jobs:
7474
- name: Install mcpp
7575
run: |
7676
xlings update
77-
xlings install "mcpp@$MCPP_VERSION" -y -g
77+
# ⚠️ THE PIN MAY NAME THE RELEASE THIS RUN IS VALIDATING, which does
78+
# not exist yet — that is the whole point of MCPP_SOURCE_REF. Bootstrap
79+
# from whatever the index has; the step below replaces it with the
80+
# build under review, and the pin is what an ordinary run tests.
81+
if [ -n "${MCPP_SOURCE_REF:-}" ]; then
82+
xlings install mcpp -y -g
83+
else
84+
xlings install "mcpp@$MCPP_VERSION" -y -g
85+
fi
7886
mcpp --version
7987
mcpp self config --mirror GLOBAL
8088
# ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE.

0 commit comments

Comments
 (0)