Skip to content

Commit

Permalink
Merge pull request #1933 from PowerShell/andschwa/fix-release-build
Browse files Browse the repository at this point in the history
Add assertion to build that bits are built in release configuration and invoke tests in release configuration. Resolves PowerShell/vscode-powershell#4218 by (correctly and how it was expected in the first place) preventing the developer option to wait for debugger to be in the binary.
  • Loading branch information
andyleejordan committed Oct 21, 2022
2 parents 9416a8a + 5d64238 commit d945e84
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .vsts-ci/templates/ci-general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ steps:
displayName: Test
inputs:
targetType: inline
script: Invoke-Build Test
script: Invoke-Build Test -Configuration Release
pwsh: ${{ parameters.pwsh }}

- task: PublishTestResults@2
Expand All @@ -45,6 +45,18 @@ steps:
testResultsFiles: '**/*.trx'
condition: succeededOrFailed()

- task: PowerShell@2
displayName: Assert PowerShellEditorServices release configuration
inputs:
targetType: inline
script: |
$assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/module/PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll")
if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) {
Write-Host "##vso[task.LogIssue type=error;] PowerShell Editor Services bits were not built in release configuration!"
exit 1
}
pwsh: ${{ parameters.pwsh }}

# NOTE: We zip the artifacts because they're ~20 MB compressed, but ~300 MB raw,
# and we have limited pipeline artifact storage space.
- task: ArchiveFiles@2
Expand Down

0 comments on commit d945e84

Please sign in to comment.