Skip to content

Commit d1ed991

Browse files
danmarclaude
authored andcommitted
scriptcheck: pass cppcheck binary between jobs as artifact instead of cache
The repository Actions cache is over its size limit, so the cached binary was evicted before the scriptcheck jobs ran and the addon tests failed with "Could not find cppcheck binary". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 396bb75 commit d1ed991

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

‎.github/workflows/scriptcheck.yml‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,20 @@ jobs:
3232
# only save cache in main/release branches, PRs restore the cache of the base branch
3333
save: ${{ github.event_name != 'pull_request' }}
3434

35-
- name: Cache Cppcheck
36-
uses: actions/cache@v5
37-
with:
38-
path: cppcheck
39-
key: ${{ runner.os }}-scriptcheck-cppcheck-${{ github.sha }}
40-
4135
- name: build cppcheck
4236
run: |
4337
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
4438
make -j$(nproc) CXXOPTS="-Werror"
4539
strip -s ./cppcheck
4640
41+
- name: Upload Cppcheck
42+
uses: actions/upload-artifact@v7
43+
with:
44+
name: scriptcheck-cppcheck
45+
path: cppcheck
46+
retention-days: 1
47+
if-no-files-found: error
48+
4749
scriptcheck:
4850

4951
needs: build
@@ -62,12 +64,13 @@ jobs:
6264
with:
6365
persist-credentials: false
6466

65-
# TODO: bailout on error
66-
- name: Restore Cppcheck
67-
uses: actions/cache@v5
67+
- name: Download Cppcheck
68+
uses: actions/download-artifact@v8
6869
with:
69-
path: cppcheck
70-
key: ${{ runner.os }}-scriptcheck-cppcheck-${{ github.sha }}
70+
name: scriptcheck-cppcheck
71+
72+
- name: Make Cppcheck executable
73+
run: chmod +x ./cppcheck
7174

7275
- name: Set up Python ${{ matrix.python-version }}
7376
uses: actions/setup-python@v6

0 commit comments

Comments
 (0)