Skip to content

Commit 47ce0c6

Browse files
committed
ci: tell this package's objects from the build tool's by name, since both are in one directory
1 parent 99c7299 commit 47ce0c6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ jobs:
9999
# This package's own objects, and not the ones the build tool emits
100100
# beside them: one of those exists to initialise a standard library
101101
# this package does not use, and it is not this package's to answer
102-
# for.
103-
objs="$(find target -path '*/obj/src/*' -name '*.o' ! -name '*.m.o' | tr '\n' ' ')"
102+
# for. They are told apart by name, because the tool places both in
103+
# one directory.
104+
objs="$(find target -path '*/obj/*' -name '*.o' ! -name '*.m.o' ! -name 'mcpp_*' | tr '\n' ' ')"
104105
test -n "$objs" || { echo "no objects were found" >&2; exit 1; }
105106
bash .spec/tools/check-surface.sh --complete .spec/SURFACE.txt $objs
106107
@@ -110,7 +111,7 @@ jobs:
110111
- name: The objects reference nothing of a C library but the two named
111112
run: |
112113
rm -rf target && mcpp build --features standalone
113-
objs="$(find target -path '*/obj/src/*' -name '*.o' ! -name '*.m.o')"
114+
objs="$(find target -path '*/obj/*' -name '*.o' ! -name '*.m.o' ! -name 'mcpp_*')"
114115
test -n "$objs" || { echo "no objects were found; the check would pass vacuously" >&2; exit 1; }
115116
116117
# The permitted set, and why each entry is in it.
@@ -150,7 +151,7 @@ jobs:
150151
run: |
151152
printf 'extern "C" int puts(const char*);\nextern "C" void okm_probe(void) { puts("x"); }\n' > src/probe.cpp
152153
rm -rf target && mcpp build --features standalone
153-
objs="$(find target -path '*/obj/src/*' -name '*.o' ! -name '*.m.o')"
154+
objs="$(find target -path '*/obj/*' -name '*.o' ! -name '*.m.o' ! -name 'mcpp_*')"
154155
if ! nm -u $objs | sed 's/^ *//' | grep -qx '_puts'; then
155156
echo "the probe did not produce the reference it was written to produce" >&2
156157
rm -f src/probe.cpp; exit 1

0 commit comments

Comments
 (0)