From 6ebc1571a61e78e5f1ead893dbb053f46b987838 Mon Sep 17 00:00:00 2001 From: Sweetbread Date: Mon, 10 Mar 2025 22:32:15 +0300 Subject: [PATCH] CI: Add hash for toolchain --- .gitea/workflows/build.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 3238e11e9..214c75f13 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -33,12 +33,23 @@ jobs: id: vars run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITEA_OUTPUT + - name: Get toolchain hash + id: toolchain-hash + run: | + echo "hash=$(echo `find ${{ gitea.workspace }}/programs/develop/cmm/* -type f - print0 | sort -z | xargs -0 sha1sum` \ + `sha1sum ${{ gitea.workspace }}/programs/develop/ktcc/trunk/bin/kos32-tcc` \ + `find ${{ gitea.workspace }}/programs/develop/objconv/ -type f -print0 | sort -z | xargs -0 sha1sum` \ + `find ${{ gitea.workspace }}/programs/other/kpack/kerpack_linux/ -type f -print0 | sort -z | xargs -0 sha1sum` \ + `find ${{ gitea.workspace }}/programs/other/kpack/linux/ -type f -print0 | sort -z | xargs -0 sha1sum` \ + `find ${{ gitea.workspace }}/programs/develop/clink/ -type f -print0 | sort -z | xargs -0 sha1sum` \ + | sha1sum)" >> $GITEA_OUTPUT + - name: Restore toolchain id: cache-toolchain uses: actions/cache/restore@v4 with: path: /home/autobuild - key: kolibri-toolchain + key: kolibri-toolchain-${{ steps.toolchain-hash.outputs.hash }} - name: Build and install C-- if: steps.cache-toolchain.outputs.cache-hit != 'true' @@ -98,7 +109,7 @@ jobs: uses: actions/cache/save@v4 with: path: /home/autobuild - key: kolibri-toolchain + key: kolibri-toolchain-${{ steps.toolchain-hash.outputs.hash }} - name: Configure tup run: |