diff --git a/.pipelines/DSC-Official.yml b/.pipelines/DSC-Official.yml index 48527d90a..9b511c490 100644 --- a/.pipelines/DSC-Official.yml +++ b/.pipelines/DSC-Official.yml @@ -31,6 +31,8 @@ variables: value: ${{ parameters.OfficialBuild }} - name: PublishToStore value: ${{ parameters.PublishToStore }} + - name: RustVersion + value: ms-prod-1.95 resources: repositories: @@ -114,6 +116,7 @@ extends: signSrcPath: '$(signSrcPath)' PackageRoot: '$(PackageRoot)' rustSDK: '$(Rust.SDK)' + rustVersion: ${{ variables.RustVersion }} - job: BuildWin_arm64 dependsOn: SetPackageVersion @@ -134,7 +137,7 @@ extends: signSrcPath: '$(signSrcPath)' PackageRoot: '$(PackageRoot)' rustSDK: '$(Rust.SDK)' - + rustVersion: ${{ variables.RustVersion }} - job: CreateMsixBundle dependsOn: - BuildWin_x64 @@ -283,7 +286,7 @@ extends: steps: - task: RustInstaller@1 inputs: - rustVersion: ms-prod-1.93 + rustVersion: ${{ variables.RustVersion }} toolchainFeed: $(Rust.SDK) additionalTargets: x86_64-unknown-linux-musl displayName: Install Rust @@ -317,7 +320,7 @@ extends: steps: - task: RustInstaller@1 inputs: - rustVersion: ms-prod-1.93 + rustVersion: ${{ variables.RustVersion }} toolchainFeed: $(Rust.SDK) additionalTargets: aarch64-unknown-linux-musl displayName: Install Rust @@ -375,7 +378,7 @@ extends: steps: - task: RustInstaller@1 inputs: - rustVersion: ms-prod-1.93 + rustVersion: ${{ variables.RustVersion }} toolchainFeed: $(Rust.SDK) additionalTargets: $(buildName) displayName: Install Rust diff --git a/.pipelines/DSC-Windows.yml b/.pipelines/DSC-Windows.yml index 0e4810807..50cac1a3b 100644 --- a/.pipelines/DSC-Windows.yml +++ b/.pipelines/DSC-Windows.yml @@ -10,6 +10,8 @@ parameters: default: Release - name: RustSDK type: string + - name: RustVersion + type: string steps: - pwsh: | @@ -18,7 +20,7 @@ steps: displayName: 🛠️ Workaround for the LoadLibrary ACCESS_VIOLATION OneBranch issue - task: RustInstaller@1 inputs: - rustVersion: ms-prod-1.93 + rustVersion: ${{ parameters.RustVersion }} toolchainFeed: ${{ parameters.RustSDK }} additionalTargets: ${{ parameters.buildName }} displayName: Install Rust diff --git a/helpers.build.psm1 b/helpers.build.psm1 index e56d10b3b..55961e4d9 100644 --- a/helpers.build.psm1 +++ b/helpers.build.psm1 @@ -387,7 +387,7 @@ function Get-RustUp { if ($null -ne (Get-Command msrustup -CommandType Application -ErrorAction Ignore)) { Write-Verbose -Verbose "Using msrustup" $rustup = 'msrustup' - $channel = 'ms-prod-1.93' + $channel = 'ms-prod-1.95' if ($architecture -eq 'current') { $env:MSRUSTUP_TOOLCHAIN = "$architecture" } @@ -1475,7 +1475,7 @@ function Test-Clippy { Set-DefaultWorkspaceMemberGroup @workspaceParams } } - + process { $clippyFlags = @( '--%' diff --git a/resources/PSScript/psscript.ps1 b/resources/PSScript/psscript.ps1 index e3d562abb..48ed86a38 100644 --- a/resources/PSScript/psscript.ps1 +++ b/resources/PSScript/psscript.ps1 @@ -153,6 +153,7 @@ try { } else { "Script failed with terminating error: $($ps.InvocationStateInfo.Reason)" } + Write-TraceQueue Write-DscTrace -Now -Level Error -Message $message exit 1 } @@ -162,7 +163,6 @@ try { if ($ps.HadErrors) { - # Errors can be non-terminating, so we just write a warning and continue Write-DscTrace -Now -Level Debug -Message 'Non-terminating errors occurred during script execution.' } @@ -171,6 +171,7 @@ try { } } catch { + Write-TraceQueue Write-DscTrace -Now -Level Error -Message ($_ | Format-List -Force * | Out-String) exit 1 }