Skip to content

Commit 557360e

Browse files
committed
check
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent b5031ac commit 557360e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,12 @@ jobs:
244244
test -z "$(git status --porcelain)"
245245
- name: "Make sure rebuild is a no-op"
246246
run: |
247-
output=$(${{matrix.config.env.rustflags}} cargo hack build --locked ${{matrix.config.args}} --ignore-private 2>&1)
248-
if echo "$output" | grep -q "Compiling"; then
247+
stale=$(${{matrix.config.env.rustflags}} cargo hack build --locked ${{matrix.config.args}} --ignore-private \
248+
--message-format json 2>/dev/null \
249+
| jq -r 'select(.reason == "compiler-artifact" and .fresh == false) | .target.name')
250+
if [ -n "$stale" ]; then
249251
echo "ERROR: Second build recompiled crates that should have been cached:"
250-
echo "$output" | grep "Compiling"
252+
echo "$stale"
251253
exit 1
252254
fi
253255

0 commit comments

Comments
 (0)