Skip to content
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

Adjust target framework and dotnet build #393

Merged
merged 8 commits into from
Jul 26, 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
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ dist: trusty
matrix:
include:
- mono: latest
dotnet: 2.1.3
dotnet: 2.1.302
env: USE_MSBUILD=1
os: linux
- mono: latest
dotnet: 2.1.302
os: linux

before_install:
- chmod +x build.sh
Expand Down
58 changes: 44 additions & 14 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let gitName = "Deedle"

Environment.CurrentDirectory <- __SOURCE_DIRECTORY__

let desiredSdkVersion = "2.1.100"
let desiredSdkVersion = "2.1.302"
let mutable sdkPath = None
let getSdkPath() = (defaultArg sdkPath "dotnet")

Expand Down Expand Up @@ -103,21 +103,23 @@ Target "CleanDocs" (fun _ ->
// --------------------------------------------------------------------------------------
// Build library & test project

let testNames =
[ "Deedle.Tests"
"Deedle.CSharp.Tests"
"Deedle.Documentation.Tests"
"Deedle.PerfTests" ]

let testProjs =
[ "tests/Deedle.Tests/Deedle.Tests.fsproj"
"tests/Deedle.CSharp.Tests/Deedle.CSharp.Tests.csproj"
"tests/Deedle.Documentation.Tests/Deedle.Documentation.Tests.fsproj"
"tests/Deedle.PerfTests/Deedle.PerfTests.fsproj" ]
"tests/Deedle.PerfTests/Deedle.PerfTests.fsproj"
"tests/Deedle.RPlugin.Tests/Deedle.RPlugin.Tests.fsproj" ]

let testCoreProjs =
[ "tests/Deedle.Tests/Deedle.Tests.fsproj"
"tests/Deedle.CSharp.Tests/Deedle.CSharp.Tests.csproj"
"tests/Deedle.Documentation.Tests/Deedle.Documentation.Tests.fsproj"
"tests/Deedle.PerfTests/Deedle.PerfTests.fsproj" ]

let buildProjs =
[ "src/Deedle/Deedle.fsproj"
"src/Deedle.RProvider.Plugin/Deedle.RProvider.Plugin.fsproj" ]

let buildCoreProjs =
[ "src/Deedle/Deedle.fsproj" ]

Expand Down Expand Up @@ -160,18 +162,46 @@ Target "BuildTests" <| fun () ->
else
DotNetCli.Build (fun p -> { p with Configuration = "Release"; Project = testProj; ToolPath = getSdkPath(); AdditionalArgs=["/v:n"]; })

Target "BuildCoreTests" <| fun () ->
for testProj in testCoreProjs do
if useMsBuildToolchain then
DotNetCli.Restore (fun p -> { p with Project = testProj; ToolPath = getSdkPath(); AdditionalArgs=["/v:n"] })
MSBuildRelease null "Build" [testProj] |> Log "BuildTests.DesignTime-Output: "
else
DotNetCli.Build (fun p -> { p with Configuration = "Release"; Project = testProj; ToolPath = getSdkPath(); AdditionalArgs=["/v:n"]; })

Target "RunTests" <| fun () ->
let nunitRunnerPath = "packages/NUnit.ConsoleRunner/tools/nunit3-console.exe"
if useMsBuildToolchain then
let nunitRunnerPath = "packages/NUnit.ConsoleRunner/tools/nunit3-console.exe"
ActivateFinalTarget "CloseTestRunner"
(!! "tests/Deedle.*Tests/bin/Release/net45/Deedle*Tests*.dll" ++ "tests/Deedle.*Tests/bin/Release/net461/Deedle*Tests*.dll")
(!! "tests/Deedle.*Tests/bin/Release/net45/Deedle*Tests*.dll" ++
"tests/Deedle.*Tests/bin/Release/net461/Deedle*Tests*.dll")
|> NUnit3 (fun p ->
{ p with
ToolPath = nunitRunnerPath
ShadowCopy = false })
else
for testProj in testCoreProjs do
DotNetCli.Test (fun p -> { p with Configuration = "Release"; Project = testProj; ToolPath = getSdkPath(); AdditionalArgs=["/v:n"] })
ActivateFinalTarget "CloseTestRunner"
!! "tests/Deedle.RPlugin.Tests/bin/Release/net45/Deedle*Tests*.dll"
|> NUnit3 (fun p ->
{ p with
ToolPath = nunitRunnerPath
ShadowCopy = false })

Target "RunCoreTests" <| fun () ->
let nunitRunnerPath = "packages/NUnit.ConsoleRunner/tools/nunit3-console.exe"
if useMsBuildToolchain then
ActivateFinalTarget "CloseTestRunner"
(!! "tests/Deedle.*Tests/bin/Release/net45/Deedle*Tests*.dll" ++
"tests/Deedle.*Tests/bin/Release/net461/Deedle*Tests*.dll")
|> NUnit3 (fun p ->
{ p with
ToolPath = nunitRunnerPath
ShadowCopy = false })
else
for testProj in testProjs do
for testProj in testCoreProjs do
DotNetCli.Test (fun p -> { p with Configuration = "Release"; Project = testProj; ToolPath = getSdkPath(); AdditionalArgs=["/v:n"] })

FinalTarget "CloseTestRunner" (fun _ ->
Expand Down Expand Up @@ -289,8 +319,8 @@ Target "AllCore" DoNothing

"BuildTests" ==> "All"
"RunTests" ==> "All"
"BuildTests" ==> "AllCore"
"RunTests" ==> "AllCore"
"BuildCoreTests" ==> "AllCore"
"RunCoreTests" ==> "AllCore"

"All" ==> "NuGet" ==> "Release"
"All"
Expand All @@ -301,4 +331,4 @@ Target "AllCore" DoNothing
==> "TagRelease"
==> "Release"

RunTargetOrDefault "All"
RunTargetOrDefault "AllCore"
2 changes: 1 addition & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nuget FSharp.Charting
nuget FSharp.Data
nuget MathNet.Numerics 4.5.1
nuget NUnit 3.9.0
nuget NUnit.Console 3.8.0
nuget NUnit.ConsoleRunner 3.8.0
nuget FsUnit 3.0.0
nuget RProvider
nuget Nuget.CommandLine
Expand Down
Loading