CI: build: drop redundant generate ccache hash job
authorChristian Marangi <ansuelsmth@gmail.com>
Sat, 27 May 2023 20:08:26 +0000 (22:08 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 31 May 2023 11:22:00 +0000 (13:22 +0200)
Drop redundant generare ccache hash job as that can be done by
integrated github expressions to generate an hash.
The only change is that the integrated way generate a sha256 hash
instead of an md5 sum.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.github/workflows/build.yml

index 78f856962e68edaa284bae02d2851df08cb52778..6948caf11effb101d2663ae11fc6f4eeec448ee7 100644 (file)
@@ -64,7 +64,6 @@ jobs:
     runs-on: ubuntu-latest
     outputs:
       owner_lc: ${{ steps.lower_owner.outputs.owner_lc }}
-      ccache_hash: ${{ steps.ccache_hash.outputs.ccache_hash }}
       container_tag: ${{ steps.determine_tools_container.outputs.container_tag }}
       container_name: ${{ steps.determine_tools_container.outputs.container_name }}
 
@@ -84,13 +83,6 @@ jobs:
 
           echo "owner_lc=$OWNER_LC" >> $GITHUB_OUTPUT
 
-      - name: Generate ccache hash
-        id: ccache_hash
-        run: |
-          CCACHE_HASH=$(md5sum include/kernel-* | awk '{ print $1 }' \
-           | md5sum | awk '{ print $1 }')
-          echo "ccache_hash=$CCACHE_HASH" >> $GITHUB_OUTPUT
-
       # Per branch tools container tag
       # By default stick to latest
       # For official test targetting openwrt stable branch
@@ -259,7 +251,7 @@ jobs:
         uses: actions/cache@v3
         with:
           path: openwrt/.ccache
-          key: ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-${{ needs.setup_build.outputs.ccache_hash }}
+          key: ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-${{ hashFiles('openwrt/include/kernel-**') }}
           restore-keys: |
             ccache-kernel-${{ inputs.target }}/${{ inputs.subtarget }}-