Skip to content
Open
Changes from 16 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
35 changes: 35 additions & 0 deletions .github/workflows/build-and-test-callable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ on:
required: false
default: ''
type: string
run_dxdiag:
description: "Run dxdiag"
required: false
default: false
type: boolean
workflow_call:
inputs:
OffloadTest-branch:
Expand Down Expand Up @@ -100,13 +105,43 @@ on:
required: false
default: ''
type: string
run_dxdiag:
description: "Run dxdiag"
required: false
default: false
type: boolean
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to just run this all the time? Seems that we'd want to grab the dxdiag output when we see a test run has failed and so it'd be nice if that was always available with the rest of the results.


jobs:
build:
permissions:
checks: write
runs-on: [self-hosted, "hlsl-${{ inputs.SKU }}"]
steps:
- name: Run dxdiag (Windows only)
if: inputs.OS == 'windows' && inputs.run_dxdiag
shell: powershell
run: |
$fileName = "dxdiag-${{ inputs.SKU }}.txt"
$output = Join-Path $env:RUNNER_TEMP $fileName
dxdiag /t $output
Write-Host "DxDiag report saved to $output"
- name: Check if dxdiag report exists
id: check_dxdiag
if: inputs.OS == 'windows' && inputs.run_dxdiag
shell: powershell
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this has to be a separate step?

I'm wondering if you ended up doing this to work around dxdiag running asynchronously, which means that the "DxDiag report saved to $output" message gets printed before the output is actually? In which case this would only happen to work by luck and sometimes you'd not get output at all.

If you run dxdiag like this in powershell:

dxdiag /t $output | Out-Null

Then that command will only complete once the file has been written, and so you can safely assume it is there.

run: |
$filePath = Join-Path $env:RUNNER_TEMP "dxdiag-${{ inputs.SKU }}.txt"
if (Test-Path $filePath) {
echo "exists=true" >> $env:GITHUB_OUTPUT
} else {
echo "exists=false" >> $env:GITHUB_OUTPUT
}
- name: Upload dxdiag artifact
if: inputs.OS == 'windows' && inputs.run_dxdiag && steps.check_dxdiag.outputs.exists == 'true'
uses: actions/upload-artifact@v4
with:
name: dxdiag-${{ inputs.SKU }}
path: ${{ runner.temp }}/dxdiag-${{ inputs.SKU }}.txt
- name: Checkout DXC
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
Expand Down
Loading