Skip to content

Commit

Permalink
CI: physical design flow: fixup cache
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Czarnecki <[email protected]>
  • Loading branch information
lpawelcz committed Jul 7, 2023
1 parent e02cfbe commit b9eeb9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-yosys-systemverilog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ jobs:
run: |
cache_date=$(date +"%Y_%m_%d")
cache_name=cache_${{ env.TOOL_NAME }}
git_hash=$(git submodule status third_party/yosys-systemverilog | awk '{print $1}')
echo "Cache date: "$cache_date
echo "Cache name: "$cache_name
echo "cache_date=$cache_date" >> "$GITHUB_ENV"
echo "Yosys-systemverilog submodule git hash: "$git_hash
echo "cache_name=$cache_name" >> "$GITHUB_ENV"
echo "git_hash=$git_hash" >> "$GITHUB_ENV"
- name: Setup cache
uses: actions/cache@v3
Expand All @@ -29,8 +31,7 @@ jobs:
with:
path: |
/opt/yosys-systemverilog
key: ${{ env.cache_name }}_${{ env.cache_date }}
restore-keys: ${{ env.cache_name }}
key: ${{ env.cache_name }}_${{ env.git_hash }}

- name: Setup repository
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/run-physical-design-flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ jobs:
run: |
date=$(date +"%Y_%m_%d")
time=$(date +"%Y%m%d_%H%M%S_%N")
cache_yosys_systemverilog_restore_key=cache_yosys_systemverilog
cache_yosys_systemverilog_key=${cache_yosys_systemverilog_restore_key}
cache_yosys_systemverilog_git_hash=$(git submodule status third_party/yosys-systemverilog | awk '{print $1}')
cache_yosys_systemverilog_restore_key=cache_yosys_systemverilog_
cache_yosys_systemverilog_key=${cache_yosys_systemverilog_restore_key}_${cache_yosys_systemverilog_git_hash}
echo "date=$date" | tee -a "$GITHUB_ENV"
echo "time=$time" | tee -a "$GITHUB_ENV"
Expand Down

0 comments on commit b9eeb9f

Please sign in to comment.