-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2a235a6
commit e01bc9e
Showing
1 changed file
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,10 +40,10 @@ jobs: | |
git config --global --add safe.directory $PWD | ||
rm -f .temporary-github-output | ||
echo "llvm-hash=$(git rev-parse @:./llvm)" >> .temporary-github-output | ||
. /etc/lsb-release | ||
echo "ubuntu-codename=$DISTRIB_CODENAME" >> .temporary-github-output | ||
echo "circt-hash=$(git rev-parse HEAD)" >> .temporary-github-output | ||
echo "cache-key-prefix=\"ccache-devcontainer-${{ matrix.devcontainer-name }}-${DISTRIB_ID}_${DISTRIB_RELEASE}" >> .temporary-github-output | ||
- name: Export cache key parts | ||
id: get-cache-key-parts | ||
id: cache-key-parts | ||
run: | | ||
cat .temporary-github-output | ||
cat .temporary-github-output >> $GITHUB_OUTPUT | ||
|
@@ -53,11 +53,10 @@ jobs: | |
uses: actions/cache/restore@v3 | ||
with: | ||
path: ccache | ||
key: circt-ccache-database-${{ steps.get-cache-key-parts.outputs.ubuntu-codename }}-${{ steps.get-cache-key-parts.outputs.llvm-hash }}-${{ hashFiles('.devcontainer/**') }} | ||
key: ${{ steps.cache-key-parts.outputs.cache-key-prefix }}-llvm_${{ steps.cache-key-parts.outputs.llvm-hash }}-circt_${{ steps.cache-key-parts.outputs.circt-hash }} | ||
restore-keys: | | ||
circt-ccache-database-${{ steps.get-cache-key-parts.outputs.ubuntu-codename }}-${{ steps.get-cache-key-parts.outputs.llvm-hash }}- | ||
circt-ccache-database-${{ steps.get-cache-key-parts.outputs.ubuntu-codename }}-${{ steps.get-cache-key-parts.outputs.llvm-hash }}- | ||
circt-ccache-database-${{ steps.get-cache-key-parts.outputs.ubuntu-codename }}- | ||
${{ steps.cache-key-parts.outputs.cache-key-prefix }}-llvm_${{ steps.cache-key-parts.outputs.llvm-hash }}-circt_ | ||
${{ steps.cache-key-parts.outputs.cache-key-prefix }}-llvm_ | ||
- name: Initialize ccache | ||
uses: devcontainers/[email protected] | ||
|
@@ -118,7 +117,7 @@ jobs: | |
if: ${{ always() && steps.configure-cmake-project.outcome == 'success' }} | ||
with: | ||
path: ccache | ||
key: circt-ccache-database-${{ steps.get-cache-key-parts.outputs.ubuntu-codename }}-${{ steps.get-cache-key-parts.outputs.llvm-hash }}-${{ hashFiles('.devcontainer/**') }} | ||
key: ${{ steps.cache-key-parts.outputs.cache-key-prefix }}-llvm_${{ steps.cache-key-parts.outputs.llvm-hash }}-circt_${{ steps.cache-key-parts.outputs.circt-hash }} | ||
# If evicting everything that wasn't used this workflow does not reduce the cache past its maximum, it may benefit performance to increase the cache size. | ||
- name: Log ccache estimated usage | ||
uses: devcontainers/[email protected] | ||
|