[ci] improve cmake-checking script

Co-authored-by: Jonathan Flat <jflat@apple.com>
This commit is contained in:
Guillaume LessardandJonathan Flat authored and Guillaume Lessard committed 2026-07-09 12:54:49 -07:00
1 parent 0601f0edec
commit f05c1d815d
1 file changed
+6 -5
+6 -5
View File
@@ -99,11 +99,12 @@ jobs:
jq '.targets[] | select(.name == "SystemPackage") | .sources[]' /tmp/swiftpm.json | sort > /tmp/swiftpm-list.txt
jq '.sources[].path[15:]' /tmp/cmake.json | sort > /tmp/cmake-list.txt
comm -23 /tmp/swiftpm-list.txt /tmp/cmake-list.txt > /tmp/missing.txt
test ! -s /tmp/missing.txt
exit_code=$?
test $exit_code -ne 0 && echo "::notice::SystemPackage CMakeLists.txt matches SwiftPM"
test $exit_code -eq 0 || echo "::error::SystemPackage CMakeLists.txt does not match SwiftPM"
exit $exit_code
if [ -s /tmp/missing.txt ]; then
echo "::error::SystemPackage CMakeLists.txt does not match SwiftPM. Missing sources:"
cat /tmp/missing.txt
exit 1
fi
echo "::notice::SystemPackage CMakeLists.txt matches SwiftPM"
- name: Build Project with CMake
shell: bash
run: cmake --build build