@@ -2,12 +2,6 @@ name: Setup build
2
2
description : Sets up the build environment for the current job
3
3
4
4
inputs :
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
11
5
windows-sdk-version :
12
6
description : The Windows SDK version to use, e.g. "10.0.22621.0"
13
7
required : false
@@ -147,13 +141,12 @@ runs:
147
141
"--add", "Microsoft.VisualStudio.Component.Windows11SDK.${WinSdkVersionBuild}"
148
142
$process.WaitForExit()
149
143
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
-
153
144
if (Test-Path -Path $Win10SdkIncludeVersion -PathType Container) {
154
145
Write-Output "ℹ️ Windows SDK ${WinSdkVersionString} installed successfully."
155
146
} else {
156
147
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
157
150
exit 1
158
151
}
159
152
}
@@ -181,7 +174,7 @@ runs:
181
174
if : always() && steps.setup-windows-sdk.outputs.log-file != ''
182
175
uses : actions/upload-artifact@v4
183
176
with :
184
- name : ${{ inputs.upload-prefix }}-windows-sdk-installer-log
177
+ name : ${{ github.job }}-windows-sdk-installer-log
185
178
path : ${{ steps.setup-windows-sdk.outputs.log-file }}
186
179
187
180
- name : Install Windows MSVC version ${{ inputs.msvc-version }}
@@ -226,9 +219,6 @@ runs:
226
219
"--add", "Microsoft.VisualStudio.Component.VC.${MSVCPackageVersion}.ATL.ARM64"
227
220
$process.WaitForExit()
228
221
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
-
232
222
# Check if the MSVC version was installed successfully.
233
223
$MSVCBuildToolsVersion = ""
234
224
foreach ($dir in Get-ChildItem -Path $MSVCDir -Directory) {
@@ -242,6 +232,8 @@ runs:
242
232
243
233
if ($MSVCBuildToolsVersion -eq "") {
244
234
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
245
237
exit 1
246
238
} else {
247
239
Write-Output "ℹ️ MSVC ${MSVCBuildToolsVersion} installed successfully."
@@ -252,7 +244,7 @@ runs:
252
244
if : always() && steps.setup-msvc.outputs.log-file != ''
253
245
uses : actions/upload-artifact@v4
254
246
with :
255
- name : ${{ inputs.upload-prefix }}-msvc-installer-log
247
+ name : ${{ github.job }}-msvc-installer-log
256
248
path : ${{ steps.setup-msvc.outputs.log-file }}
257
249
258
250
- name : Setup Visual Studio Developer Environment
0 commit comments