From 34b556e0275c20b272efee19591651d89e92da04 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Fri, 25 Aug 2023 12:15:24 +0200 Subject: [PATCH 1/2] Update azure-pipelines.yml --- azure-pipelines.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9c7f04f7d29..466f473d919 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -142,6 +142,8 @@ stages: /p:PublishToSymbolServer=true /p:VisualStudioDropName=$(VisualStudioDropName) /p:GenerateSbom=true + env: + NativeToolsOnMachine: true - script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c $(_BuildConfig) displayName: End to end build tests - task: PublishTestResults@2 @@ -365,9 +367,13 @@ stages: # yes, this is miserable, but - https://github.com/dotnet/arcade/issues/13239 - script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind) + env: + NativeToolsOnMachine: true displayName: Build / Test condition: ne(variables['_testKind'], 'testIntegration') - script: eng\CIBuild.cmd -compressallmetadata -configuration $(_configuration) -$(_testKind) + env: + NativeToolsOnMachine: true displayName: Build / Integration Test continueOnError: true condition: eq(variables['_testKind'], 'testIntegration') @@ -519,6 +525,7 @@ stages: clean: true - script: .\Build.cmd -c Release -pack env: + NativeToolsOnMachine: true FSHARP_EXPERIMENTAL_FEATURES: $(_experimental_flag) - script: .\tests\EndToEndBuildTests\EndToEndBuildTests.cmd -c Release env: @@ -649,6 +656,8 @@ stages: - script: dotnet --list-sdks displayName: Report dotnet SDK versions - script: .\Build.cmd $(_kind) -pack -c $(_BuildConfig) + env: + NativeToolsOnMachine: true displayName: Initial build and prepare packages. - script: $(Build.SourcesDirectory)/tests/AheadOfTime/Trimming/check.cmd displayName: Build, trim, publish and check the state of the trimmed app. From 390438290bd58cfbb40929e77f15c22022225dac Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Fri, 25 Aug 2023 12:18:02 +0200 Subject: [PATCH 2/2] More perl fixes --- eng/Build.ps1 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/eng/Build.ps1 b/eng/Build.ps1 index 89dcb57285e..ea80e0374ca 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -514,18 +514,13 @@ try { TryDownloadDotnetFrameworkSdk $nativeTools = InitializeNativeTools + if (-not (Test-Path variable:NativeToolsOnMachine)) { - $env:PERL5Path = Join-Path $nativeTools "perl\5.32.1.1\perl\bin\perl.exe" + $env:PERL5Path = Join-Path $nativeTools "perl\5.38.0.1\perl\bin\perl.exe" write-host "variable:NativeToolsOnMachine = unset or false" $nativeTools write-host "Path = $env:PERL5Path" } - else { - $env:PERL5Path = Join-Path $nativeTools["perl"] "perl\bin\perl.exe" - write-host "variable:NativeToolsOnMachine = $variable:NativeToolsOnMachine" - $nativeTools.values - write-host "Path = $env:PERL5Path" - } $dotnetPath = InitializeDotNetCli $env:DOTNET_ROOT = "$dotnetPath" @@ -606,7 +601,15 @@ try { $env:LINK_EXE = "$RepoRoot\tests\fsharpqa\testenv\bin\link\link.exe" $env:OSARCH = $env:PROCESSOR_ARCHITECTURE write-host "Exec-Console $env:PERL5Path" - Exec-Console $env:PERL5Path """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS" + + if (-not (Test-Path variable:NativeToolsOnMachine)) { + Exec-Console $env:PERL5Path """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS" + } + else + { + Exec-Console "perl.exe" """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS" + } + write-host "Exec-Console finished" Pop-Location }