From f05c1d815dc4bcc73fb53382fc13efba6b136ca5 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Thu, 9 Jul 2026 11:33:38 -0700 Subject: [PATCH] [ci] improve cmake-checking script Co-authored-by: Jonathan Flat --- .github/workflows/pull_request.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 52feae9..9aade4d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -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