Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 49 additions & 32 deletions build/manifest.ps1
Original file line number Diff line number Diff line change
@@ -1,48 +1,65 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

#!/usr/bin/env pwsh
#Requires -PSEdition Core
<#
.SYNOPSIS
Provides the list of artifacts (Packages and Assemblies) generated by this repository.

.PARAMETER OutputFormat
Specifies if the output of this script should be a hashtable with the artifacts
as strings with the absolute path (AbsolutePath) or FileInfo structures.
#>
param(
[ValidateSet('FileInfo', 'AbsolutePath')]
[string] $OutputFormat = 'FileInfo'
);

& "$PSScriptRoot\set-env.ps1"

& "$PSScriptRoot/set-env.ps1"

if ($Env:ENABLE_VSIX -ne "false") {
# The language server is only built if either the VS2019 or VS Code extension
# is enabled.
$VsixAssemblies = @(
"./src/QsCompiler/LanguageServer/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/Microsoft.Quantum.QsCompilationManager.dll",
"./src/QsCompiler/LanguageServer/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/Microsoft.Quantum.QsCore.dll",
"./src/QsCompiler/LanguageServer/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/Microsoft.Quantum.QsDataStructures.dll",
"./src/QsCompiler/LanguageServer/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/Microsoft.Quantum.QsLanguageServer.dll",
"./src/QsCompiler/LanguageServer/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/Microsoft.Quantum.QsSyntaxProcessor.dll",
"./src/QsCompiler/LanguageServer/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/Microsoft.Quantum.QsTextProcessor.dll",
"./src/QsCompiler/LanguageServer/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/Microsoft.Quantum.QsTransformations.dll"
);

# The VS2019 extension itself is only built if msbuild is present.
if (Get-Command msbuild -ErrorAction SilentlyContinue) {
$VsixAssemblies += @(
"./src/VisualStudioExtension/QsharpVSIX/bin/$Env:BUILD_CONFIGURATION/Microsoft.Quantum.VisualStudio.Extension.dll"
);
}
} else {
$VsixAssemblies = @();
".\src\QsCompiler\LanguageServer\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\Microsoft.Quantum.QsLanguageServer.dll",
".\src\VisualStudioExtension\QsharpVSIX\bin\$Env:BUILD_CONFIGURATION\Microsoft.Quantum.VisualStudio.Extension.dll"
);
}
else {
$VsixAssemblies = @();
}


@{
$artifacts = @{
Packages = @(
"Microsoft.Quantum.Compiler",
"Microsoft.Quantum.Compiler.CommandLine",
"Microsoft.Quantum.DocumentationGenerator"
"Microsoft.Quantum.ProjectTemplates",
"Microsoft.Quantum.Sdk",
"Microsoft.Quantum.DocumentationGenerator"
);
"qsc"
) | ForEach-Object { Join-Path $Env:NUGET_OUTDIR "$_.$Env:NUGET_VERSION.nupkg" };

Assemblies = $VsixAssemblies + @(
"./src/Documentation/DocumentationGenerator/bin/$Env:BUILD_CONFIGURATION/netstandard2.1/Microsoft.Quantum.DocumentationGenerator.dll",
"./src/QsCompiler/CommandLineTool/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/Microsoft.Quantum.QsCompiler.dll",
"./src/QsCompiler/CommandLineTool/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/Microsoft.Quantum.QsDocumentationParser.dll",
"./src/QsCompiler/CommandLineTool/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/qsc.dll",
"./src/QuantumSdk/Tools/BuildConfiguration/bin/$Env:BUILD_CONFIGURATION/netcoreapp3.1/publish/Microsoft.Quantum.Sdk.BuildConfiguration.dll"
) | ForEach-Object { Get-Item (Join-Path $PSScriptRoot ".." $_) };
} | Write-Output;
".\src\Documentation\DocumentationGenerator\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.DocumentationGenerator.dll",

".\src\QsCompiler\Compiler\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QsCompilationManager.dll",
".\src\QsCompiler\Compiler\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QsCompiler.dll",
".\src\QsCompiler\Compiler\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QsCore.dll",
".\src\QsCompiler\Compiler\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QsDataStructures.dll",
".\src\QsCompiler\Compiler\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QsDocumentationParser.dll",
".\src\QsCompiler\Compiler\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QsOptimizations.dll",
".\src\QsCompiler\Compiler\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QsSyntaxProcessor.dll",
".\src\QsCompiler\Compiler\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QsTextProcessor.dll",
".\src\QsCompiler\Compiler\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QsTransformations.dll"

".\src\QsCompiler\CommandLineTool\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\qsc.dll",

".\src\QuantumSdk\Tools\BuildConfiguration\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\Microsoft.Quantum.Sdk.BuildConfiguration.dll"
) | ForEach-Object { Join-Path $PSScriptRoot (Join-Path ".." $_) };
}

if ($OutputFormat -eq 'FileInfo') {
$artifacts.Packages = $artifacts.Packages | ForEach-Object { Get-Item $_ };
$artifacts.Assemblies = $artifacts.Assemblies | ForEach-Object { Get-Item $_ };
}

$artifacts | Write-Output;
3 changes: 0 additions & 3 deletions build/pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,6 @@ if ("$Env:DOCS_OUTDIR".Trim() -ne "") {
Pop-Location
}

Write-Host "##[info]Verifying manifest..."
& (Join-Path $PSScriptRoot "manifest.ps1")

if (-not $all_ok) {
throw "Packing failed. Check the logs."
exit 1
Expand Down
5 changes: 4 additions & 1 deletion build/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ steps:
workingDirectory: $(System.DefaultWorkingDirectory)/build



##
# VisualStudio Extension can't be built from the build script as msbuild is not available).
##
Expand All @@ -32,5 +31,9 @@ steps:
configuration: $(Build.Configuration)


- pwsh: ./manifest.ps1
displayName: "List built packages & assemblies"
workingDirectory: '$(System.DefaultWorkingDirectory)/build'
condition: succeededOrFailed()

- template: wrap-up.yml