Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ on:
workflow_dispatch:

env:
# 0.0.100: large-source-package platform batch — windows driver-style link
# via rspfile (mcpp#247), macOS build.mcpp env contract via posix_spawn
# (mcpp#248), `include_dirs_after` -> -idirafter (mcpp#249, what the
# migrated compat.ffmpeg/compat.opencv descriptors require), generated_files
# identical-content skip-write (incremental builds for frozen-snapshot
# packages), build.mcpp source=/include-dir[-after]= directives, and
# `xpkg parse --all-os` (the per-OS lint this CI now runs).
# 0.0.99: feature dep/feat forwarding (mcpp#243 — a feature can open a
# feature OF a dependency, e.g. opencv `dnn` forwarding compat.opencv/dnn);
# vendored xlings 0.4.67 for the >=2 index_repo install fix (mcpp#238 /
Expand All @@ -35,7 +42,7 @@ env:
# 0.0.94 fixed feature-gated `sources` under `mcpp test` (mcpp#218); 0.0.91
# added standard = "c++fly" to the resolver grammar, so c++fly descriptors
# get the lint WARN below, not a hard grammar-parse rejection.
MCPP_VERSION: "0.0.99"
MCPP_VERSION: "0.0.100"

jobs:
lint:
Expand Down Expand Up @@ -107,14 +114,29 @@ jobs:
echo "MCPP=$PWD/mcpp-${MCPP_VERSION}-linux-x86_64/bin/mcpp" >> "$GITHUB_ENV"
- name: Parse descriptors with the resolver grammar (mcpp xpkg parse)
run: |
# Per-OS sections other than the runner's host OS are skipped by a
# plain parse (xpkg skip-table), so a typo in a windows/macosx
# section is invisible on linux CI. `xpkg parse --all-os`
# (mcpp >= 0.0.100) parses EVERY per-OS section that ships xpm
# versions. Feature-detected from the pinned binary's --help, so
# this step keeps its current behavior under the 0.0.99 pin and
# tightens automatically on the 0.0.100 pin bump — no workflow
# change needed then.
ALLOS=""
if "$MCPP" xpkg parse --help 2>/dev/null | grep -q -- '--all-os'; then
ALLOS="--all-os"
echo "pinned mcpp supports --all-os: validating every shipped per-OS section"
else
echo "pinned mcpp (< 0.0.100) has no --all-os: host-OS sections only"
fi
fail=0
for f in pkgs/*/*.lua; do
if ! "$MCPP" xpkg parse "$f" > /dev/null; then
echo "::error file=$f::mcpp xpkg parse failed (resolver grammar)"
if ! "$MCPP" xpkg parse $ALLOS "$f" > /dev/null; then
echo "::error file=$f::mcpp xpkg parse $ALLOS failed (resolver grammar)"
fail=1
fi
done
[ $fail -eq 0 ] && echo "All descriptors parse with mcpp ${MCPP_VERSION}."
[ $fail -eq 0 ] && echo "All descriptors parse with mcpp ${MCPP_VERSION}${ALLOS:+ (all-os)}."
exit $fail

mirror-cn-reachable:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ tests/examples/*/mcpp.lock
tests/examples/build-mcpp/src/generated.cpp
imgui.ini
tests/examples/*/imgui.ini
# python tool caches
tools/**/__pycache__/
Loading
Loading