This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate CI build and validation scripts for different areas (#410)
* Separate building projects versions of the katas, Jupyter Notebooks validation and building projects that create, validate and pack binaries into separate CI jobs. * Include DumpMachine unit tests to the CI.
- release/v0.28.302812
- release/v0.28.291394
- release/v0.28.277227
- release/v0.28.263081
- release/v0.27.258160
- release/v0.27.253010
- release/v0.26.233415
- release/v0.25.228311
- release/v0.25.222597
- release/v0.24.210930
- release/v0.24.201332
- beta/v0.28.302656
- beta/v0.28.302312
- beta/v0.28.276173
- beta/v0.28.262328
- beta/v0.27.262190
- beta/v0.27.261851
- beta/v0.27.261334
- beta/v0.27.261157
- beta/v0.27.253876
- beta/v0.27.253009
- beta/v0.27.252319
- beta/v0.27.244706
- beta/v0.26.233414
- beta/v0.26.232395
- beta/v0.25.228310
- beta/v0.25.226892
- beta/v0.25.222596
- beta/v0.25.222455
- beta/v0.24.201994
- beta/v0.24.199223
- beta/v0.23.198514
Showing
7 changed files
with
147 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
#!/usr/bin/env pwsh | ||
|
||
& "$PSScriptRoot/set-env.ps1" | ||
|
||
@{ | ||
Packages = @( | ||
"Microsoft.Quantum.Katas" | ||
); | ||
Assemblies = @( | ||
"..\utilities\Common\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Katas.Common.dll", | ||
"..\utilities\Microsoft.Quantum.Katas\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Katas.dll" | ||
) | ForEach-Object { Get-Item (Join-Path $PSScriptRoot $_) }; | ||
} | Write-Output; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
steps: | ||
|
||
## | ||
# Pre-reqs | ||
## | ||
- task: UseDotNet@2 | ||
displayName: 'Use .NET Core SDK 3.1.201' | ||
inputs: | ||
packageType: sdk | ||
version: '3.1.201' | ||
|
||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '3.6' | ||
architecture: 'x64' | ||
displayName: 'Use Python 3.6' | ||
|
||
- script: pip install setuptools wheel pytest jupyter | ||
displayName: 'Install Python tools' | ||
|
||
- powershell: ./install-iqsharp.ps1 | ||
displayName: "Installing IQ#" | ||
workingDirectory: $(System.DefaultWorkingDirectory)/scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,33 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
$ErrorActionPreference = 'Stop' | ||
|
||
& "$PSScriptRoot/set-env.ps1" | ||
$all_ok = $True | ||
|
||
function Test-One { | ||
Param($project) | ||
|
||
& "$PSScriptRoot/validate-unicode.ps1" | ||
Write-Host "##[info]Testing $project" | ||
dotnet test $project ` | ||
-c $Env:BUILD_CONFIGURATION ` | ||
-v $Env:BUILD_VERBOSITY ` | ||
--no-build ` | ||
--logger trx ` | ||
/property:DefineConstants=$Env:ASSEMBLY_CONSTANTS ` | ||
/property:InformationalVersion=$Env:SEMVER_VERSION ` | ||
/property:Version=$Env:ASSEMBLY_VERSION | ||
|
||
# Validating all katas projects can be disables with the ENABLE_KATAS | ||
if ($Env:ENABLE_KATAS -ne "false") { | ||
& "$PSScriptRoot/validate-notebooks.ps1" | ||
} else { | ||
Write-Host "##vso[task.logissue type=warning;]Skipping testing Katas notebooks. Env:ENABLE_KATAS is '$Env:ENABLE_KATAS'." | ||
if ($LastExitCode -ne 0) { | ||
Write-Host "##vso[task.logissue type=error;]Failed to test $project" | ||
$script:all_ok = $False | ||
} | ||
} | ||
|
||
Write-Host "Testing Katas binaries:" | ||
|
||
Test-One '..\utilities\DumpUnitary\DumpUnitary.sln' | ||
Test-One '..\utilities\Microsoft.Quantum.Katas\Microsoft.Quantum.Katas.sln' | ||
|
||
if (-not $all_ok) { | ||
throw "At least one test failed execution. Check the logs." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
$ErrorActionPreference = 'Stop' | ||
|
||
& "$PSScriptRoot/set-env.ps1" | ||
|
||
|
||
function Build-One { | ||
param( | ||
$project | ||
); | ||
|
||
Write-Host "##[info]Building $project..." | ||
dotnet build $project ` | ||
-c $Env:BUILD_CONFIGURATION ` | ||
-v $Env:BUILD_VERBOSITY ` | ||
/property:DefineConstants=$Env:ASSEMBLY_CONSTANTS ` | ||
/property:Version=$Env:ASSEMBLY_VERSION ` | ||
/property:QsharpDocsOutDir=$Env:DOCS_OUTDIR | ||
|
||
$script:all_ok = ($LastExitCode -eq 0) -and $script:all_ok | ||
} | ||
|
||
# Build all Katas solutions: | ||
Get-ChildItem (Join-Path $PSScriptRoot '..') -Recurse -Include '*.sln' -Exclude 'Microsoft.Quantum.Katas.sln' ` | ||
| ForEach-Object { Build-One $_.FullName } |