Skip to content

Commit 6fa1b22

Browse files
committed
CI: reusable_build: add support for ccache cache for testing kernel
Add support for ccache cache for testing kernel. This is needed to not pollute ccache cache for normal kernel version run. kernel and packages workflow are updated to follow the new artifact ID name. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
1 parent 5096d77 commit 6fa1b22

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/kernel.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,5 +231,5 @@ jobs:
231231
s3_secret_key: ${{ secrets.ccache_s3_secret_key }}
232232
uses: ./.github/workflows/reusable_upload-file-s3.yml
233233
with:
234-
download_id: ${{ matrix.target }}-${{ matrix.subtarget }}-ccache-cache
235-
filename: ccache-kernel-${{ matrix.target }}-${{ matrix.subtarget }}${{ needs.build.outputs.ccache_tag }}.tar
234+
download_id: ${{ matrix.target }}-${{ matrix.subtarget }}${{ matrix.testing != '' && '-testing' || '' }}-ccache-cache
235+
filename: ccache-kernel-${{ matrix.target }}-${{ matrix.subtarget }}${{ inputs.testing == true && '-testing' || '' }}${{ needs.build.outputs.ccache_tag }}.tar

.github/workflows/packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@ jobs:
100100
s3_secret_key: ${{ secrets.ccache_s3_secret_key }}
101101
uses: ./.github/workflows/reusable_upload-file-s3.yml
102102
with:
103-
download_id: ${{ matrix.target }}-${{ matrix.subtarget }}-ccache-cache
104-
filename: ccache-packages-${{ matrix.target }}-${{ matrix.subtarget }}${{ needs.build.outputs.ccache_tag }}.tar
103+
download_id: ${{ matrix.target }}-${{ matrix.subtarget }}${{ matrix.testing != '' && '-testing' || '' }}-ccache-cache
104+
filename: ccache-packages-${{ matrix.target }}-${{ matrix.subtarget }}${{ inputs.testing == true && '-testing' || '' }}${{ needs.build.outputs.ccache_tag }}.tar
105105

.github/workflows/reusable_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162

163163
- name: Determine ccache name
164164
id: determine_ccache_name
165-
run: echo "ccache_name=ccache-${{ inputs.ccache_type }}-${{ inputs.target }}-${{ inputs.subtarget }}${{ steps.determine_ccache_tag.outputs.ccache_tag }}" >> $GITHUB_OUTPUT
165+
run: echo "ccache_name=ccache-${{ inputs.ccache_type }}-${{ inputs.target }}-${{ inputs.subtarget }}${{ inputs.testing == true && '-testing' || '' }}${{ steps.determine_ccache_tag.outputs.ccache_tag }}" >> $GITHUB_OUTPUT
166166

167167
check:
168168
name: Check packages for ${{ inputs.target }}/${{ inputs.subtarget }}
@@ -705,7 +705,7 @@ jobs:
705705
inputs.upload_ccache_cache == true
706706
uses: actions/upload-artifact@v4
707707
with:
708-
name: ${{ inputs.target }}-${{ inputs.subtarget }}-ccache-cache
708+
name: ${{ inputs.target }}-${{ inputs.subtarget }}${{ inputs.testing == true && '-testing' || '' }}-ccache-cache
709709
path: openwrt/${{ needs.setup_build.outputs.ccache_name }}.tar
710710
retention-days: 1
711711

0 commit comments

Comments
 (0)