X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=.github%2Fworkflows%2Fkernel.yml;h=0ba8c27e2e7313f88dd5dee9b55ba2dbc5dcaa73;hb=137ba15e6ef31534a2002a02e69b774232f0b040;hp=6c8ad68438d7259e57b39677a1961a943f90c88d;hpb=2781e3839e7f4f6132a2737ee9f988f40fa58d99;p=openwrt%2Fstaging%2Fdedeckeh.git diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml index 6c8ad68438..0ba8c27e2e 100644 --- a/.github/workflows/kernel.yml +++ b/.github/workflows/kernel.yml @@ -18,6 +18,7 @@ jobs: outputs: target: ${{ steps.find_targets.outputs.target }} owner_lc: ${{ steps.lower_owner.outputs.owner_lc }} + ccache_hash: ${{ steps.ccache_hash.outputs.ccache_hash }} steps: - name: Checkout @@ -30,6 +31,13 @@ jobs: | tr '[:upper:]' '[:lower:]') echo "::set-output name=owner_lc::$OWNER_LC" + - name: Generate ccache hash + id: ccache_hash + run: | + CCACHE_HASH=$(md5sum include/kernel-* | awk '{ print $1 }' \ + | md5sum | awk '{ print $1 }') + echo "::set-output name=ccache_hash::$CCACHE_HASH" + - name: Set targets id: find_targets run: | @@ -133,6 +141,14 @@ jobs: path: openwrt/${{ env.TOOLCHAIN_FILE }} key: ${{ env.TOOLCHAIN_FILE }}-${{ env.TOOLCHAIN_SHA256 }} + - name: Cache ccache + uses: actions/cache@v3 + with: + path: openwrt/.ccache + key: ccache-kernel-${{ env.TARGET }}/${{ env.SUBTARGET }}-${{ needs.determine_targets.outputs.ccache_hash }} + restore-keys: | + ccache-kernel-${{ env.TARGET }}/${{ env.SUBTARGET }}- + - name: Download external toolchain if: ${{ steps.cache-external-toolchain.outputs.cache-hit != 'true' }} shell: su buildbot -c "sh -e {0}" @@ -153,6 +169,7 @@ jobs: echo CONFIG_ALL_KMODS=y >> .config echo CONFIG_DEVEL=y >> .config echo CONFIG_AUTOREMOVE=y >> .config + echo CONFIG_CCACHE=y >> .config ./scripts/ext-toolchain.sh \ --toolchain ${{ env.TOOLCHAIN_FILE }}/toolchain-* \