This repository was archived by the owner on Jan 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/Simulation/qdk_sim_rs Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,26 @@ $IsCI = "$Env:TF_BUILD" -ne "" -or "$Env:CI" -eq "true";
44$script :allOk = $true ;
55
66Push-Location $PSScriptRoot
7+ # Import ConvertFrom-Toml and ConvertTo-Toml, used for setting versions and
8+ # crate types. Note that because a workspace file is used, Cargo.toml must
9+ # exist in this directory before any call to cargo run. We copy over the
10+ # template unmodified to handle that limitation.
11+ Copy-Item Cargo.toml.template Cargo.toml
12+
13+ # We can now import TOML handling implemented in the t2j crate.
14+ # TODO @cgranade: Consider moving to use objconv instead to decouple
15+ # dependencies here.
16+ . (Join-Path $PSScriptRoot " .." " .." " .." " build" " t2j" " t2j.ps1" );
17+ Write-Host - ForegroundColor Blue " ##[info]Successfully loaded t2j: $ ( Invoke-T2J -- version) "
18+
19+ # Now that we have prereqs, set the crate version and make sure we're using
20+ # rlib dependencies for Rust testing.
21+ $cargoManifest = ConvertFrom-Toml - Path " ./Cargo.toml.template" ;
22+ $cargoManifest | Format-List | Out-String | Write-Host ;
23+ $cargoManifest.package.version = $Env: NUGET_VERSION ;
24+ $cargoManifest.lib ." crate-type" = @ (" rlib" );
25+ ConvertTo-Toml - InputObject $cargoManifest - Path " ./Cargo.toml" ;
26+
727 # If running in CI, use cargo2junit to expose unit tests to the
828 # PublishTestResults task.
929 if ($IsCI ) {
You can’t perform that action at this time.
0 commit comments