diff --git a/.github/set_dep_vars.ps1 b/.github/set_dep_vars.ps1 index ed85d72..892c94b 100644 --- a/.github/set_dep_vars.ps1 +++ b/.github/set_dep_vars.ps1 @@ -2,11 +2,14 @@ Set-StrictMode -version latest; $ErrorActionPreference = "Stop"; $VerbosePreference="Continue"; +$cacheKey=(date +'%m%d') $arr=($env:DEPS).split() $cnt=1 foreach ($dep in $arr) { if ($dep){ echo "Dep$($cnt)Name=$dep" >> $env:GITHUB_OUTPUT + $cacheKey+=$dep + "-" $cnt++ } -} \ No newline at end of file +} +echo "DepsCacheKey=$cacheKey" >> $env:GITHUB_OUTPUT \ No newline at end of file diff --git a/.github/workflows/do_build.yml b/.github/workflows/do_build.yml index ef106e6..2c768a9 100644 --- a/.github/workflows/do_build.yml +++ b/.github/workflows/do_build.yml @@ -76,6 +76,13 @@ jobs: - uses: actions/checkout@v3.1.0 with: submodules: true + - name: Set DepCache Variables + if: ${{ inputs.RequiredDeps != '' }} + shell: powershell + id: vars + env: + DEPS: "${{ inputs.RequiredDeps }}" + run: ${{ github.workspace }}\.github\set_dep_vars.ps1 - name: ENV Set run: | $dir=$env:GITHUB_WORKSPACE @@ -110,7 +117,7 @@ jobs: with: path: | d:/artifacts - key: ${{ inputs.BuildPkg }} + key: ${{ steps.vars.outputs.DepsCacheKey }} - name: MSBuild Setup diff --git a/.github/workflows/restore_deps_to_cache.yml b/.github/workflows/restore_deps_to_cache.yml index 8f1e138..646c21f 100644 --- a/.github/workflows/restore_deps_to_cache.yml +++ b/.github/workflows/restore_deps_to_cache.yml @@ -23,27 +23,26 @@ jobs: run: shell: pwsh steps: - - name: Check Existing Cache - id: cachecheck - uses: actions/cache/restore@v3 - with: - path: | - d:/artifacts - key: ${{ inputs.BuildPkg }}-${{ inputs.RequiredDeps }} - lookup-only: true - + - uses: actions/checkout@v3.1.0 - if: steps.cachecheck.outputs.cache-hit != 'true' with: submodules: true - - name: Set Variables + - name: Set DepCache Variables shell: powershell id: vars - if: steps.cachecheck.outputs.cache-hit != 'true' env: DEPS: "${{ inputs.RequiredDeps }}" run: ${{ github.workspace }}\.github\set_dep_vars.ps1 + + - name: Check Existing Cache + id: cachecheck + uses: actions/cache/restore@v3 + with: + path: | + d:/artifacts + key: ${{ steps.vars.outputs.DepsCacheKey }} + lookup-only: true - name: Download Artifact ${{ steps.vars.outputs.Dep1Name }} uses: mitchcapper/action-download-artifact@ce1b9a1572bf43f4e5e89568e74cb1f2299e6362 @@ -129,7 +128,7 @@ jobs: with: path: | d:/artifacts - key: ${{ inputs.BuildPkg }}-${{ inputs.RequiredDeps }} + key: ${{ steps.vars.outputs.DepsCacheKey }} # - name: Debug Session # if: ${{ failure() }} # run: D:/a/docs/docs/.github/debug_ssh_start.ps1 diff --git a/build/f_wget2_build.sh b/build/f_wget2_build.sh index 6fe2a4b..11fdfd5 100644 --- a/build/f_wget2_build.sh +++ b/build/f_wget2_build.sh @@ -77,14 +77,14 @@ fi if [[ -z $SKIP_STEP || $SKIP_STEP == "bootstrap" ]]; then gnulib_ensure_buildaux_scripts_copied; setup_gnulibtool_py_autoconfwrapper #needed for generated .mk/.ac files but if just stock then the below line likely works - libtool_fixes "build-aux/ltmain.sh" "m4/libtool.m4" ./bootstrap --no-bootstrap-sync --no-git --gnulib-srcdir=gnulib --skip-po + libtool_fixes "build-aux/ltmain.sh" "m4/libtool.m4" + autoreconf --symlink --verbose SKIP_STEP="" fi fi if [[ $SKIP_STEP == "autoconf" ]]; then #not empty allowed as if we bootstrapped above we dont need to run nautoconf autoreconf --symlink --verbose --install - libtool_fixes "build-aux/ltmain.sh" "m4/libtool.m4" autoreconf --verbose #update for libtool fixes gnulib_ensure_buildaux_scripts_copied; SKIP_STEP="" #to do all the other steps