Skip to content

Commit

Permalink
Separate Debug and Release deps as required for proper builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchcapper committed Dec 8, 2024
1 parent 1962f1c commit 53e104c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
12 changes: 10 additions & 2 deletions .github/set_dep_vars.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -12,4 +12,12 @@ foreach ($dep in $arr) {
$cnt++
}
}
echo "DepsCacheKey=$cacheKey" >> $env:GITHUB_OUTPUT
$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
21 changes: 0 additions & 21 deletions .github/workflows/do_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -93,24 +90,6 @@ jobs:
echo "BLD_CONFIG_BUILD_DEBUG=1" >> $env:GITHUB_ENV
}
# - uses: actions/[email protected]
# 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
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/restore_deps_to_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ on:

jobs:
build:
strategy:
fail-fast: false
matrix:
Configuration: [Debug, Release]

name: DEP Download
runs-on: windows-2022
environment: main
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 53e104c

Please sign in to comment.