diff --git a/.travis.yml b/.travis.yml index 3cab576..f1b8390 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,8 @@ language: csharp - -sudo: false # use the new container-based Travis infrastructure - -before_install: - - chmod +x build.sh - +mono: none +dotnet: 2.1.3 script: - - ./build.sh unittest + - dotnet restore Froto.unix.sln + - dotnet build Froto.unix.sln -c Release + - dotnet test Parser.Test/Froto.Parser.Test.fsproj + - dotnet test Serialization.Test/Froto.Serialization.Test.fsproj \ No newline at end of file diff --git a/Compiler/Froto.Compiler.fsproj b/Compiler/Froto.Compiler.fsproj index 914ad00..577f8fd 100644 --- a/Compiler/Froto.Compiler.fsproj +++ b/Compiler/Froto.Compiler.fsproj @@ -1,7 +1,7 @@  Exe - net46 + netcoreapp2.0 froto diff --git a/Froto.sln b/Froto.sln index 1f38c46..6c46b99 100644 --- a/Froto.sln +++ b/Froto.sln @@ -38,17 +38,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "protobuf", "protobuf", "{82 test\google\protobuf\descriptor.proto = test\google\protobuf\descriptor.proto EndProjectSection EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Parser", "Parser\Froto.Parser.fsproj", "{1C31DA31-BEC5-4E73-9D83-E36D18847439}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Parser", "Parser/Froto.Parser.fsproj", "{1C31DA31-BEC5-4E73-9D83-E36D18847439}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Parser.Test", "Parser.Test\Froto.Parser.Test.fsproj", "{18104831-6F33-4F15-AB45-3E8527CC5181}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Parser.Test", "Parser.Test/Froto.Parser.Test.fsproj", "{18104831-6F33-4F15-AB45-3E8527CC5181}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Serialization", "Serialization\Froto.Serialization.fsproj", "{C37745D0-275D-4DCE-9DDC-C4663A462EDD}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Serialization", "Serialization/Froto.Serialization.fsproj", "{C37745D0-275D-4DCE-9DDC-C4663A462EDD}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Serialization.Test", "Serialization.Test\Froto.Serialization.Test.fsproj", "{AF2D437D-55A1-4F31-86BD-9B9D7E05CAEA}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Serialization.Test", "Serialization.Test/Froto.Serialization.Test.fsproj", "{AF2D437D-55A1-4F31-86BD-9B9D7E05CAEA}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Froto.Compiler", "Compiler\Froto.Compiler.fsproj", "{F5D8D709-919D-4539-8908-91C540C970B3}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Froto.Compiler", "Compiler/Froto.Compiler.fsproj", "{F5D8D709-919D-4539-8908-91C540C970B3}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.TypeProvider", "TypeProvider\Froto.TypeProvider.fsproj", "{837AA4FC-E2DD-48A1-A793-50DC4404EE57}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.TypeProvider", "TypeProvider/Froto.TypeProvider.fsproj", "{837AA4FC-E2DD-48A1-A793-50DC4404EE57}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Froto.unix.sln b/Froto.unix.sln new file mode 100644 index 0000000..40c6ab4 --- /dev/null +++ b/Froto.unix.sln @@ -0,0 +1,89 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2010 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2291EB39-A4CC-471C-BA12-1E58F298B395}" + ProjectSection(SolutionItems) = preProject + .gitattributes = .gitattributes + .gitignore = .gitignore + appveyor.yml = appveyor.yml + build.fsx = build.fsx + readme.md = readme.md + release_notes.md = release_notes.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{992FDC44-075B-4B9D-BFF4-0C34093627E6}" + ProjectSection(SolutionItems) = preProject + test\addressbook.proto = test\addressbook.proto + test\addressbook1.proto = test\addressbook1.proto + test\FooOptions.proto = test\FooOptions.proto + test\grpc.proto = test\grpc.proto + test\javatutorial.proto = test\javatutorial.proto + test\nwind.proto = test\nwind.proto + test\person.proto = test\person.proto + test\protoenum.proto = test\protoenum.proto + test\protooptions.proto = test\protooptions.proto + test\riak.proto = test\riak.proto + test\riak_kv.proto = test\riak_kv.proto + test\riak_search.proto = test\riak_search.proto + test\rpc.proto = test\rpc.proto + test\SearchRequest.proto = test\SearchRequest.proto + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "google", "google", "{E1A81C99-B921-4EAF-9912-2B2306779E22}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "protobuf", "protobuf", "{828E3BC0-8DF8-48B5-BA98-BDB8C108C25A}" + ProjectSection(SolutionItems) = preProject + test\google\protobuf\descriptor.proto = test\google\protobuf\descriptor.proto + EndProjectSection +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Parser", "Parser/Froto.Parser.fsproj", "{1C31DA31-BEC5-4E73-9D83-E36D18847439}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Parser.Test", "Parser.Test/Froto.Parser.Test.fsproj", "{18104831-6F33-4F15-AB45-3E8527CC5181}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Serialization", "Serialization/Froto.Serialization.fsproj", "{C37745D0-275D-4DCE-9DDC-C4663A462EDD}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Serialization.Test", "Serialization.Test/Froto.Serialization.Test.fsproj", "{AF2D437D-55A1-4F31-86BD-9B9D7E05CAEA}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Froto.Compiler", "Compiler/Froto.Compiler.fsproj", "{F5D8D709-919D-4539-8908-91C540C970B3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1C31DA31-BEC5-4E73-9D83-E36D18847439}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C31DA31-BEC5-4E73-9D83-E36D18847439}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C31DA31-BEC5-4E73-9D83-E36D18847439}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C31DA31-BEC5-4E73-9D83-E36D18847439}.Release|Any CPU.Build.0 = Release|Any CPU + {18104831-6F33-4F15-AB45-3E8527CC5181}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18104831-6F33-4F15-AB45-3E8527CC5181}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18104831-6F33-4F15-AB45-3E8527CC5181}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18104831-6F33-4F15-AB45-3E8527CC5181}.Release|Any CPU.Build.0 = Release|Any CPU + {C37745D0-275D-4DCE-9DDC-C4663A462EDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C37745D0-275D-4DCE-9DDC-C4663A462EDD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C37745D0-275D-4DCE-9DDC-C4663A462EDD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C37745D0-275D-4DCE-9DDC-C4663A462EDD}.Release|Any CPU.Build.0 = Release|Any CPU + {AF2D437D-55A1-4F31-86BD-9B9D7E05CAEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF2D437D-55A1-4F31-86BD-9B9D7E05CAEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF2D437D-55A1-4F31-86BD-9B9D7E05CAEA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF2D437D-55A1-4F31-86BD-9B9D7E05CAEA}.Release|Any CPU.Build.0 = Release|Any CPU + {F5D8D709-919D-4539-8908-91C540C970B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5D8D709-919D-4539-8908-91C540C970B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5D8D709-919D-4539-8908-91C540C970B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5D8D709-919D-4539-8908-91C540C970B3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {992FDC44-075B-4B9D-BFF4-0C34093627E6} = {2291EB39-A4CC-471C-BA12-1E58F298B395} + {E1A81C99-B921-4EAF-9912-2B2306779E22} = {992FDC44-075B-4B9D-BFF4-0C34093627E6} + {828E3BC0-8DF8-48B5-BA98-BDB8C108C25A} = {E1A81C99-B921-4EAF-9912-2B2306779E22} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8FAB0177-725B-49AC-A02D-F7B95EB975C2} + EndGlobalSection +EndGlobal diff --git a/Parser.Test/Froto.Parser.Test.fsproj b/Parser.Test/Froto.Parser.Test.fsproj index 57bebcb..3cdd1e3 100644 --- a/Parser.Test/Froto.Parser.Test.fsproj +++ b/Parser.Test/Froto.Parser.Test.fsproj @@ -1,10 +1,11 @@  - net46 + netcoreapp2.0 + @@ -15,5 +16,6 @@ + \ No newline at end of file diff --git a/Parser.Test/Program.fs b/Parser.Test/Program.fs new file mode 100644 index 0000000..9ad90c0 --- /dev/null +++ b/Parser.Test/Program.fs @@ -0,0 +1 @@ +module Program = let [] main _ = 0 \ No newline at end of file diff --git a/Parser/Froto.Parser.fsproj b/Parser/Froto.Parser.fsproj index ded40db..5f53753 100644 --- a/Parser/Froto.Parser.fsproj +++ b/Parser/Froto.Parser.fsproj @@ -1,6 +1,6 @@  - net45 + netstandard2.0 diff --git a/Parser/Froto.Parser.nuspec b/Parser/Froto.Parser.nuspec index aa0f4af..35a9741 100644 --- a/Parser/Froto.Parser.nuspec +++ b/Parser/Froto.Parser.nuspec @@ -12,7 +12,7 @@ froto protobuf parser binary protocol buffers serialization deserialization - - + + \ No newline at end of file diff --git a/Serialization.Test/Froto.Serialization.Test.fsproj b/Serialization.Test/Froto.Serialization.Test.fsproj index 011f1c2..1e11071 100644 --- a/Serialization.Test/Froto.Serialization.Test.fsproj +++ b/Serialization.Test/Froto.Serialization.Test.fsproj @@ -1,6 +1,6 @@  - net46 + netcoreapp2.0 false @@ -12,6 +12,7 @@ + @@ -22,5 +23,6 @@ + \ No newline at end of file diff --git a/Serialization.Test/Program.fs b/Serialization.Test/Program.fs new file mode 100644 index 0000000..9ad90c0 --- /dev/null +++ b/Serialization.Test/Program.fs @@ -0,0 +1 @@ +module Program = let [] main _ = 0 \ No newline at end of file diff --git a/Serialization/Froto.Serialization.fsproj b/Serialization/Froto.Serialization.fsproj index 3525384..614af96 100644 --- a/Serialization/Froto.Serialization.fsproj +++ b/Serialization/Froto.Serialization.fsproj @@ -1,6 +1,6 @@  - net45 + netstandard2.0 diff --git a/Serialization/Froto.Serialization.nuspec b/Serialization/Froto.Serialization.nuspec index 94d1616..a926ad4 100644 --- a/Serialization/Froto.Serialization.nuspec +++ b/Serialization/Froto.Serialization.nuspec @@ -12,7 +12,7 @@ froto protobuf binary protocol buffers serialization deserialization - - + + diff --git a/TypeProvider.Test/Froto.TypeProvider.Test.fsproj b/TypeProvider.Test/Froto.TypeProvider.Test.fsproj index 7d653cf..e57cc97 100644 --- a/TypeProvider.Test/Froto.TypeProvider.Test.fsproj +++ b/TypeProvider.Test/Froto.TypeProvider.Test.fsproj @@ -1,6 +1,6 @@  - net46 + net461 false @@ -14,25 +14,26 @@ - ..\TypeProvider\bin\Debug\net45\Froto.TypeProvider.dll + ..\TypeProvider\bin\Debug\net461\Froto.TypeProvider.dll - ..\Serialization\bin\Debug\net45\Froto.Serialization.dll + ..\Serialization\bin\Debug\netstandard2.0\Froto.Serialization.dll - ..\TypeProvider\bin\Release\net45\Froto.TypeProvider.dll + ..\TypeProvider\bin\Release\net461\Froto.TypeProvider.dll - ..\Serialization\bin\Release\net45\Froto.Serialization.dll + ..\Serialization\bin\Release\netstandard2.0\Froto.Serialization.dll + diff --git a/TypeProvider.Test/packages.config b/TypeProvider.Test/packages.config deleted file mode 100644 index 87777c5..0000000 --- a/TypeProvider.Test/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/TypeProvider/Froto.TypeProvider.fsproj b/TypeProvider/Froto.TypeProvider.fsproj index acaf553..2d115df 100644 --- a/TypeProvider/Froto.TypeProvider.fsproj +++ b/TypeProvider/Froto.TypeProvider.fsproj @@ -1,6 +1,6 @@  - net45 + net461 diff --git a/TypeProvider/Froto.TypeProvider.nuspec b/TypeProvider/Froto.TypeProvider.nuspec index 4e6e938..fe58a91 100644 --- a/TypeProvider/Froto.TypeProvider.nuspec +++ b/TypeProvider/Froto.TypeProvider.nuspec @@ -12,7 +12,7 @@ froto protobuf binary protocol buffers serialization deserialization type provider - - + + diff --git a/build.fsx b/build.fsx index f091555..626cf86 100644 --- a/build.fsx +++ b/build.fsx @@ -11,7 +11,7 @@ open Fake.Core.Process open Fake.Core.TargetOperators open Fake.DotNet open Fake.DotNet.NuGet.NuGet -open Fake.DotNet.Testing.XUnit2 +// open Fake.DotNet.Testing.XUnit2 type Text.StringBuilder with member x.Appendf format = Printf.ksprintf (fun s -> x.Append s |> ignore) format @@ -29,8 +29,6 @@ let buildVersion = else sprintf "%s-a%s" assemblyVersion (buildDate.ToString "yyMMddHHmm") let mutable configuration = "Release" -MSBuildDefaults <- { MSBuildDefaults with Verbosity = Some MSBuildVerbosity.Minimal } - Target.Create "BuildVersion" <| fun _ -> Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore @@ -56,38 +54,14 @@ Target.Create "SwitchToDebug" <| fun _ -> configuration <- "Debug" Target.Create "Build" <| fun _ -> - ["Froto.sln"] - |> MSBuild "" "restore;build" ["Configuration", configuration] - |> ignore - - if not isMono then - ["Froto.TypeProvider.TestAndDocs.sln"] - |> MSBuild "" "restore;build" ["Configuration", configuration] - |> ignore + let build project = DotNetCli.Build (fun p -> { p with Project = project }) + build "Froto.sln" + // build "Froto.TypeProvider.TestAndDocs.sln" Target.Create "UnitTest" <| fun _ -> - IO.Directory.create "bin" - let dlls = - [ sprintf @"Parser.Test/bin/%s/net46/Froto.Parser.Test.dll" configuration - sprintf @"Serialization.Test/bin/%s/net46/Froto.Serialization.Test.dll" configuration - ] - - let dlls = - List.append dlls ( - if isMono then - [] - else - [ sprintf @"TypeProvider.Test/bin/%s/net46/Froto.TypeProvider.Test.dll" configuration ] - ) - - xUnit2 (fun p -> - { p with - IncludeTraits = ["Kind", "Unit"] - XmlOutputPath = Some @"bin/UnitTest.xml" - Parallel = ParallelMode.Assemblies - TimeOut = TimeSpan.FromMinutes 10.0 - }) - dlls + let test project = DotNetCli.Test (fun p -> { p with Project = project }) + test "Parser.Test/Froto.Parser.Test.fsproj" + test "Serialization.Test/Froto.Serialization.Test.fsproj" // https://github.com/fsharp/FAKE/blob/master/help/markdown/dotnet-nuget.md Target.Create "NuGet" <| fun _ -> @@ -143,7 +117,7 @@ Target.Create "Debug" Target.DoNothing =?> ("AssemblyInfo", isAppVeyorBuild) ==> "Build" ==> "UnitTest" -=?> ("NuGet", not isMono) +=?> ("NuGet", isAppVeyorBuild) ==> "Default" "UnitTest" ==> "Debug"