Skip to content

Commit ebd1376

Browse files
committed
[GitHub] Change cache strategy
1 parent b5d3eaf commit ebd1376

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

.github/workflows/macos.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,11 @@ jobs:
4141
sudo ls -la ${SOFA_ROOT}
4242
rm -rf /tmp/sofa_*
4343
44-
- name: Get Time
45-
id: time
46-
uses: nanzm/[email protected]
47-
with:
48-
timeZone: 8
49-
format: 'YYYY-MM-DD-HH-mm-ss'
50-
5144
- name: ccache cache files
5245
uses: actions/cache@v2
5346
with:
5447
path: .ccache
55-
key: ${{ matrix.os }}-ccache-${{ steps.time.outputs.time }}
56-
restore-keys: |
57-
${{ matrix.os }}-ccache-
48+
key: ccache_${{ matrix.sofa_branch }}_${{ matrix.os }}_${{ hashFiles('**/lockfiles') }}
5849

5950
- name: Build
6051
env:

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,11 @@ jobs:
5858
sudo ls -la ${SOFA_ROOT}
5959
rm -rf /tmp/sofa_*
6060
61-
- name: Get Time
62-
id: time
63-
uses: nanzm/[email protected]
64-
with:
65-
timeZone: 8
66-
format: 'YYYY-MM-DD-HH-mm-ss'
67-
6861
- name: ccache cache files
6962
uses: actions/cache@v2
7063
with:
7164
path: .ccache
72-
key: ${{ matrix.os }}-ccache-${{ steps.time.outputs.time }}
73-
restore-keys: |
74-
${{ matrix.os }}-ccache-
65+
key: ccache_${{ matrix.sofa_branch }}_${{ matrix.os }}_${{ hashFiles('**/lockfiles') }}
7566

7667
- name: Build
7768
env:

0 commit comments

Comments
 (0)