@@ -70,10 +70,23 @@ jobs:
7070 mcpp --version
7171 mcpp self config --mirror GLOBAL
7272
73+ # The compiler family and version for this row. mcpp keeps its toolchains
74+ # in a sandbox of its own, so this selects rather than installs into the
75+ # system, and `mcpp test' and `mcpp run' have no flag for it --- which is
76+ # why it is set once here rather than passed to each command.
77+ - name : Select the toolchain
78+ run : |
79+ spec='${{ matrix.toolchain }}'
80+ case "$spec" in
81+ msvc*) mcpp toolchain default msvc ;;
82+ *) mcpp toolchain install "${spec%@*}" "${spec#*@}"
83+ mcpp toolchain default "$spec" ;;
84+ esac
85+ mcpp toolchain list
86+
7387 - name : Every interface, every kind of examination
7488 run : |
75- bash .spec/tools/run-conformance.sh openkal-macos . full \
76- --toolchain '${{ matrix.toolchain }}'
89+ bash .spec/tools/run-conformance.sh openkal-macos . full
7790
7891 - name : The exported surface is complete and contains nothing else
7992 run : |
8295 # source. --complete because this implementation claims every
8396 # interface: a name it fails to export is a failure, not an interface
8497 # it declines to provide.
85- rm -rf target && mcpp build --toolchain '${{ matrix.toolchain }}'
98+ rm -rf target && mcpp build
8699 objs="$(find target -path '*/obj/*' -name '*.o' ! -name '*.m.o' | tr '\n' ' ')"
87100 test -n "$objs" || { echo "no objects were found" >&2; exit 1; }
88101 bash .spec/tools/check-surface.sh --complete .spec/SURFACE.txt $objs
92105 # library through a macro.
93106 - name : The objects reference nothing of a C library but the two named
94107 run : |
95- rm -rf target && mcpp build --features standalone --toolchain '${{ matrix.toolchain }}'
108+ rm -rf target && mcpp build --features standalone
96109 objs="$(find target -path '*/obj/*' -name '*.o' ! -name '*.m.o')"
97110 test -n "$objs" || { echo "no objects were found; the check would pass vacuously" >&2; exit 1; }
98111
@@ -126,7 +139,7 @@ jobs:
126139 - name : The independence check detects a dependence
127140 run : |
128141 printf 'extern "C" int puts(const char*);\nextern "C" void okm_probe(void) { puts("x"); }\n' > src/probe.cpp
129- rm -rf target && mcpp build --features standalone --toolchain '${{ matrix.toolchain }}'
142+ rm -rf target && mcpp build --features standalone
130143 objs="$(find target -path '*/obj/*' -name '*.o' ! -name '*.m.o')"
131144 if ! nm -u $objs | sed 's/^ *//' | grep -qx '_puts'; then
132145 echo "the probe did not produce the reference it was written to produce" >&2
0 commit comments