Skip to content

Commit

Permalink
Fix the build cache key to incldue lsb-release (#34397)
Browse files Browse the repository at this point in the history
* Fix the build cache key to incldue lsb-release

* More hashing that is manual...I don't see hashFiles working

---------

Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Aug 7, 2024
1 parent 2a750e5 commit 1071280
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/bootstrap/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ runs:
# because the bootstrapped Pigweed environment contains absolute paths.
echo "Calculating bootstrap cache key for '$PWD'"
FILES_HASH="${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}"
FINAL_HASH="$(echo "$PWD:$FILES_HASH" | shasum -a 256 | cut -d' ' -f1)"
OS_HASH="$(md5sum /etc/lsb-release | cut -d' ' -f1)"
PYTHON_HASH="$(python --version | md5sum | cut -d' ' -f1)"
FINAL_HASH="$(echo "$PWD:$FILES_HASH:$OS_HASH:$PYTHON_HASH" | shasum -a 256 | cut -d' ' -f1)"
echo key="${RUNNER_OS}-${RUNNER_ARCH}-${{ inputs.platform }}-${FINAL_HASH}" | tee -a "$GITHUB_OUTPUT"
# Split caches across backends
Expand Down

0 comments on commit 1071280

Please sign in to comment.