Skip to content

Commit

Permalink
Merge branch 'main' into dont-crash-mkgraph
Browse files Browse the repository at this point in the history
  • Loading branch information
0101 authored Jan 29, 2024
2 parents 266a2bb + dcf28e8 commit 2c91ac3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 29 deletions.
6 changes: 2 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
</PropertyGroup>

<PropertyGroup Condition="'$(SolutionName)' == 'FSharp.Benchmarks' and '$(BUILDING_USING_DOTNET)' != 'false'">
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
</PropertyGroup>

<!-- Temporary workaround if proj-info is used, allows Ionide's evaluation to work correctly. -->
<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' != 'false' and '$(DotnetProjInfo)' == 'true'">
<BUILDING_USING_DOTNET>true</BUILDING_USING_DOTNET>
Expand All @@ -28,6 +24,8 @@
<Import Project="$(RepoRoot)/Directory.Build.props.user" Condition = "Exists('$(RepoRoot)/Directory.Build.props.user')" />

<PropertyGroup Condition="'$(BUILDING_USING_DOTNET)' == 'true'">
<BUILDING_WITH_LKG>true</BUILDING_WITH_LKG>
<BUILD_FROM_SOURCE>true</BUILD_FROM_SOURCE>
<DisableAutoSetFscCompilerPath>false</DisableAutoSetFscCompilerPath>
<FSHARPCORE_USE_PACKAGE Condition="'$(FSHARPCORE_USE_PACKAGE)' == ''">true</FSHARPCORE_USE_PACKAGE>
<DISABLE_ARCADE Condition="'$(DISABLE_ARCADE)' == ''">true</DISABLE_ARCADE>
Expand Down
27 changes: 3 additions & 24 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CI and PR triggers
# CI and PR triggers
trigger:
branches:
include:
Expand Down Expand Up @@ -110,13 +110,10 @@ stages:
demands: ImageOverride -equals windows.vs2022preview.amd64
timeoutInMinutes: 300
variables:
- group: DotNet-Blob-Feed
- group: DotNet-Symbol-Server-Pats
- group: DotNet-DevDiv-Insertion-Workflow-Variables
- name: _SignType
value: Real
- name: _DotNetPublishToBlobFeed
value: true
steps:
- checkout: self
clean: true
Expand All @@ -131,9 +128,6 @@ stages:
/p:MicroBuild_SigningEnabled=true
/p:OverridePackageSource=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
/p:TeamName=$(_TeamName)
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
/p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
/p:DotNetPublishToBlobFeed=true
/p:DotNetPublishUsingPipelines=$(_PublishUsingPipelines)
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
Expand Down Expand Up @@ -724,25 +718,10 @@ 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
- script: eng\CIBuild.cmd -testBenchmarks
displayName: Smoke test fast benchmarks
continueOnError: true
condition: always()
- script: .\Build.cmd -c $(_BuildConfig)
- pwsh: ./SmokeTestBenchmarks.ps1
workingDirectory: $(Build.SourcesDirectory)/tests/benchmarks
displayName: Smoke test fast benchmarks

# Test trimming on Windows
- job: Build_And_Test_Trimming_Windows
Expand Down
24 changes: 23 additions & 1 deletion eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ param (
[switch]$testAllButIntegration,
[switch]$testpack,
[switch]$testAOT,
[switch]$testBenchmarks,
[string]$officialSkipTests = "false",
[switch]$noVisualStudio,
[switch]$sourceBuild,
Expand Down Expand Up @@ -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 <bool> Set to 'true' to skip running tests"
Write-Host ""
Write-Host "Advanced settings:"
Expand Down Expand Up @@ -176,6 +178,7 @@ function Process-Arguments() {
$script:testVs = $False
$script:testpack = $False
$script:testAOT = $False
$script:testBenchmarks = $False
$script:verifypackageshipstatus = $True
}

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -541,12 +548,21 @@ 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
}

if ($pack) {
$properties_storage = $properties
$properties += "/p:GenerateSbom=false"
BuildSolution "Microsoft.FSharp.Compiler.sln" $True
$properties = $properties_storage
}

if ($build) {
VerifyAssemblyVersionsAndSymbols
}
Expand Down Expand Up @@ -662,6 +678,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) {
Expand Down

0 comments on commit 2c91ac3

Please sign in to comment.