Skip to content

Re-enable FCS build on Jenkins Ubuntu #4391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Feb 27, 2018
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<Import Project="..\fcs.props" />
<Import Project="..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>net45</TargetFrameworks>
<OutputPath>..\..\$(Configuration.ToLower())\fcs</OutputPath>
Expand All @@ -23,10 +24,10 @@
<Compile Include="..\..\src\fsharp\MSBuildReferenceResolver.fs">
<Link>Service/MSBuildReferenceResolver.fs</Link>
</Compile>
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>
<Private>false</Private>
Expand All @@ -47,6 +48,5 @@
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Tasks.v12.0.dll</HintPath>
<Private>false</Private>
</Reference>
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<Import Project="..\fcs.props" />
<Import Project="..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>net45</TargetFrameworks>
<OutputPath>..\..\$(Configuration.ToLower())\fcs</OutputPath>
Expand All @@ -26,11 +27,8 @@
<Content Include="..\..\release\fcs\net45\FSharp.Compiler.Service.ProjectCrackerTool.exe" PackagePath="utilities\net45" />
<Content Include="..\..\release\fcs\net45\FSharp.Compiler.Service.ProjectCrackerTool.exe.config" PackagePath="utilities\net45" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll</HintPath>
<Private>false</Private>
</Reference>
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<Import Project="..\fcs.props" />
<Import Project="..\netfx.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net45</TargetFrameworks>
Expand All @@ -19,11 +20,7 @@
<Compile Include="Program.fs" />
<None Include="App.config" />
<None Include="FSharp.Compiler.Service.ProjectCracker.targets" />
<None Include="paket.references" />
<Reference Include="FSharp.Core">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.Portable.FSharp.Core.4.1.20\lib\profiles\net40\FSharp.Core.dll</HintPath>
<Private>false</Private>
</Reference>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<Reference Include="Microsoft.Build.Framework, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>$(FSharpSourcesRoot)\..\fcs\dependencies\MSBuild.v12.0\Microsoft.Build.Framework.dll</HintPath>
<Private>false</Private>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<Compile Include="../../../tests/service/data/CSharp_Analysis/CSharpClass.cs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<Import Project="..\fcs.props" />
<Import Project="..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<!-- <DefineConstants>$(DefineConstants);NETCOREAPP2_0</DefineConstants> -->
<NoWarn>$(NoWarn);44;</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DelaySign>true</DelaySign>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<OutputPath>..\..\$(Configuration.ToLower())\fcs</OutputPath>
<IsPackable>false</IsPackable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <!-- Tests won't run without this, at least on OSX, see https://github.com/NuGet/Home/issues/4837#issuecomment-354536302 -->
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<DefineConstants>$(DefineConstants);FX_NO_RUNTIMEENVIRONMENT</DefineConstants>
Expand Down Expand Up @@ -68,14 +68,12 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
<PackageReference Include="FSharp.Core" Version="4.2.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0" />
<PackageReference Include="NUnit" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="Dotnet.ProjInfo" Version="0.9.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PackageReference Include="FSharp.Core" Version="4.2.3" />
<ProjectReference Include="..\FSharp.Compiler.Service\FSharp.Compiler.Service.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
<Reference Include="mscorlib" />
Expand All @@ -91,7 +89,7 @@
<Reference Include="System.Xaml" />
<Reference Include="WindowsBase" />
<Reference Include="UIAutomationTypes" />
<ProjectReference Include="$(FSharpSourcesRoot)\..\tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj" />
<ProjectReference Include="$(FSharpSourcesRoot)\..\fcs\FSharp.Compiler.Service.ProjectCracker\FSharp.Compiler.Service.ProjectCracker.fsproj" />
<ProjectReference Include="CSharp_Analysis\CSharp_Analysis.csproj" />
<ProjectReference Include="..\FSharp.Compiler.Service.ProjectCracker\FSharp.Compiler.Service.ProjectCracker.fsproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion fcs/FSharp.Compiler.Service.sln
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UntypedTree", "samples\Unty
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FscExe", "samples\FscExe\FscExe.fsproj", "{C94C257C-3C0A-4858-B5D8-D746498D1F08}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "..\tests\service\data\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Analysis", "FSharp.Compiler.Service.Tests\CSharp_Analysis\CSharp_Analysis.csproj", "{887630A3-4B1D-40EA-B8B3-2D842E9C40DB}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsiExe", "samples\FsiExe\FsiExe.fsproj", "{F9540CA8-1CE0-4546-A23A-A461E416E95B}"
EndProject
Expand Down
26 changes: 10 additions & 16 deletions fcs/FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<FSharpSourcesRoot>$(MSBuildProjectDirectory)\..\..\src</FSharpSourcesRoot>
</PropertyGroup>
<Import Project="..\fcs.props" />
<Import Project="..\netfx.props" />
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);COMPILER_SERVICE_AS_DLL</DefineConstants>
Expand Down Expand Up @@ -30,7 +31,6 @@
<PackageTags>F#, fsharp, interactive, compiler, editor</PackageTags>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<!-- <DefineConstants >$(DefineConstants);NETSTANDARD2_0</DefineConstants> -->
<DefineConstants>$(DefineConstants);FX_NO_PDB_READER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_PDB_WRITER</DefineConstants>
<DefineConstants>$(DefineConstants);FX_NO_SYMBOLSTORE</DefineConstants>
Expand Down Expand Up @@ -631,31 +631,25 @@
<Link>Service/fsi.fs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<ItemGroup>
<PackageReference Include="FSharp.Core" Version="4.1.*" />
<PackageReference Include="System.Collections.Immutable" Version="1.3.1" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.2" />
<PackageReference Include="Microsoft.DiaSymReader.PortablePdb" Version="1.2.0" />
<PackageReference Include="Microsoft.DiaSymReader" Version="1.1.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.0.0" />
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
<PackageReference Include="System.Reflection.Metadata" Version="1.4.1" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.0.0" />
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.0" />
<PackageReference Include="FSharp.Core" Version="4.1.*" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<Reference Include="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="ISymWrapper, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.DiaSymReader.PortablePdb">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.PortablePdb.1.2.0\lib\portable-net45+win8\Microsoft.DiaSymReader.PortablePdb.dll</HintPath>
</Reference>
<Reference Include="Microsoft.DiaSymReader">
<HintPath>$(FSharpSourcesRoot)\..\packages\Microsoft.DiaSymReader.1.1.0\lib\portable-net45+win8\Microsoft.DiaSymReader.dll</HintPath>
</Reference>
<Reference Include="System.Reflection.Metadata">
<HintPath>$(FSharpSourcesRoot)\..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
</Reference>
<Reference Include="System.Collections.Immutable">
<HintPath>$(FSharpSourcesRoot)\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple">
<HintPath>$(FSharpSourcesRoot)\..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
Expand Down
52 changes: 16 additions & 36 deletions fcs/build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,78 +63,57 @@ let isJenkinsBuild = buildServer = BuildServer.Jenkins
let isVersionTag tag = Version.TryParse tag |> fst
let hasRepoVersionTag = isAppVeyorBuild && AppVeyorEnvironment.RepoTag && isVersionTag AppVeyorEnvironment.RepoTagName
let assemblyVersion = if hasRepoVersionTag then AppVeyorEnvironment.RepoTagName else release.NugetVersion
let nugetVersion = release.NugetVersion
open SemVerHelper

let buildVersion =
if hasRepoVersionTag then assemblyVersion
else if isAppVeyorBuild then sprintf "%s-b%s" assemblyVersion AppVeyorEnvironment.BuildNumber
else assemblyVersion

// Skipping build of FCS on Jenkins Mono for now until we knoow how to get an updated version of Mono installed
let skipBuild = isJenkinsBuild && isMono

Target "Clean" (fun _ ->
if not skipBuild then
CleanDir releaseDir
)

Target "Restore" (fun _ ->
if not skipBuild then
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj -v n"
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj -v n"
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj -v n"
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj -v n"
for p in (!! "./../**/packages.config") do
let result =
ExecProcess (fun info ->
info.FileName <- FullName @"./../.nuget/NuGet.exe"
info.WorkingDirectory <- FullName @"./.."
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
if result <> 0 then failwithf "nuget restore %s failed" p
// We assume a paket restore has already been run
runDotnet __SOURCE_DIRECTORY__ "restore FSharp.Compiler.Service.sln -v n"
for p in [ "../packages.config" ] do
ExecProcess (fun info ->
info.FileName <- FullName @"./../.nuget/NuGet.exe"
info.WorkingDirectory <- FullName @"./.."
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
|> assertExitCodeZero
)

Target "BuildVersion" (fun _ ->
if not skipBuild then
Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore
)

Target "Build" (fun _ ->
if skipBuild then
try Directory.CreateDirectory("../Release/") |> ignore with _ -> ()
File.WriteAllText("../Release/nichts.txt", "nothing to see here, build was skipped until we knoow how to get an updated version of Mono installed on Jenkins")
else
runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release /maxcpucount:1"
runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.sln -v n -c Release"
)

Target "Test" (fun _ ->
if not skipBuild then
// This project file is used for the netcoreapp2.0 tests to work out reference sets
runDotnet __SOURCE_DIRECTORY__ "restore ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n"
runDotnet __SOURCE_DIRECTORY__ "build ../tests/projects/Sample_NETCoreSDK_FSharp_Library_netstandard2_0/Sample_NETCoreSDK_FSharp_Library_netstandard2_0.fsproj -v n"
runDotnet __SOURCE_DIRECTORY__ "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release /maxcpucount:1"
)

// Now run the tests
runDotnet __SOURCE_DIRECTORY__ "test FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.Tests.fsproj -v n -c Release"
)

Target "NuGet" (fun _ ->
if not skipBuild then
runDotnet __SOURCE_DIRECTORY__ "build FSharp.Compiler.Service.ProjectCrackerTool/FSharp.Compiler.Service.ProjectCrackerTool.fsproj -v n -c Release /maxcpucount:1"
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service/FSharp.Compiler.Service.fsproj -v n -c Release /maxcpucount:1"
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.ProjectCracker/FSharp.Compiler.Service.ProjectCracker.fsproj -v n -c Release /maxcpucount:1"
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.MSBuild.v12/FSharp.Compiler.Service.MSBuild.v12.fsproj -v n -c Release /maxcpucount:1"
runDotnet __SOURCE_DIRECTORY__ "pack FSharp.Compiler.Service.sln -v n -c Release"
)

Target "GenerateDocsEn" (fun _ ->
if not skipBuild then
executeFSIWithArgs "docsrc/tools" "generate.fsx" [] [] |> ignore
)

Target "GenerateDocsJa" (fun _ ->
if not skipBuild then
executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" [] [] |> ignore
)

Target "PublishNuGet" (fun _ ->
if not skipBuild then
Paket.Push (fun p ->
let apikey =
match getBuildParam "nuget-apikey" with
Expand All @@ -148,11 +127,12 @@ Target "PublishNuGet" (fun _ ->
// --------------------------------------------------------------------------------------
// Run all targets by default. Invoke 'build <Target>' to override

Target "Start" DoNothing
Target "Release" DoNothing
Target "GenerateDocs" DoNothing
Target "TestAndNuGet" DoNothing

"Clean"
"Start"
=?> ("BuildVersion", isAppVeyorBuild)
==> "Restore"
==> "Build"
Expand Down
2 changes: 1 addition & 1 deletion fcs/cibuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# note: expects to run from top directory
./mono/latest-mono-stable.sh
./build.sh NuGet
./fcs/build.sh NuGet
8 changes: 0 additions & 8 deletions fcs/fcs.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,5 @@
<!-- The LKG FSI.EXE requires MSBuild 15 to be installed, which is painful -->
<FsiToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools</FsiToolPath>
<FsiToolExe>fsi.exe</FsiToolExe>

<!-- FSharp.Compiler.Service is compiled with FSharp.Compiler.Tools for reproducible builds -->
<FscToolPath>$(FSharpSourcesRoot)\..\packages\FSharp.Compiler.Tools.4.1.27\tools</FscToolPath>
<FscToolExe>fsc.exe</FscToolExe>
<FscToolFullPath>$(FscToolPath)\$(FsiToolExe)</FscToolFullPath>

<AssemblySearchPaths>{HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}</AssemblySearchPaths>

</PropertyGroup>
</Project>
Loading