This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 181
Expand file tree
/
Copy pathbuild.ps1
More file actions
48 lines (36 loc) · 1.26 KB
/
build.ps1
File metadata and controls
48 lines (36 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
$ErrorActionPreference = 'Stop'
& "$PSScriptRoot/set-env.ps1"
$all_ok = $True
function Build-One {
param(
[string]$action,
[string]$project
);
dotnet $action (Join-Path $PSScriptRoot $project) `
-c $Env:BUILD_CONFIGURATION `
-v $Env:BUILD_VERBOSITY `
/property:DefineConstants=$Env:ASSEMBLY_CONSTANTS `
/property:Version=$Env:ASSEMBLY_VERSION `
/property:QsharpDocsOutputPath=$Env:DOCS_OUTDIR
if ($LastExitCode -ne 0) {
Write-Host "##vso[task.logissue type=error;]Failed to build $project."
$script:all_ok = $False
}
}
Write-Host "##[info]Build Standard library"
Build-One 'publish' '../Standard.sln'
Write-Host "##[info]Build Chemistry library"
Build-One 'publish' '../Chemistry.sln'
Write-Host "##[info]Build Numerics library"
Build-One 'publish' '../Numerics.sln'
Write-Host "##[info]Build QML library"
Build-One 'publish' '../MachineLearning.sln'
Write-Host "##[info]Build Jupyter magic library"
Build-One 'publish' '../Magic.sln'
Write-Host "##[info]Build QAOA library"
Build-One 'publish' '../Qaoa.sln'
if (-not $all_ok) {
throw "At least one test failed execution. Check the logs."
}