From dc004fe92f3d7ab7bd314c1d89e69f59a9f10b68 Mon Sep 17 00:00:00 2001 From: KevinRansom Date: Sat, 27 Jan 2024 02:21:30 -0800 Subject: [PATCH 1/4] bump --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index afd393f8200..113aae224c4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,4 +1,4 @@ -# CI and PR triggers +# CI and PR triggers trigger: branches: include: From 5a5ac520bec16d96038873d9d16ff33f49376f56 Mon Sep 17 00:00:00 2001 From: KevinRansom Date: Sat, 27 Jan 2024 03:32:23 -0800 Subject: [PATCH 2/4] Update build to support benchmarks --- azure-pipelines.yml | 19 +------------------ eng/Build.ps1 | 23 ++++++++++++++++++++++- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 113aae224c4..9d24e048d45 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -724,24 +724,7 @@ stages: steps: - checkout: self clean: true - - script: dotnet --list-sdks - displayName: Report dotnet SDK versions - - task: UseDotNet@2 - displayName: install SDK - inputs: - packageType: sdk - useGlobalJson: true - includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory) - installationPath: $(Agent.ToolsDirectory)/dotnet - - script: dotnet build -c $(_BuildConfig) .\FSharp.Benchmarks.sln /bl:\"artifacts/log/$(_BuildConfig)/BenchmarkBuild.binlog\" - workingDirectory: $(Build.SourcesDirectory) - displayName: Plain build of FSharp.Benchmarks.sln - continueOnError: true - condition: always() - - script: .\Build.cmd -c $(_BuildConfig) - - pwsh: ./SmokeTestBenchmarks.ps1 - workingDirectory: $(Build.SourcesDirectory)/tests/benchmarks + - script: ./eng/cibuild.sh --configuration $(_BuildConfig) -testBenchmarks displayName: Smoke test fast benchmarks # Test trimming on Windows diff --git a/eng/Build.ps1 b/eng/Build.ps1 index b713a86effa..ae1615cdbcf 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -62,6 +62,7 @@ param ( [switch]$testAllButIntegration, [switch]$testpack, [switch]$testAOT, + [switch]$testBenchmarks, [string]$officialSkipTests = "false", [switch]$noVisualStudio, [switch]$sourceBuild, @@ -111,6 +112,7 @@ function Print-Usage() { Write-Host " -testVs Run F# editor unit tests" Write-Host " -testpack Verify built packages" Write-Host " -testAOT Run AOT/Trimming tests" + Write-Host " -testBenchmarks Build and Run Benchmark suite" Write-Host " -officialSkipTests Set to 'true' to skip running tests" Write-Host "" Write-Host "Advanced settings:" @@ -176,6 +178,7 @@ function Process-Arguments() { $script:testVs = $False $script:testpack = $False $script:testAOT = $False + $script:testBenchmarks = $False $script:verifypackageshipstatus = $True } @@ -211,6 +214,10 @@ function Process-Arguments() { $script:pack = $True; } + if ($testBenchmarks) { + $script:testBenchmarks = $True + } + foreach ($property in $properties) { if (!$property.StartsWith("/p:", "InvariantCultureIgnoreCase")) { Write-Host "Invalid argument: $property" @@ -339,7 +346,7 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str if ($env:RunningAsPullRequest -ne "true" -and $noTestFilter -eq $false) { $args += " --filter TestCategory!=PullRequest" - } + }` if ($asBackgroundJob) { Write-Host("Starting on the background: $args") @@ -541,12 +548,20 @@ try { } } + if ($testBenchmarks) { + $properties_storage = $properties + $properties += "/p:RuntimeIdentifier=win-x64" + BuildSolution "FSharp.Benchmarks.sln" $False + $properties = $properties_storage + } + if ($pack) { $properties_storage = $properties $properties += "/p:GenerateSbom=false" BuildSolution "Microsoft.FSharp.Compiler.sln" $True $properties = $properties_storage } + if ($build) { VerifyAssemblyVersionsAndSymbols } @@ -662,6 +677,12 @@ try { Pop-Location } + if ($testBenchmarks) { + Push-Location "$RepoRoot\tests\benchmarks" + ./SmokeTestBenchmarks.ps1 + Pop-Location + } + # verify nupkgs have access to the source code $nupkgtestFailed = $false if ($testpack) { From 3e5cdeb36468b752859d04f482cfe79fa629c773 Mon Sep 17 00:00:00 2001 From: Kevin Ransom Date: Sat, 27 Jan 2024 12:10:45 -0800 Subject: [PATCH 3/4] oops --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9d24e048d45..3ede733129f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -724,7 +724,7 @@ stages: steps: - checkout: self clean: true - - script: ./eng/cibuild.sh --configuration $(_BuildConfig) -testBenchmarks + - script: eng\CIBuild.cmd --configuration $(_BuildConfig) -testBenchmarks displayName: Smoke test fast benchmarks # Test trimming on Windows From 80389700e1ed8a26189c7384a3ce8483c9fcdd03 Mon Sep 17 00:00:00 2001 From: Vlad Zarytovskii Date: Mon, 29 Jan 2024 12:59:37 +0100 Subject: [PATCH 4/4] Removed all special cases for benchmarks solution --- Directory.Build.props | 4 ---- azure-pipelines.yml | 4 +++- eng/Build.ps1 | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 10c53909035..879bd89410f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -16,10 +16,6 @@ true - - true - - true diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3ede733129f..029bf381dec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -724,8 +724,10 @@ stages: steps: - checkout: self clean: true - - script: eng\CIBuild.cmd --configuration $(_BuildConfig) -testBenchmarks + - script: eng\CIBuild.cmd -testBenchmarks displayName: Smoke test fast benchmarks + continueOnError: true + condition: always() # Test trimming on Windows - job: Build_And_Test_Trimming_Windows diff --git a/eng/Build.ps1 b/eng/Build.ps1 index ae1615cdbcf..a971d399788 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -551,6 +551,7 @@ try { if ($testBenchmarks) { $properties_storage = $properties $properties += "/p:RuntimeIdentifier=win-x64" + $properties += "/p:Configuration=Release" # Always run in release. BuildSolution "FSharp.Benchmarks.sln" $False $properties = $properties_storage }