1111 workflow_dispatch :
1212
1313env :
14- # Bumped to 0.0.73 : carries Windows runtime-DLL deployment, required by the
14+ # Bumped to 0.0.77 : carries L1 platform-conditional deps/flags + [xlings] env,
1515 # compat.openblas Windows recipe (bin/libopenblas.dll staged beside the .exe).
16- MCPP_VERSION : " 0.0.73 "
16+ MCPP_VERSION : " 0.0.77 "
1717
1818jobs :
1919 lint :
@@ -105,6 +105,7 @@ jobs:
105105 full : ${{ steps.f.outputs.full }}
106106 full_linux : ${{ steps.f.outputs.full_linux }}
107107 full_portable : ${{ steps.f.outputs.full_portable }}
108+ workspace : ${{ steps.f.outputs.workspace }}
108109 steps :
109110 - uses : actions/checkout@v4
110111 with :
@@ -123,11 +124,12 @@ jobs:
123124 # coverage is ever silently dropped).
124125 full_linux=false
125126 full_portable=false
127+ workspace=false
126128 examples='[]'
127129 event="${{ github.event_name }}"
128130 if [ "$event" != "pull_request" ]; then
129131 # push to main / nightly schedule / manual dispatch → full regression
130- full_linux=true; full_portable=true
132+ full_linux=true; full_portable=true; workspace=true
131133 else
132134 git fetch -q origin "${{ github.base_ref }}"
133135 changed=$(git diff --name-only "origin/${{ github.base_ref }}...HEAD")
@@ -138,16 +140,22 @@ jobs:
138140 case "$file" in
139141 # Common harness / the workflow itself → both platforms.
140142 tests/run_example.sh|tests/check_mirror_urls.lua|tests/list_cn_urls.lua|.github/workflows/validate.yml)
141- full_linux=true; full_portable=true ;;
143+ full_linux=true; full_portable=true; workspace=true ;;
144+ # The self-referential workspace: its declaration (root mcpp.toml)
145+ # and its driver. A member change under tests/examples/* also feeds
146+ # the workspace job (handled below, with the examples fast path).
147+ mcpp.toml|tests/run_workspace.sh)
148+ workspace=true ;;
142149 # Portable suite script runs only in smoke-portable (win+mac).
143150 tests/smoke_compat_portable.sh)
144151 full_portable=true ;;
145152 # Linux-only smoke scripts run only in smoke-full-linux.
146153 tests/smoke_compat_core.sh|tests/smoke_compat_imgui.sh|tests/smoke_compat_archive.sh|tests/smoke_compat_imgui_window.sh|tests/smoke_imgui_module.sh)
147154 full_linux=true ;;
148- # Example projects are handled by the smoke-examples fast path.
155+ # Example projects are handled by the smoke-examples fast path;
156+ # they are also workspace members, so re-run the workspace driver.
149157 tests/examples/*)
150- : ;;
158+ workspace=true ;;
151159 # Any other tests/ change (new helper / new smoke script) → both (safe).
152160 tests/*)
153161 full_linux=true; full_portable=true ;;
@@ -171,8 +179,9 @@ jobs:
171179 echo "full=$full" >> "$GITHUB_OUTPUT"
172180 echo "full_linux=$full_linux" >> "$GITHUB_OUTPUT"
173181 echo "full_portable=$full_portable" >> "$GITHUB_OUTPUT"
182+ echo "workspace=$workspace" >> "$GITHUB_OUTPUT"
174183 echo "examples=$examples" >> "$GITHUB_OUTPUT"
175- echo "=> full_linux=$full_linux full_portable=$full_portable examples=$examples"
184+ echo "=> full_linux=$full_linux full_portable=$full_portable workspace=$workspace examples=$examples"
176185
177186 # ── Fast path: per-changed-package example projects (Linux) ───────────
178187 smoke-examples :
@@ -210,6 +219,44 @@ jobs:
210219 "$MCPP" --version
211220 timeout 1800 bash tests/run_example.sh "${{ matrix.pkg }}"
212221
222+ # ── Self-referential workspace: mcpp-index AS a mcpp [workspace] ──────
223+ # Dogfoods mcpp's own native [workspace]: the root mcpp.toml declares every
224+ # per-library example as a workspace member, and the driver builds+runs each
225+ # through the real pkgs/ index (local [indices] path). This is the dual
226+ # perspective — the repo is both the package index and a consumer of it. The
227+ # openblas member additionally exercises L1 platform-conditional deps/flags
228+ # (no-op here on linux; the Windows cblas path is covered by smoke-portable).
229+ smoke-workspace :
230+ needs : detect
231+ if : needs.detect.outputs.workspace == 'true'
232+ runs-on : ubuntu-latest
233+ steps :
234+ - uses : actions/checkout@v4
235+ - name : Restore mcpp registry cache
236+ uses : actions/cache@v4
237+ with :
238+ path : ~/.mcpp/registry
239+ key : mcpp-registry-${{ runner.os }}-${{ env.MCPP_VERSION }}-${{ hashFiles('pkgs/**/*.lua', 'tests/**', '.github/workflows/validate.yml') }}
240+ restore-keys : |
241+ mcpp-registry-${{ runner.os }}-${{ env.MCPP_VERSION }}-
242+ - name : Download mcpp
243+ run : |
244+ curl -L -fsS -o mcpp.tar.gz \
245+ "https://github.com/mcpp-community/mcpp/releases/download/v${MCPP_VERSION}/mcpp-${MCPP_VERSION}-linux-x86_64.tar.gz"
246+ tar -xzf mcpp.tar.gz
247+ root="$PWD/mcpp-${MCPP_VERSION}-linux-x86_64"
248+ mkdir -p "$HOME/.mcpp/registry"
249+ cp -a "$root/registry/." "$HOME/.mcpp/registry/"
250+ echo "MCPP=$root/bin/mcpp" >> "$GITHUB_ENV"
251+ echo "MCPP_VENDORED_XLINGS=$root/registry/bin/xlings" >> "$GITHUB_ENV"
252+ echo "$root/bin" >> "$GITHUB_PATH"
253+ - name : Build + run every workspace member
254+ env :
255+ MCPP_INDEX_MIRROR : GLOBAL
256+ run : |
257+ "$MCPP" --version
258+ timeout 1800 bash tests/run_workspace.sh
259+
213260 # ── Full regression (legacy whole-suite smoke) ────────────────────────
214261 smoke-full-linux :
215262 needs : detect
@@ -279,14 +326,14 @@ jobs:
279326 include :
280327 - platform : macos
281328 os : macos-15
282- archive : mcpp-0.0.73 -macosx-arm64.tar.gz
283- root : mcpp-0.0.73 -macosx-arm64
329+ archive : mcpp-0.0.77 -macosx-arm64.tar.gz
330+ root : mcpp-0.0.77 -macosx-arm64
284331 mcpp : bin/mcpp
285332 xlings : registry/bin/xlings
286333 - platform : windows
287334 os : windows-latest
288- archive : mcpp-0.0.73 -windows-x86_64.zip
289- root : mcpp-0.0.73 -windows-x86_64
335+ archive : mcpp-0.0.77 -windows-x86_64.zip
336+ root : mcpp-0.0.77 -windows-x86_64
290337 mcpp : bin/mcpp.exe
291338 xlings : registry/bin/xlings.exe
292339 steps :
0 commit comments