Skip to content

Commit 5236e73

Browse files
committed
Add assertion to build that bits are built in release configuration
I expect this to fail because unfortunately the bug is that our tests are invoked after the build, and not in release configuration, which means they build in debug configuration and overwrite the prior built bits, screwing everything up!
1 parent 9416a8a commit 5236e73

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.vsts-ci/templates/ci-general.yml

+12
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ steps:
4545
testResultsFiles: '**/*.trx'
4646
condition: succeededOrFailed()
4747

48+
- task: PowerShell@2
49+
displayName: Assert PowerShellEditorServices release configuration
50+
inputs:
51+
targetType: inline
52+
script: |
53+
$assembly = [Reflection.Assembly]::LoadFile("$(Build.BinariesDirectory)/module/PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll")
54+
if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) {
55+
Write-Host "##vso[task.LogIssue type=error;] PowerShell Editor Services bits were not built in release configuration!"
56+
exit 1
57+
}
58+
pwsh: ${{ parameters.pwsh }}
59+
4860
# NOTE: We zip the artifacts because they're ~20 MB compressed, but ~300 MB raw,
4961
# and we have limited pipeline artifact storage space.
5062
- task: ArchiveFiles@2

0 commit comments

Comments
 (0)