Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# Downloaded packages and build tools.
/lkg
/packages
/Tools
# output location
artifacts/

/tests/scripts/current
/release
/debug
/Proto

# auto-generated during the build
global.json
Expand Down Expand Up @@ -88,9 +83,6 @@ lib/bootstrap/4.1/policy*
obj/
bin/
aclocal.m4
Debug
Release
Proto
sign_temp
.libs
configure
Expand All @@ -114,7 +106,6 @@ ossreadme*.txt
*.cto
*.vstman
project.lock.json
Tools/
Backup/
tests/fsharp/core/array/dont.run.peverify
tests/fsharp/core/innerpoly/dont.run.peverify
Expand All @@ -123,7 +114,6 @@ times
/tests/fsharpqa/testenv/bin/System.ValueTuple.dll
source_link.json
.vs/
/VSRelease/net40/bin
System.ValueTuple.dll
tests/fsharpqa/testenv/bin/System.ValueTuple.dll
*/.fake
Expand Down
6 changes: 3 additions & 3 deletions .vsts-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- script: $(_command) $(_args)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/tests/TestResults'
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults'
ArtifactName: 'Linux $(_command) $(_args)'
publishLocation: Container
continueOnError: true
Expand All @@ -26,7 +26,7 @@ jobs:
- job: Windows
pool:
vmImage: vs2017-win2016
timeoutInMinutes: 90
timeoutInMinutes: 120
strategy:
maxParallel: 7
matrix:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- script: $(_command) $(_args)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\tests\TestResults'
PathtoPublish: '$(Build.SourcesDirectory)\artifacts\TestResults'
ArtifactName: 'Windows $(_command) $(_args)'
publishLocation: Container
continueOnError: true
Expand Down
10 changes: 5 additions & 5 deletions .vsts-signed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
displayName: Publish nightly package to MyGet
inputs:
scriptName: 'setup\publish-assets.ps1'
arguments: '-binariesPath $(MSBuildConfiguration) -branchName $(Build.SourceBranch) -apiKey $(FSharp.MyGetApiKey)'
arguments: '-binariesPath artifacts\bin -configuration $(MSBuildConfiguration) -branchName $(Build.SourceBranch) -apiKey $(FSharp.MyGetApiKey)'
condition: and(succeeded(), contains(variables['PB_PublishType'], 'myget'))

# Publish packages to Azure Blob Storage
Expand All @@ -44,7 +44,7 @@ jobs:
- task: PublishBuildArtifacts@1
displayName: Create static drop
inputs:
PathtoPublish: '$(MSBuildConfiguration)'
PathtoPublish: 'artifacts'
ArtifactName: '$(Build.BuildNumber)'
publishLocation: FilePath
TargetPath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)'
Expand All @@ -58,7 +58,7 @@ jobs:
inputs:
SymbolsPath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\Symbols'
SearchPattern: '**\*.dll;**\*.exe;**\*.pdb'
SymbolsFolder: '$(Build.SourcesDirectory)\$(MSBuildConfiguration)'
SymbolsFolder: '$(Build.SourcesDirectory)\artifacts\SymStore'
TreatNotIndexedAsWarning: true
SymbolsProduct: '$(Build.DefinitionName)'
SymbolsVersion: '$(Build.BuildNumber)'
Expand All @@ -69,7 +69,7 @@ jobs:
- task: ms-vseng.MicroBuildTasks.4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8.MicroBuildUploadVstsDropFolder@1
displayName: Upload VSTS Drop
inputs:
DropFolder: '$(Build.SourcesDirectory)\$(MSBuildConfiguration)\insertion'
DropFolder: '$(Build.SourcesDirectory)\artifacts\VSSetup\$(MSBuildConfiguration)\Insertion'
condition: and(succeeded(), contains(variables['PB_PublishType'], 'vsts'))

# Execute cleanup tasks
Expand All @@ -91,6 +91,6 @@ jobs:
displayName: Publish symbols to SymWeb
inputs:
symbolServiceURI: 'https://microsoft.artifacts.visualstudio.com/DefaultCollection'
sourcePath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\Symbols'
sourcePath: '$(DropRoot)\$(Build.DefinitionName)\$(Build.SourceBranchName)\$(Build.BuildNumber)\SymStore'
usePat: false
condition: and(succeeded(), contains(variables['PB_PublishType'], 'symweb'))
13 changes: 10 additions & 3 deletions FSharpBuild.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<FSharpSourcesRoot>$(RepoRoot)src</FSharpSourcesRoot>
<ToolsRoot>$(RepoRoot)Tools</ToolsRoot>
<ProtoOutputPath Condition="'$(OS)' != 'Unix'">$(RepoRoot)Proto\net40\bin</ProtoOutputPath>
<ProtoOutputPath Condition="'$(OS)' == 'Unix'">$(RepoRoot)Proto\coreclr\bin</ProtoOutputPath>
<ArtifactsDir>$(RepoRoot)artifacts</ArtifactsDir>
<ToolsRoot>$(ArtifactsDir)\toolset</ToolsRoot>
<ArtifactsBinDir>$(ArtifactsDir)\bin</ArtifactsBinDir>
<ArtifactsObjDir>$(ArtifactsDir)\obj</ArtifactsObjDir>
<ArtifactsPackagesDir>$(ArtifactsDir)\packages</ArtifactsPackagesDir>
<BaseOutputPath>$(ArtifactsBinDir)\$(MSBuildProjectName)</BaseOutputPath>
<BaseIntermediateOutputPath>$(ArtifactsObjDir)\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<SymStoreDirectory>$(ArtifactsDir)\SymStore</SymStoreDirectory>
<ProtoOutputPath Condition="'$(OS)' != 'Unix'">$(ArtifactsBinDir)\fsc\Proto\net46</ProtoOutputPath>
<ProtoOutputPath Condition="'$(OS)' == 'Unix'">$(ArtifactsBinDir)/fsc/Proto/netcoreapp2.1</ProtoOutputPath>
<ValueTupleImplicitPackageVersion>4.4.0</ValueTupleImplicitPackageVersion>
</PropertyGroup>

Expand Down
36 changes: 0 additions & 36 deletions FSharpBuild.Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -34,42 +34,6 @@
</CreateItem>
</Target>

<Target Name="ComputeFinalOutputPaths">
<!--
Ideally we'd set <OutputPath> to `$(Configuration)\[net40|coreclr]\bin`, but the calculation of `[net40|coreclr]`
depends on the `$(TargetFramework)` variable which is set by the individual project files, but by the time we have
that value (e.g., in this file) it's too late; some targets, particularly from the VsSDK have already used the
values of $(OutputPath)/$(OutDir).

The fix is to not set `$(Outputpath)` and simply copy stuff there after the fact.
-->

<PropertyGroup>
<TargetDotnetProfile Condition="$(TargetFramework.StartsWith('netstandard')) or $(TargetFramework.StartsWith('netcoreapp'))">coreclr</TargetDotnetProfile>
<TargetDotnetProfile Condition="$(TargetFramework.StartsWith('net4'))">net40</TargetDotnetProfile>
<ActualOutputPath Condition="'$(Language)' != 'VB'">$(MSBuildProjectDirectory)\$(OutputPath)</ActualOutputPath>
<ActualOutputPath Condition="'$(Language)' == 'VB'">$(OutputPath)</ActualOutputPath>
<FinalOutputPath>$(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\bin</FinalOutputPath>
<FinalIntermediateOutputPath>$(RepoRoot)$(Configuration)\$(TargetDotnetProfile)\obj</FinalIntermediateOutputPath>
</PropertyGroup>
</Target>

<Target Name="HACK_CopyOutputsToTheProperLocation"
AfterTargets="AfterBuild"
DependsOnTargets="ComputeFinalOutputPaths"
Condition="'$(DisableOutputPathCopying)' != 'true'">

<ItemGroup>
<OutputFilesToCopy Include="$(ActualOutputPath)**" />
<IntermediateFilesToCopy Include="$(IntermediateOutputPath)\**" />
</ItemGroup>

<Message Text="Copying build artifacts to $(FinalOutputPath)" />
<MakeDir Directories="$(FinalOutputPath);$(FinalIntermediateOutputPath)" />
<Copy SourceFiles="@(OutputFilesToCopy)" DestinationFolder="$(FinalOutputPath)\%(RecursiveDir)" />
<Copy SourceFiles="@(IntermediateFilesToCopy)" DestinationFolder="$(FinalIntermediateOutputPath)\%(RecursiveDir)" />
</Target>

<Import Project="build\targets\ConvertPortablePdbs.targets" />
<Import Project="build\targets\GenerateAssemblyAttributes.targets" />
<Import Project="build\targets\GenerateInternalsVisibleTo.targets" />
Expand Down
43 changes: 19 additions & 24 deletions FSharpTests.Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,48 +1,43 @@
<Project>

<!-- SDK targets override -->
<PropertyGroup Condition=" '$(FSharpTestCompilerVersion)' == 'net40' ">
<_FSharpCompilerPath>$(MSBuildThisFileDirectory)$(Configuration)/net40/bin</_FSharpCompilerPath>

<PropertyGroup Condition="'$(FSharpTestCompilerVersion)' == 'net40'">
<DisableAutoSetFscCompilerPath>true</DisableAutoSetFscCompilerPath>

<FscToolPath>$(_FSharpCompilerPath)</FscToolPath>
<FscToolPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\net46</FscToolPath>
<FscToolExe>fsc.exe</FscToolExe>
<DotnetFscCompilerPath></DotnetFscCompilerPath>

<FsiToolPath>$(_FSharpCompilerPath)</FsiToolPath>
<FsiToolPath>$(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\net46</FsiToolPath>
<FsiToolExe>fsi.exe</FsiToolExe>
<DotnetFsiCompilerPath></DotnetFsiCompilerPath>
</PropertyGroup>

<!-- SDK targets override -->
<PropertyGroup Condition=" '$(FSharpTestCompilerVersion)' == 'coreclr' ">
<_FSharpCompilerPath>$(MSBuildThisFileDirectory)$(Configuration)/coreclr/bin</_FSharpCompilerPath>

<PropertyGroup Condition="'$(FSharpTestCompilerVersion)' == 'coreclr'">
<DisableAutoSetFscCompilerPath>true</DisableAutoSetFscCompilerPath>
<FscToolPath>$(MSBuildThisFileDirectory)Tools/dotnet20</FscToolPath>

<FscToolPath>$(MSBuildThisFileDirectory)artifacts\toolset\dotnet</FscToolPath>
<FscToolExe Condition="'$(OS)' != 'Unix'">dotnet.exe</FscToolExe>
<FscToolExe Condition="'$(OS)' == 'Unix'">dotnet</FscToolExe>
<DotnetFscCompilerPath>$(_FSharpCompilerPath)/fsc.exe</DotnetFscCompilerPath>
<DotnetFscCompilerPath>$(MSBuildThisFileDirectory)artifacts\bin\fsc\$(Configuration)\netcoreapp2.1\fsc.exe</DotnetFscCompilerPath>

<FsiToolPath>$(MSBuildThisFileDirectory)Tools/dotnet20</FsiToolPath>
<FsiToolPath>$(MSBuildThisFileDirectory)artifacts\toolset\dotnet</FsiToolPath>
<FsiToolExe Condition="'$(OS)' != 'Unix'">dotnet.exe</FsiToolExe>
<FsiToolExe Condition="'$(OS)' == 'Unix'">dotnet</FsiToolExe>
<DotnetFsiCompilerPath>$(_FSharpCompilerPath)/fsi.exe</DotnetFsiCompilerPath>
<DotnetFsiCompilerPath>$(MSBuildThisFileDirectory)artifacts\bin\fsi\$(Configuration)\netcoreapp2.0\fsi.exe</DotnetFsiCompilerPath>
</PropertyGroup>

<!-- SDK targets override -->
<PropertyGroup>
<FSharpTargetsPath>$(_FSharpCompilerPath)/Microsoft.FSharp.Targets</FSharpTargetsPath>
<FSharpPropsShim>$(_FSharpCompilerPath)/Microsoft.FSharp.NetSdk.props</FSharpPropsShim>
<FSharpTargetsShim>$(_FSharpCompilerPath)/Microsoft.FSharp.NetSdk.targets</FSharpTargetsShim>
<FSharpOverridesTargetsShim>$(_FSharpCompilerPath)/Microsoft.FSharp.Overrides.NetSdk.targets</FSharpOverridesTargetsShim>
</PropertyGroup>
<_FSharpBuildTargetFramework Condition="'$(FSharpTestCompilerVersion)' == 'net40'">net46</_FSharpBuildTargetFramework>
<_FSharpBuildTargetFramework Condition="'$(FSharpTestCompilerVersion)' == 'coreclr'">netstandard2.0</_FSharpBuildTargetFramework>
<_FSharpBuildBinPath>$(MSBuildThisFileDirectory)artifacts\bin\FSharp.Build\$(Configuration)\$(_FSharpBuildTargetFramework)</_FSharpBuildBinPath>

<FSharpBuildAssemblyFile>$(_FSharpBuildBinPath)\FSharp.Build.dll</FSharpBuildAssemblyFile>

<!-- We are running under netcore so even though we will use the fsc compiler we can't use the desktop version of the fsharp.build tasks -->
<PropertyGroup>
<FSharpBuildAssemblyFile Condition = " '$(DOTNET_HOST_PATH)' != '' ">$(MSBuildThisFileDirectory)$(Configuration)\coreclr\bin\FSharp.Build.dll</FSharpBuildAssemblyFile>
<FSharpBuildAssemblyFile Condition = " '$(DOTNET_HOST_PATH)' == '' ">$(MSBuildThisFileDirectory)$(Configuration)\net40\bin\FSharp.Build.dll</FSharpBuildAssemblyFile>
<FSharpTargetsPath>$(_FSharpBuildBinPath)/Microsoft.FSharp.Targets</FSharpTargetsPath>
<FSharpPropsShim>$(_FSharpBuildBinPath)/Microsoft.FSharp.NetSdk.props</FSharpPropsShim>
<FSharpTargetsShim>$(_FSharpBuildBinPath)/Microsoft.FSharp.NetSdk.targets</FSharpTargetsShim>
<FSharpOverridesTargetsShim>$(_FSharpBuildBinPath)/Microsoft.FSharp.Overrides.NetSdk.targets</FSharpOverridesTargetsShim>
</PropertyGroup>
</Project>

</Project>
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Configuration ?= release
DotNetVersion = `cat DotnetCLIToolsVersion.txt`
DotNetExe = "$(CURDIR)/Tools/dotnet20/dotnet"
DotNetToolPath = $(CURDIR)/artifacts/toolset/dotnet
DotNetExe = "$(DotNetToolPath)/dotnet"

all: proto restore build test

tools:
$(CURDIR)/scripts/dotnet-install.sh --version $(DotNetVersion) --install-dir $(CURDIR)/Tools/dotnet20
$(CURDIR)/scripts/dotnet-install.sh --version $(DotNetVersion) --install-dir "$(DotNetToolPath)"

global.json: tools
echo { \"sdk\": { \"version\": \"$(DotNetVersion)\" } }>global.json
Expand All @@ -14,18 +15,18 @@ proto: global.json
$(DotNetExe) build-server shutdown
$(DotNetExe) restore src/buildtools/buildtools.proj
$(DotNetExe) restore src/fsharp/FSharp.Build/FSharp.Build.fsproj
$(DotNetExe) restore src/fsharp/Fsc/Fsc.fsproj
$(DotNetExe) restore src/fsharp/fsc/fsc.fsproj
$(DotNetExe) build src/buildtools/buildtools.proj -c Proto
$(DotNetExe) build src/fsharp/FSharp.Build/FSharp.Build.fsproj -f netstandard2.0 -c Proto
$(DotNetExe) build src/fsharp/Fsc/Fsc.fsproj -f netcoreapp2.1 -c Proto
$(DotNetExe) build src/fsharp/fsc/fsc.fsproj -f netcoreapp2.1 -c Proto

restore: global.json
$(DotNetExe) restore src/fsharp/FSharp.Core/FSharp.Core.fsproj
$(DotNetExe) restore src/fsharp/FSharp.Build/FSharp.Build.fsproj
$(DotNetExe) restore src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj
$(DotNetExe) restore src/fsharp/Fsc/Fsc.fsproj
$(DotNetExe) restore src/fsharp/fsc/fsc.fsproj
$(DotNetExe) restore src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj
$(DotNetExe) restore src/fsharp/fsi/Fsi.fsproj
$(DotNetExe) restore src/fsharp/fsi/fsi.fsproj
$(DotNetExe) restore tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
$(DotNetExe) restore tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj

Expand All @@ -34,9 +35,9 @@ build: proto restore
$(DotNetExe) build -c $(Configuration) -f netstandard1.6 src/fsharp/FSharp.Core/FSharp.Core.fsproj
$(DotNetExe) build -c $(Configuration) -f netstandard2.0 src/fsharp/FSharp.Build/FSharp.Build.fsproj
$(DotNetExe) build -c $(Configuration) -f netstandard1.6 src/fsharp/FSharp.Compiler.Private/FSharp.Compiler.Private.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.1 src/fsharp/Fsc/Fsc.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.1 src/fsharp/fsc/fsc.fsproj
$(DotNetExe) build -c $(Configuration) -f netstandard1.6 src/fsharp/FSharp.Compiler.Interactive.Settings/FSharp.Compiler.Interactive.Settings.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.0 src/fsharp/fsi/Fsi.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.0 src/fsharp/fsi/fsi.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.0 tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
$(DotNetExe) build -c $(Configuration) -f netcoreapp2.0 tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj

Expand All @@ -45,6 +46,4 @@ test: build
$(DotNetExe) test -f netcoreapp2.0 -c $(Configuration) --no-restore --no-build tests/FSharp.Build.UnitTests/FSharp.Build.UnitTests.fsproj -l "trx;LogFileName=$(CURDIR)/tests/TestResults/FSharp.Build.UnitTests.coreclr.trx"

clean:
rm -rf $(CURDIR)/Proto
rm -rf $(CURDIR)/debug
rm -rf $(CURDIR)/release
rm -rf $(CURDIR)/artifacts
2 changes: 1 addition & 1 deletion PublishToBlob.proj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<ItemGroup>
<!-- this should pick up both *.nupkg and *.symbols.nupkg -->
<NuGetPackages Include="$(MSBuildThisFileDirectory)$(Configuration)\artifacts\Microsoft.FSharp.Compiler.*.nupkg" />
<NuGetPackages Include="$(MSBuildThisFileDirectory)\artifacts\packages\$(Configuration)\Microsoft.FSharp.Compiler.*.nupkg" />
</ItemGroup>

<Target Name="Build">
Expand Down
1 change: 0 additions & 1 deletion artifacts/.gitignore

This file was deleted.

Loading