Skip to content

Commit 80e9faf

Browse files
committed
Further fix the dep cache to last a max of one day
1 parent 9ea521a commit 80e9faf

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

.github/set_dep_vars.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ Set-StrictMode -version latest;
22
$ErrorActionPreference = "Stop";
33
$VerbosePreference="Continue";
44

5+
$cacheKey=(date +'%m%d')
56
$arr=($env:DEPS).split()
67
$cnt=1
78
foreach ($dep in $arr) {
89
if ($dep){
910
echo "Dep$($cnt)Name=$dep" >> $env:GITHUB_OUTPUT
11+
$cacheKey+=$dep + "-"
1012
$cnt++
1113
}
12-
}
14+
}
15+
echo "DepsCacheKey=$cacheKey" >> $env:GITHUB_OUTPUT

.github/workflows/do_build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ jobs:
7676
- uses: actions/[email protected]
7777
with:
7878
submodules: true
79+
- name: Set DepCache Variables
80+
if: ${{ inputs.RequiredDeps != '' }}
81+
shell: powershell
82+
id: vars
83+
env:
84+
DEPS: "${{ inputs.RequiredDeps }}"
85+
run: ${{ github.workspace }}\.github\set_dep_vars.ps1
7986
- name: ENV Set
8087
run: |
8188
$dir=$env:GITHUB_WORKSPACE
@@ -110,7 +117,7 @@ jobs:
110117
with:
111118
path: |
112119
d:/artifacts
113-
key: ${{ inputs.BuildPkg }}
120+
key: ${{ env.DepsCacheKey }}
114121

115122

116123
- name: MSBuild Setup

.github/workflows/restore_deps_to_cache.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,27 @@ jobs:
2323
run:
2424
shell: pwsh
2525
steps:
26+
- name: Set DepCache Variables
27+
shell: powershell
28+
id: vars
29+
env:
30+
DEPS: "${{ inputs.RequiredDeps }}"
31+
run: ${{ github.workspace }}\.github\set_dep_vars.ps1
32+
2633
- name: Check Existing Cache
2734
id: cachecheck
2835
uses: actions/cache/restore@v3
2936
with:
3037
path: |
3138
d:/artifacts
32-
key: ${{ inputs.BuildPkg }}-${{ inputs.RequiredDeps }}
39+
key: ${{ env.DepsCacheKey }}
3340
lookup-only: true
3441

3542
- uses: actions/[email protected]
3643
if: steps.cachecheck.outputs.cache-hit != 'true'
3744
with:
3845
submodules: true
3946

40-
- name: Set Variables
41-
shell: powershell
42-
id: vars
43-
if: steps.cachecheck.outputs.cache-hit != 'true'
44-
env:
45-
DEPS: "${{ inputs.RequiredDeps }}"
46-
run: ${{ github.workspace }}\.github\set_dep_vars.ps1
47-
4847
- name: Download Artifact ${{ steps.vars.outputs.Dep1Name }}
4948
uses: mitchcapper/action-download-artifact@ce1b9a1572bf43f4e5e89568e74cb1f2299e6362
5049
if: ${{ steps.vars.outputs.Dep1Name && steps.cachecheck.outputs.cache-hit != 'true' }}
@@ -129,7 +128,7 @@ jobs:
129128
with:
130129
path: |
131130
d:/artifacts
132-
key: ${{ inputs.BuildPkg }}-${{ inputs.RequiredDeps }}
131+
key: ${{ env.DepsCacheKey }}
133132
# - name: Debug Session
134133
# if: ${{ failure() }}
135134
# run: D:/a/docs/docs/.github/debug_ssh_start.ps1

build/f_wget2_build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ fi
7777
if [[ -z $SKIP_STEP || $SKIP_STEP == "bootstrap" ]]; then
7878
gnulib_ensure_buildaux_scripts_copied;
7979
setup_gnulibtool_py_autoconfwrapper #needed for generated .mk/.ac files but if just stock then the below line likely works
80-
libtool_fixes "build-aux/ltmain.sh" "m4/libtool.m4"
8180
./bootstrap --no-bootstrap-sync --no-git --gnulib-srcdir=gnulib --skip-po
81+
libtool_fixes "build-aux/ltmain.sh" "m4/libtool.m4"
82+
autoreconf --symlink --verbose
8283
SKIP_STEP=""
8384
fi
8485
fi
8586
if [[ $SKIP_STEP == "autoconf" ]]; then #not empty allowed as if we bootstrapped above we dont need to run nautoconf
8687
autoreconf --symlink --verbose --install
87-
libtool_fixes "build-aux/ltmain.sh" "m4/libtool.m4"
8888
autoreconf --verbose #update for libtool fixes
8989
gnulib_ensure_buildaux_scripts_copied;
9090
SKIP_STEP="" #to do all the other steps

0 commit comments

Comments
 (0)