Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,33 @@ jobs:
dotnet restore .\ControlApp\
dotnet restore .\ipctest\

# DMF output is fully determined by the submodule commit and the runner toolchain.
# Skip the build entirely on a cache hit (x86 never builds DMF). No restore-keys: a
# partial match must never reuse libs built for a different commit or image.
- name: 'Resolve DMF submodule commit'
if: matrix.platform != 'x86'
id: dmf-sha
shell: pwsh
run: |
# ImageVersion is a runner process env var, not an Actions `env:` context value,
# so capture it here for the cache key (invalidates on toolchain image upgrades).
$sha = git rev-parse HEAD:DMF
$imageVersion = $env:ImageVersion
echo "sha=$sha" >> $env:GITHUB_OUTPUT
echo "image-version=$imageVersion" >> $env:GITHUB_OUTPUT
Write-Output "DMF submodule commit $sha (ImageVersion=$imageVersion)"

- name: 'Cache DMF libraries'
if: matrix.platform != 'x86'
id: dmf-cache
uses: actions/cache@v4
with:
path: DMF/Release/${{ matrix.platform }}
key: dmf-v1-${{ matrix.platform }}-${{ steps.dmf-sha.outputs.sha }}-${{ steps.dmf-sha.outputs.image-version }}

- name: 'Build'
shell: cmd
run: .\build.cmd --target-platform ${{ matrix.platform }}
run: .\build.cmd --target-platform ${{ matrix.platform }} ${{ steps.dmf-cache.outputs.cache-hit == 'true' && '--skip BuildDmf' || '' }}

- name: 'Publish ControlApp'
if: matrix.platform == 'x64'
Expand Down
7 changes: 5 additions & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,13 @@ void InvokeSignTool(string arguments)

foreach ((Configuration config, MSBuildTargetPlatform platform) in buildCombinations)
{
Log.Information("Building DMF {Configuration} | {Platform}", config, platform);
// dshidmini is UMDF and links only DmfU.lib; skip the kernel-mode half of Dmf.sln.
// MSBuild resolves "DmfU" as a solution-level target and pulls in its dependencies
// (DmfUFramework, DmfUModules.Library, DmfUModules.Template, DmfUModules.Library.Tests).
Log.Information("Building DMF DmfU {Configuration} | {Platform}", config, platform);
MSBuildTasks.MSBuild(s => s
.SetTargetPath(DmfSolution)
.SetTargets("Build")
.SetTargets("DmfU")
.SetConfiguration(config)
.SetTargetPlatform(platform)
.SetMaxCpuCount(Environment.ProcessorCount)
Expand Down
Loading