mirror of
https://github.com/apple/swift-system
synced 2026-11-24 04:38:14 +00:00
[ci] improve cmake-checking script
Co-authored-by: Jonathan Flat <jflat@apple.com>
This commit is contained in:
1 parent
0601f0edec
commit
f05c1d815d
1 file changed
+6
-5
@@ -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
|
||||
|
||||
Reference in new issue
Block a user