From 220e5c114072c2405641dd93fa8a47ceb53580d8 Mon Sep 17 00:00:00 2001 From: Pavel Chekin Date: Thu, 11 Jan 2024 10:02:25 -0800 Subject: [PATCH 1/2] Use latest llvm genx commit for packages cache key --- .github/workflows/build_and_test_2.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test_2.yaml b/.github/workflows/build_and_test_2.yaml index 4010e9835d..b609244d09 100644 --- a/.github/workflows/build_and_test_2.yaml +++ b/.github/workflows/build_and_test_2.yaml @@ -104,7 +104,10 @@ jobs: # Increase this value to reset cache CACHE_NUMBER: 1 run: | - PACKAGES_CACHE_KEY="packages-${{ hashFiles('scripts/compile-triton.sh', 'cmake/llvm-hash.txt') }}-${{ env.CACHE_NUMBER }}" + LLVM_COMMIT_ID=$(git ls-remote https://github.com/intel/llvm.git refs/heads/genx | cut -f1) + echo "Latest llvm genx commit id: $LLVM_COMMIT_ID" + COMPOSITE_KEY=$(echo $LLVM_COMMIT_ID ${{ hashFiles('scripts/compile-triton.sh', 'cmake/llvm-hash.txt') }} | sha256sum - | cut -d\ -f1) + PACKAGES_CACHE_KEY="packages-$COMPOSITE_KEY-${{ env.CACHE_NUMBER }}" PACKAGES_CACHE="/cache/$PACKAGES_CACHE_KEY" echo "PACKAGES_CACHE=$PACKAGES_CACHE" >> "${GITHUB_ENV}" if [[ -d $PACKAGES_CACHE ]]; then From 8202f5a040725a180bc581d0c25fbc083a315a98 Mon Sep 17 00:00:00 2001 From: Pavel Chekin Date: Thu, 11 Jan 2024 10:26:31 -0800 Subject: [PATCH 2/2] Do not use `llvm-hash.txt` for packages cache key --- .github/workflows/build_and_test_2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test_2.yaml b/.github/workflows/build_and_test_2.yaml index b609244d09..b761b186ed 100644 --- a/.github/workflows/build_and_test_2.yaml +++ b/.github/workflows/build_and_test_2.yaml @@ -106,7 +106,7 @@ jobs: run: | LLVM_COMMIT_ID=$(git ls-remote https://github.com/intel/llvm.git refs/heads/genx | cut -f1) echo "Latest llvm genx commit id: $LLVM_COMMIT_ID" - COMPOSITE_KEY=$(echo $LLVM_COMMIT_ID ${{ hashFiles('scripts/compile-triton.sh', 'cmake/llvm-hash.txt') }} | sha256sum - | cut -d\ -f1) + COMPOSITE_KEY=$(echo $LLVM_COMMIT_ID ${{ hashFiles('scripts/compile-triton.sh') }} | sha256sum - | cut -d\ -f1) PACKAGES_CACHE_KEY="packages-$COMPOSITE_KEY-${{ env.CACHE_NUMBER }}" PACKAGES_CACHE="/cache/$PACKAGES_CACHE_KEY" echo "PACKAGES_CACHE=$PACKAGES_CACHE" >> "${GITHUB_ENV}"