Skip to content

Commit 45625d2

Browse files
committed
switch to v4 cache/artifacts and bypass cache when runner is in debug mode
1 parent aac7903 commit 45625d2

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

.github/workflows/do_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
9999
- name: Restore Existing Dep Cache
100100
if: ${{ inputs.RequiredDeps != '' && inputs.BuildPkg != 'script' }}
101-
uses: actions/cache/restore@v3
101+
uses: actions/cache/restore@v4
102102
with:
103103
path: |
104104
d:/artifacts

.github/workflows/restore_deps_to_cache.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,16 @@ jobs:
4343

4444
- name: Check Existing Cache
4545
id: cachecheck
46-
uses: actions/cache/restore@v3
46+
if: runner.debug != '1' # avoid existing cache if debugger enabled
47+
uses: actions/cache/restore@v4
4748
with:
4849
path: |
4950
d:/artifacts
5051
key: ${{ steps.vars.outputs.DepsCacheKey }}
5152
lookup-only: true
5253

5354
- name: Download Artifact ${{ steps.vars.outputs.Dep1Name }}
54-
uses: mitchcapper/action-download-artifact@e8fcde2d08c6684586e66d4fe22786fd61a6e1a8
55+
uses: mitchcapper/action-download-artifact@6aeaa1ddc66f3e526ea4e409313f8f93a3ed95cc
5556
if: ${{ steps.vars.outputs.Dep1Name && steps.cachecheck.outputs.cache-hit != 'true' }}
5657
with:
5758
name: ${{ steps.vars.outputs.Dep1Name }}
@@ -64,7 +65,7 @@ jobs:
6465
workflow: tool_${{ steps.vars.outputs.Dep1Name }}_build.yml
6566

6667
- name: Download Artifact ${{ steps.vars.outputs.Dep2Name }}
67-
uses: mitchcapper/action-download-artifact@e8fcde2d08c6684586e66d4fe22786fd61a6e1a8
68+
uses: mitchcapper/action-download-artifact@6aeaa1ddc66f3e526ea4e409313f8f93a3ed95cc
6869
if: ${{ steps.vars.outputs.Dep2Name && steps.cachecheck.outputs.cache-hit != 'true' }}
6970
with:
7071
name: ${{ steps.vars.outputs.Dep2Name }}
@@ -77,7 +78,7 @@ jobs:
7778
workflow: tool_${{ steps.vars.outputs.Dep2Name }}_build.yml
7879

7980
- name: Download Artifact ${{ steps.vars.outputs.Dep3Name }}
80-
uses: mitchcapper/action-download-artifact@e8fcde2d08c6684586e66d4fe22786fd61a6e1a8
81+
uses: mitchcapper/action-download-artifact@6aeaa1ddc66f3e526ea4e409313f8f93a3ed95cc
8182
if: ${{ steps.vars.outputs.Dep3Name && steps.cachecheck.outputs.cache-hit != 'true' }}
8283
with:
8384
name: ${{ steps.vars.outputs.Dep3Name }}
@@ -90,7 +91,7 @@ jobs:
9091
workflow: tool_${{ steps.vars.outputs.Dep3Name }}_build.yml
9192

9293
- name: Download Artifact ${{ steps.vars.outputs.Dep4Name }}
93-
uses: mitchcapper/action-download-artifact@e8fcde2d08c6684586e66d4fe22786fd61a6e1a8
94+
uses: mitchcapper/action-download-artifact@6aeaa1ddc66f3e526ea4e409313f8f93a3ed95cc
9495
if: ${{ steps.vars.outputs.Dep4Name && steps.cachecheck.outputs.cache-hit != 'true' }}
9596
with:
9697
name: ${{ steps.vars.outputs.Dep4Name }}
@@ -103,7 +104,7 @@ jobs:
103104
workflow: tool_${{ steps.vars.outputs.Dep4Name }}_build.yml
104105

105106
- name: Download Artifact ${{ steps.vars.outputs.Dep5Name }}
106-
uses: mitchcapper/action-download-artifact@e8fcde2d08c6684586e66d4fe22786fd61a6e1a8
107+
uses: mitchcapper/action-download-artifact@6aeaa1ddc66f3e526ea4e409313f8f93a3ed95cc
107108
if: ${{ steps.vars.outputs.Dep5Name && steps.cachecheck.outputs.cache-hit != 'true' }}
108109
with:
109110
name: ${{ steps.vars.outputs.Dep5Name }}
@@ -116,7 +117,7 @@ jobs:
116117
workflow: tool_${{ steps.vars.outputs.Dep5Name }}_build.yml
117118

118119
- name: Download Artifact ${{ steps.vars.outputs.Dep6Name }}
119-
uses: mitchcapper/action-download-artifact@e8fcde2d08c6684586e66d4fe22786fd61a6e1a8
120+
uses: mitchcapper/action-download-artifact@6aeaa1ddc66f3e526ea4e409313f8f93a3ed95cc
120121
if: ${{ steps.vars.outputs.Dep6Name && steps.cachecheck.outputs.cache-hit != 'true' }}
121122
with:
122123
name: ${{ steps.vars.outputs.Dep6Name }}
@@ -129,7 +130,7 @@ jobs:
129130
workflow: tool_${{ steps.vars.outputs.Dep6Name }}_build.yml
130131

131132
- name: Download Artifact ${{ steps.vars.outputs.Dep7Name }}
132-
uses: mitchcapper/action-download-artifact@e8fcde2d08c6684586e66d4fe22786fd61a6e1a8
133+
uses: mitchcapper/action-download-artifact@6aeaa1ddc66f3e526ea4e409313f8f93a3ed95cc
133134
if: ${{ steps.vars.outputs.Dep7Name && steps.cachecheck.outputs.cache-hit != 'true' }}
134135
with:
135136
name: ${{ steps.vars.outputs.Dep7Name }}
@@ -141,10 +142,19 @@ jobs:
141142
skip_unpack: true
142143
workflow: tool_${{ steps.vars.outputs.Dep7Name }}_build.yml
143144

145+
- name: Debug Folder List
146+
if: runner.debug
147+
run: |
148+
Get-ChildItem -Directory | ForEach-Object {
149+
$folderSize = (Get-ChildItem -Path $_.FullName -Recurse -File | Measure-Object -Property Length -Sum).Sum
150+
Write-Host "$($_.Name): $($folderSize/1MB) MB"
151+
}
152+
153+
144154
- name: Save Cache
145155
# make sure we have at least one item to cache
146156
if: ${{ steps.vars.outputs.Dep1Name && steps.cachecheck.outputs.cache-hit != 'true' }}
147-
uses: actions/cache/save@v3
157+
uses: actions/cache/save@v4
148158
with:
149159
path: |
150160
d:/artifacts

0 commit comments

Comments
 (0)