Skip to content

Commit

Permalink
CI: build: add option to define custom ccache cache type
Browse files Browse the repository at this point in the history
Add new input to define custom ccache cache type. This is useful to use
a different ccache cache for some special workflow that may do more test
than simple kernel compilation.

Signed-off-by: Christian Marangi <[email protected]>
  • Loading branch information
Ansuel committed May 31, 2023
1 parent b9a41c1 commit 07b52a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ on:
use_ccache_cache:
type: boolean
default: true
ccache_type:
type: string
default: kernel

permissions:
contents: read
Expand Down Expand Up @@ -257,9 +260,9 @@ jobs:
uses: actions/cache/restore@v3
with:
path: openwrt/.ccache
key: ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-${{ hashFiles('openwrt/include/kernel-**') }}
key: ccache-${{ inputs.ccache_type }}-${{ inputs.target }}/${{ inputs.subtarget }}-${{ hashFiles('openwrt/include/kernel-**') }}
restore-keys: |
ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-
ccache-${{ inputs.ccache_type }}-${{ inputs.target }}/${{ inputs.subtarget }}-
- name: Download external toolchain/sdk
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type != 'internal' && steps.parse-toolchain.outputs.toolchain-type != 'external_container'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ jobs:
build_all_kmods: true
build_all_modules: true
build_full: true
ccache_type: packages

0 comments on commit 07b52a8

Please sign in to comment.