Skip to content

Commit

Permalink
ci: cache clang tidy even if it fails
Browse files Browse the repository at this point in the history
One failure will otherwise cause us to lose the entire cache
  • Loading branch information
vchernin committed Sep 29, 2023
1 parent fc685f9 commit d47032b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ jobs:
git checkout bd1620a8609ddaf2f64500820abc8b4d150edeaf # v1.1.0
./install-user-client
- name: Cache Clang Tidy
uses: actions/cache@v3.3.2
- name: Restore Clang Tidy cache
uses: actions/cache/restore@v3.3.2
with:
# since the ctcache is just a list of checksums that were checked, we want to write to it every ci run to keep it up to date
# otherwise github actions just restores some old cache if the key didn't change
Expand All @@ -242,6 +242,15 @@ jobs:
cd build
PATH=~/.local/bin:"$PATH" CTCACHE_DIR=/tmp/ci-ctcache ../util/clang-tidy.sh
- name: Save Clang Tidy cache
uses: actions/cache/save@v3.3.2
# always run, except if the workflow was cancelled
# this means clang tidy will get cached even if some checks are failing
if: success() || failure()
with:
path: /tmp/ci-ctcache
key: clang-tidy-ctcache-${{ github.run_id }}

appstream-news-validate:
name: AppStream and News validate
runs-on: ubuntu-22.04
Expand Down

0 comments on commit d47032b

Please sign in to comment.