@@ -2,12 +2,6 @@ name: Setup build
22description : Sets up the build environment for the current job
33
44inputs :
5- upload-prefix :
6- description : |
7- The prefix to use for the uploaded artifacts. This is used to distinguish
8- between different matrix jobs in the same workflow.
9- required : true
10- type : string
115 windows-sdk-version :
126 description : The Windows SDK version to use, e.g. "10.0.22621.0"
137 required : false
@@ -147,13 +141,12 @@ runs:
147141 "--add", "Microsoft.VisualStudio.Component.Windows11SDK.${WinSdkVersionBuild}"
148142 $process.WaitForExit()
149143
150- $LogFile = Get-ChildItem "${env:TEMP}" -Filter "dd_installer_*.log" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
151- "log-file=$($LogFile.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
152-
153144 if (Test-Path -Path $Win10SdkIncludeVersion -PathType Container) {
154145 Write-Output "ℹ️ Windows SDK ${WinSdkVersionString} installed successfully."
155146 } else {
156147 Write-Output "::error::Failed to install Windows SDK ${WinSdkVersionString}. Check the installer log for details."
148+ $LogFile = Get-ChildItem "${env:TEMP}" -Filter "dd_installer_*.log" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
149+ "log-file=$($LogFile.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
157150 exit 1
158151 }
159152 }
@@ -181,7 +174,7 @@ runs:
181174 if : always() && steps.setup-windows-sdk.outputs.log-file != ''
182175 uses : actions/upload-artifact@v4
183176 with :
184- name : ${{ inputs.upload-prefix }}-windows-sdk-installer-log
177+ name : ${{ github.job }}-windows-sdk-installer-log
185178 path : ${{ steps.setup-windows-sdk.outputs.log-file }}
186179
187180 - name : Install Windows MSVC version ${{ inputs.msvc-version }}
@@ -226,9 +219,6 @@ runs:
226219 "--add", "Microsoft.VisualStudio.Component.VC.${MSVCPackageVersion}.ATL.ARM64"
227220 $process.WaitForExit()
228221
229- $LogFile = Get-ChildItem "${env:TEMP}" -Filter "dd_installer_*.log" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
230- "log-file=$($LogFile.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
231-
232222 # Check if the MSVC version was installed successfully.
233223 $MSVCBuildToolsVersion = ""
234224 foreach ($dir in Get-ChildItem -Path $MSVCDir -Directory) {
@@ -242,6 +232,8 @@ runs:
242232
243233 if ($MSVCBuildToolsVersion -eq "") {
244234 Write-Output "::error::Failed to install MSVC ${MSVCVersionString}. Check the installer log for details."
235+ $LogFile = Get-ChildItem "${env:TEMP}" -Filter "dd_installer_*.log" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
236+ "log-file=$($LogFile.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
245237 exit 1
246238 } else {
247239 Write-Output "ℹ️ MSVC ${MSVCBuildToolsVersion} installed successfully."
@@ -252,7 +244,7 @@ runs:
252244 if : always() && steps.setup-msvc.outputs.log-file != ''
253245 uses : actions/upload-artifact@v4
254246 with :
255- name : ${{ inputs.upload-prefix }}-msvc-installer-log
247+ name : ${{ github.job }}-msvc-installer-log
256248 path : ${{ steps.setup-msvc.outputs.log-file }}
257249
258250 - name : Setup Visual Studio Developer Environment
0 commit comments