diff --git a/.github/set_dep_vars.ps1 b/.github/set_dep_vars.ps1 index 892c94b..33f0985 100644 --- a/.github/set_dep_vars.ps1 +++ b/.github/set_dep_vars.ps1 @@ -2,7 +2,7 @@ Set-StrictMode -version latest; $ErrorActionPreference = "Stop"; $VerbosePreference="Continue"; -$cacheKey=(date +'%m%d') +$cacheKey= $env:Configuration + (date +'%m%d') $arr=($env:DEPS).split() $cnt=1 foreach ($dep in $arr) { @@ -12,4 +12,12 @@ foreach ($dep in $arr) { $cnt++ } } -echo "DepsCacheKey=$cacheKey" >> $env:GITHUB_OUTPUT \ No newline at end of file +$failAction="fail" +$postfix="" +if ($env:Configuration -eq "Debug") { + $failAction="ignore" + $postfix="-Debug" +} +echo "DepsCacheKey=$cacheKey" >> $env:GITHUB_OUTPUT +echo "DepsFailAction=$failAction" >> $env:GITHUB_OUTPUT +echo "DepsPostfix=$postfix" >> $env:GITHUB_OUTPUT \ No newline at end of file diff --git a/.github/workflows/do_build.yml b/.github/workflows/do_build.yml index 2c768a9..00293a2 100644 --- a/.github/workflows/do_build.yml +++ b/.github/workflows/do_build.yml @@ -46,9 +46,6 @@ jobs: strategy: fail-fast: false matrix: - #BuildPkg: [patch] - #BuildPkg: [grep] -# BuildPkg: [which,patch,zstd,pcre2,gzip,tar,zlib,findutils,libpsl,coreutils,grep] BaseImage: [windows-latest] Configuration: [Debug, Release] #right now the deps downloader always downloads release versions, we could use our debug libs for debug builds SkipDebugBuild: @@ -93,24 +90,6 @@ jobs: echo "BLD_CONFIG_BUILD_DEBUG=1" >> $env:GITHUB_ENV } -# - uses: actions/setup-dotnet@v3.0.3 -# with: -# dotnet-version: ${{env.CI_REQ_DOTNET_SDK_VER}} - - - -#previously we built all in one workflow now with them as individual workflows we download differently - - # - name: Download Required Artifacts - # uses: mitchcapper/action-download-artifact@c026c9be4097d153332e6cd0974d140ba22cd6cc - # if: ${{ inputs.RequiredDeps != '' && inputs.BuildPkg != 'script' }} - # with: - # name: ${{ inputs.RequiredDeps }} - # path: d:/artifacts - # name_prefix: WLB- - # run_id: ${{ github.run_id }} - # workflow_conclusion: "success" - - name: Restore Existing Dep Cache if: ${{ inputs.RequiredDeps != '' && inputs.BuildPkg != 'script' }} uses: actions/cache/restore@v3 diff --git a/.github/workflows/restore_deps_to_cache.yml b/.github/workflows/restore_deps_to_cache.yml index 646c21f..6ce0108 100644 --- a/.github/workflows/restore_deps_to_cache.yml +++ b/.github/workflows/restore_deps_to_cache.yml @@ -16,6 +16,11 @@ on: jobs: build: + strategy: + fail-fast: false + matrix: + Configuration: [Debug, Release] + name: DEP Download runs-on: windows-2022 environment: main @@ -33,6 +38,7 @@ jobs: id: vars env: DEPS: "${{ inputs.RequiredDeps }}" + Configuration: "${{ matrix.Configuration }}" run: ${{ github.workspace }}\.github\set_dep_vars.ps1 - name: Check Existing Cache @@ -51,6 +57,8 @@ jobs: name: ${{ steps.vars.outputs.Dep1Name }} path: d:/artifacts name_prefix: WLB- + name_postfix: ${{ steps.vars.outputs.DepsPostfix }} + if_no_artifact_found: ${{ steps.vars.outputs.DepsFailAction }} workflow_conclusion: "success" skip_unpack: true workflow: tool_${{ steps.vars.outputs.Dep1Name }}_build.yml @@ -63,6 +71,8 @@ jobs: path: d:/artifacts name_prefix: WLB- workflow_conclusion: "success" + name_postfix: ${{ steps.vars.outputs.DepsPostfix }} + if_no_artifact_found: ${{ steps.vars.outputs.DepsFailAction }} skip_unpack: true workflow: tool_${{ steps.vars.outputs.Dep2Name }}_build.yml @@ -73,6 +83,8 @@ jobs: name: ${{ steps.vars.outputs.Dep3Name }} path: d:/artifacts name_prefix: WLB- + name_postfix: ${{ steps.vars.outputs.DepsPostfix }} + if_no_artifact_found: ${{ steps.vars.outputs.DepsFailAction }} workflow_conclusion: "success" skip_unpack: true workflow: tool_${{ steps.vars.outputs.Dep3Name }}_build.yml @@ -84,6 +96,8 @@ jobs: name: ${{ steps.vars.outputs.Dep4Name }} path: d:/artifacts name_prefix: WLB- + name_postfix: ${{ steps.vars.outputs.DepsPostfix }} + if_no_artifact_found: ${{ steps.vars.outputs.DepsFailAction }} workflow_conclusion: "success" skip_unpack: true workflow: tool_${{ steps.vars.outputs.Dep4Name }}_build.yml @@ -95,6 +109,8 @@ jobs: name: ${{ steps.vars.outputs.Dep5Name }} path: d:/artifacts name_prefix: WLB- + name_postfix: ${{ steps.vars.outputs.DepsPostfix }} + if_no_artifact_found: ${{ steps.vars.outputs.DepsFailAction }} workflow_conclusion: "success" skip_unpack: true workflow: tool_${{ steps.vars.outputs.Dep5Name }}_build.yml @@ -106,6 +122,8 @@ jobs: name: ${{ steps.vars.outputs.Dep6Name }} path: d:/artifacts name_prefix: WLB- + name_postfix: ${{ steps.vars.outputs.DepsPostfix }} + if_no_artifact_found: ${{ steps.vars.outputs.DepsFailAction }} workflow_conclusion: "success" skip_unpack: true workflow: tool_${{ steps.vars.outputs.Dep6Name }}_build.yml @@ -117,6 +135,8 @@ jobs: name: ${{ steps.vars.outputs.Dep7Name }} path: d:/artifacts name_prefix: WLB- + name_postfix: ${{ steps.vars.outputs.DepsPostfix }} + if_no_artifact_found: ${{ steps.vars.outputs.DepsFailAction }} workflow_conclusion: "success" skip_unpack: true workflow: tool_${{ steps.vars.outputs.Dep7Name }}_build.yml