Skip to content

Commit

Permalink
ci: improve conan cache strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Jan 2, 2025
1 parent 175e657 commit f4cb556
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,14 @@ jobs:
with:
fetch-depth: 0

- name: Cache Conan packages
id: cache-conan
- name: Cache Conan
uses: actions/cache@v4
env:
cache-name: cache-conan-packages
with:
path: ~/.conan2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('conanfile.py') }}
key: ${{ runner.os }}-conan-${{ matrix.build_type }}-${{ hashFiles('conanfile.py') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-conan-${{ matrix.build_type }}-
${{ runner.os }}-conan-
${{ runner.os }}-
- name: Set up Python
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,14 @@ jobs:
with:
fetch-depth: 0

- name: Cache Conan packages
id: cache-conan
- name: Cache Conan
uses: actions/cache@v4
env:
cache-name: cache-conan-packages
with:
path: ~/.conan2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('conanfile.py') }}
key: ${{ runner.os }}-conan-${{ matrix.build_type }}-${{ hashFiles('conanfile.py') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-conan-${{ matrix.build_type }}-
${{ runner.os }}-conan-
${{ runner.os }}-
- name: Set up Python
Expand Down

0 comments on commit f4cb556

Please sign in to comment.