Skip to content

Commit 1962f1c

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

File tree

4 files changed

+26
-17
lines changed

4 files changed

+26
-17
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: ${{ steps.vars.outputs.DepsCacheKey }}
114121

115122

116123
- name: MSBuild Setup

.github/workflows/restore_deps_to_cache.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,26 @@ jobs:
2323
run:
2424
shell: pwsh
2525
steps:
26-
- name: Check Existing Cache
27-
id: cachecheck
28-
uses: actions/cache/restore@v3
29-
with:
30-
path: |
31-
d:/artifacts
32-
key: ${{ inputs.BuildPkg }}-${{ inputs.RequiredDeps }}
33-
lookup-only: true
34-
26+
3527
- uses: actions/[email protected]
36-
if: steps.cachecheck.outputs.cache-hit != 'true'
3728
with:
3829
submodules: true
3930

40-
- name: Set Variables
31+
- name: Set DepCache Variables
4132
shell: powershell
4233
id: vars
43-
if: steps.cachecheck.outputs.cache-hit != 'true'
4434
env:
4535
DEPS: "${{ inputs.RequiredDeps }}"
4636
run: ${{ github.workspace }}\.github\set_dep_vars.ps1
37+
38+
- name: Check Existing Cache
39+
id: cachecheck
40+
uses: actions/cache/restore@v3
41+
with:
42+
path: |
43+
d:/artifacts
44+
key: ${{ steps.vars.outputs.DepsCacheKey }}
45+
lookup-only: true
4746

4847
- name: Download Artifact ${{ steps.vars.outputs.Dep1Name }}
4948
uses: mitchcapper/action-download-artifact@ce1b9a1572bf43f4e5e89568e74cb1f2299e6362
@@ -129,7 +128,7 @@ jobs:
129128
with:
130129
path: |
131130
d:/artifacts
132-
key: ${{ inputs.BuildPkg }}-${{ inputs.RequiredDeps }}
131+
key: ${{ steps.vars.outputs.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)