Skip to content

Commit 6b25ed7

Browse files
The benchmark leg seems to reliably fail (#16600)
Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
1 parent 9e18eeb commit 6b25ed7

3 files changed

Lines changed: 26 additions & 23 deletions

File tree

Directory.Build.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
1717
</PropertyGroup>
1818

19-
<PropertyGroup Condition="'$(SolutionName)' == 'FSharp.Benchmarks' and '$(BUILDING_USING_DOTNET)' != 'false'">
20-
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
21-
</PropertyGroup>
22-
2319
<!-- Temporary workaround if proj-info is used, allows Ionide's evaluation to work correctly. -->
2420
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' != 'false' and '$(DotnetProjInfo)' == 'true'">
2521
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>

azure-pipelines.yml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CI and PR triggers
1+
# CI and PR triggers
22
trigger:
33
branches:
44
include:
@@ -718,25 +718,10 @@ stages:
718718
steps:
719719
- checkout: self
720720
clean: true
721-
- script: dotnet --list-sdks
722-
displayName: Report dotnet SDK versions
723-
- task: UseDotNet@2
724-
displayName: install SDK
725-
inputs:
726-
packageType: sdk
727-
useGlobalJson: true
728-
includePreviewVersions: true
729-
workingDirectory: $(Build.SourcesDirectory)
730-
installationPath: $(Agent.ToolsDirectory)/dotnet
731-
- script: dotnet build -c $(_BuildConfig) .\FSharp.Benchmarks.sln /bl:\"artifacts/log/$(_BuildConfig)/BenchmarkBuild.binlog\"
732-
workingDirectory: $(Build.SourcesDirectory)
733-
displayName: Plain build of FSharp.Benchmarks.sln
721+
- script: eng\CIBuild.cmd -testBenchmarks
722+
displayName: Smoke test fast benchmarks
734723
continueOnError: true
735724
condition: always()
736-
- script: .\Build.cmd -c $(_BuildConfig)
737-
- pwsh: ./SmokeTestBenchmarks.ps1
738-
workingDirectory: $(Build.SourcesDirectory)/tests/benchmarks
739-
displayName: Smoke test fast benchmarks
740725

741726
# Test trimming on Windows
742727
- job: Build_And_Test_Trimming_Windows

eng/Build.ps1

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ param (
6262
[switch]$testAllButIntegration,
6363
[switch]$testpack,
6464
[switch]$testAOT,
65+
[switch]$testBenchmarks,
6566
[string]$officialSkipTests = "false",
6667
[switch]$noVisualStudio,
6768
[switch]$sourceBuild,
@@ -111,6 +112,7 @@ function Print-Usage() {
111112
Write-Host " -testVs Run F# editor unit tests"
112113
Write-Host " -testpack Verify built packages"
113114
Write-Host " -testAOT Run AOT/Trimming tests"
115+
Write-Host " -testBenchmarks Build and Run Benchmark suite"
114116
Write-Host " -officialSkipTests <bool> Set to 'true' to skip running tests"
115117
Write-Host ""
116118
Write-Host "Advanced settings:"
@@ -176,6 +178,7 @@ function Process-Arguments() {
176178
$script:testVs = $False
177179
$script:testpack = $False
178180
$script:testAOT = $False
181+
$script:testBenchmarks = $False
179182
$script:verifypackageshipstatus = $True
180183
}
181184

@@ -211,6 +214,10 @@ function Process-Arguments() {
211214
$script:pack = $True;
212215
}
213216

217+
if ($testBenchmarks) {
218+
$script:testBenchmarks = $True
219+
}
220+
214221
foreach ($property in $properties) {
215222
if (!$property.StartsWith("/p:", "InvariantCultureIgnoreCase")) {
216223
Write-Host "Invalid argument: $property"
@@ -339,7 +346,7 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str
339346

340347
if ($env:RunningAsPullRequest -ne "true" -and $noTestFilter -eq $false) {
341348
$args += " --filter TestCategory!=PullRequest"
342-
}
349+
}`
343350

344351
if ($asBackgroundJob) {
345352
Write-Host("Starting on the background: $args")
@@ -541,12 +548,21 @@ try {
541548
}
542549
}
543550

551+
if ($testBenchmarks) {
552+
$properties_storage = $properties
553+
$properties += "/p:RuntimeIdentifier=win-x64"
554+
$properties += "/p:Configuration=Release" # Always run in release.
555+
BuildSolution "FSharp.Benchmarks.sln" $False
556+
$properties = $properties_storage
557+
}
558+
544559
if ($pack) {
545560
$properties_storage = $properties
546561
$properties += "/p:GenerateSbom=false"
547562
BuildSolution "Microsoft.FSharp.Compiler.sln" $True
548563
$properties = $properties_storage
549564
}
565+
550566
if ($build) {
551567
VerifyAssemblyVersionsAndSymbols
552568
}
@@ -662,6 +678,12 @@ try {
662678
Pop-Location
663679
}
664680

681+
if ($testBenchmarks) {
682+
Push-Location "$RepoRoot\tests\benchmarks"
683+
./SmokeTestBenchmarks.ps1
684+
Pop-Location
685+
}
686+
665687
# verify nupkgs have access to the source code
666688
$nupkgtestFailed = $false
667689
if ($testpack) {

0 commit comments

Comments
 (0)