Skip to content

Commit 93a130e

Browse files
committed
ci: print simple ccache stats in job summary
1 parent 4a9ef02 commit 93a130e

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

.github/actions/ccache-summary/action.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,5 @@ runs:
1010
using: composite
1111
steps:
1212
- name: Log ccache stats
13-
run: |
14-
CCACHE_OUTPUT=$(ccache -s)
15-
16-
CACHEABLE=$(echo "$CCACHE_OUTPUT" | grep "Cacheable calls" | awk '{print $3 " / " $5 " (" $6}')
17-
HITS=$(echo "$CCACHE_OUTPUT" | grep "Hits:" | head -1 | awk '{print $2 " / " $4 " (" $5}')
18-
UNCACHEABLE=$(echo "$CCACHE_OUTPUT" | grep "Uncacheable calls" | awk '{print $3 " / " $5 " (" $6}')
19-
ERRORS=$(echo "$CCACHE_OUTPUT" | grep "Errors:" | awk '{print $2 " / " $4 " (" $5}')
20-
21-
MD_TABLE_BUFF="## ccache statistics - ${{ inputs.name }} \n\n"
22-
MD_TABLE_BUFF+="| Metric | Value |\n"
23-
MD_TABLE_BUFF+="|--------|-------|\n"
24-
MD_TABLE_BUFF+="| Cacheable calls | $CACHEABLE |\n"
25-
MD_TABLE_BUFF+="| Hits | $HITS |\n"
26-
MD_TABLE_BUFF+="| Uncacheable calls | $UNCACHEABLE |\n"
27-
MD_TABLE_BUFF+="| Errors | $ERRORS |\n"
28-
29-
echo "$MD_TABLE_BUFF" >> $GITHUB_STEP_SUMMARY
13+
run: ccache -s > $GITHUB_STEP_SUMMARY
3014
shell: bash

0 commit comments

Comments
 (0)