diff --git a/.vsts-ci/templates/ci-general.yml b/.vsts-ci/templates/ci-general.yml index aec2aee4e..33d09a746 100644 --- a/.vsts-ci/templates/ci-general.yml +++ b/.vsts-ci/templates/ci-general.yml @@ -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 @@ -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