Skip to content

Commit 3892bcd

Browse files
committed
key names
1 parent ec56108 commit 3892bcd

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

.github/workflows/collector-builder.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,9 @@ jobs:
7878
uses: actions/cache@v4
7979
with:
8080
path: ${{ github.workspace }}/builder/.ccache
81-
key: builder-ccache-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
81+
key: builder-ccache-${{ matrix.arch }}-${{ format('YYYY-MM-DDTHH:mm:ssZ', github.event.head_commit.timestamp) }}
8282
restore-keys: |
83-
builder-ccache-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}-
84-
builder-ccache-${{ matrix.arch }}-master-
83+
builder-ccache-${{ matrix.arch }}-
8584
8685
- name: Setup builder ccache in docker cache
8786
if: |
@@ -173,16 +172,13 @@ jobs:
173172
(contains(github.event.pull_request.labels.*.name, 'run-multiarch-builds') && matrix.arch == 's390x')
174173
timeout-minutes: 480
175174
run: |
176-
[ ! -d "${{ github.workspace }}/builder/.ccache" ] && rm -f "${{ github.workspace }}/builder/.ccache"
177-
ls -al "${{ github.workspace }}/builder/.ccache" || true
178175
ansible-playbook \
179176
-i ansible/ci \
180177
-e build_hosts='job_id_${{ env.JOB_ID }}' \
181178
-e arch='${{ matrix.arch }}' \
182179
-e github_workspace='${{ github.workspace }}' \
183180
-e @'${{ github.workspace }}/ansible/secrets.yml' \
184181
ansible/ci-build-builder.yml
185-
ls -al "${{ github.workspace }}/builder/.ccache" || true
186182
187183
- name: Destroy VMs
188184
if: always() && matrix.arch == 's390x'

.github/workflows/collector.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ jobs:
4848
- name: Set up ccache
4949
uses: hendrikmuhs/ccache-action@v1.2
5050
with:
51-
key: ccache-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
52-
restore-keys: |
53-
ccache-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}-
54-
ccache-${{ matrix.arch }}-master-
51+
key: ${{ matrix.arch }}
5552

5653
- name: Set up QEMU
5754
uses: docker/setup-qemu-action@v3
@@ -92,10 +89,6 @@ jobs:
9289
-e @'${{ github.workspace }}/ansible/secrets.yml' \
9390
ansible/ci-build-collector.yml
9491
95-
- name: Stats for ccache after build
96-
run: |
97-
ccache -s "${{ github.workspace }}/.ccache"
98-
9992
build-collector-image-remote-vm:
10093
name: Build Collector on a remote VM
10194
runs-on: ubuntu-latest
@@ -139,10 +132,9 @@ jobs:
139132
uses: actions/cache@v4
140133
with:
141134
path: ${{ github.workspace }}/.ccache
142-
key: ccache-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
135+
key: ccache-${{ matrix.arch }}-${{ format('YYYY-MM-DDTHH:mm:ssZ', github.event.head_commit.timestamp) }}
143136
restore-keys: |
144-
ccache-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}-
145-
ccache-${{ matrix.arch }}-master-
137+
ccache-${{ matrix.arch }}-
146138
147139
- name: Create Build VMs
148140
run: |

0 commit comments

Comments
 (0)