Skip to content

Commit 9fb6b3d

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 df18b0a commit 9fb6b3d

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,15 @@ jobs:
7373
- name: Install mcpp
7474
run: |
7575
xlings update
76-
xlings install "mcpp@$MCPP_VERSION" -y -g
76+
# ⚠️ THE PIN MAY NAME THE RELEASE THIS RUN IS VALIDATING, which does
77+
# not exist yet — that is the whole point of MCPP_SOURCE_REF. Bootstrap
78+
# from whatever the index has; the step below replaces it with the
79+
# build under review, and the pin is what an ordinary run tests.
80+
if [ -n "${MCPP_SOURCE_REF:-}" ]; then
81+
xlings install mcpp -y -g
82+
else
83+
xlings install "mcpp@$MCPP_VERSION" -y -g
84+
fi
7785
mcpp --version
7886
mcpp self config --mirror GLOBAL
7987
# ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE.
@@ -170,7 +178,15 @@ jobs:
170178
- name: Install mcpp
171179
run: |
172180
xlings update
173-
xlings install "mcpp@$MCPP_VERSION" -y -g
181+
# ⚠️ THE PIN MAY NAME THE RELEASE THIS RUN IS VALIDATING, which does
182+
# not exist yet — that is the whole point of MCPP_SOURCE_REF. Bootstrap
183+
# from whatever the index has; the step below replaces it with the
184+
# build under review, and the pin is what an ordinary run tests.
185+
if [ -n "${MCPP_SOURCE_REF:-}" ]; then
186+
xlings install mcpp -y -g
187+
else
188+
xlings install "mcpp@$MCPP_VERSION" -y -g
189+
fi
174190
mcpp self config --mirror GLOBAL
175191
# ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE.
176192
#

0 commit comments

Comments
 (0)