Skip to content

Commit 3b5e5ce

Browse files
committed
Add Dotnetcore only build configuration and CI builds
1 parent e748f2b commit 3b5e5ce

File tree

6 files changed

+69
-6
lines changed

6 files changed

+69
-6
lines changed

FSharp.Plotly.sln

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,24 @@ EndProject
8787
Global
8888
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8989
Debug|Any CPU = Debug|Any CPU
90+
Dotnet|Any CPU = Dotnet|Any CPU
9091
Release|Any CPU = Release|Any CPU
9192
EndGlobalSection
9293
GlobalSection(ProjectConfigurationPlatforms) = postSolution
9394
{F635BEEF-9609-4485-8C72-D8090A5F40A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
9495
{F635BEEF-9609-4485-8C72-D8090A5F40A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
96+
{F635BEEF-9609-4485-8C72-D8090A5F40A2}.Dotnet|Any CPU.ActiveCfg = Dotnet|Any CPU
97+
{F635BEEF-9609-4485-8C72-D8090A5F40A2}.Dotnet|Any CPU.Build.0 = Dotnet|Any CPU
9598
{F635BEEF-9609-4485-8C72-D8090A5F40A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
9699
{F635BEEF-9609-4485-8C72-D8090A5F40A2}.Release|Any CPU.Build.0 = Release|Any CPU
97100
{82EEB69B-361E-486E-9F54-D346A8C76CC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
98101
{82EEB69B-361E-486E-9F54-D346A8C76CC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
102+
{82EEB69B-361E-486E-9F54-D346A8C76CC9}.Dotnet|Any CPU.ActiveCfg = Dotnet|Any CPU
99103
{82EEB69B-361E-486E-9F54-D346A8C76CC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
100104
{82EEB69B-361E-486E-9F54-D346A8C76CC9}.Release|Any CPU.Build.0 = Release|Any CPU
101105
{B88586CA-044D-4D65-AB51-A7339C83D42F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
102106
{B88586CA-044D-4D65-AB51-A7339C83D42F}.Debug|Any CPU.Build.0 = Debug|Any CPU
107+
{B88586CA-044D-4D65-AB51-A7339C83D42F}.Dotnet|Any CPU.ActiveCfg = Dotnet|Any CPU
103108
{B88586CA-044D-4D65-AB51-A7339C83D42F}.Release|Any CPU.ActiveCfg = Release|Any CPU
104109
{B88586CA-044D-4D65-AB51-A7339C83D42F}.Release|Any CPU.Build.0 = Release|Any CPU
105110
EndGlobalSection

appveyor.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
1-
image: Visual Studio 2017
1+
image:
2+
- Ubuntu
3+
- Visual Studio 2019
24

35
init:
46
- git config --global core.autocrlf input
5-
- dotnet tool install fake-cli -g
6-
build_script:
7-
- cmd: build.cmd All
7+
8+
matrix:
9+
fast_finish: true
10+
11+
for:
12+
-
13+
matrix:
14+
only:
15+
- image: Visual Studio 2019
16+
17+
build_script:
18+
- cmd: build.cmd
19+
-
20+
matrix:
21+
only:
22+
- image: Ubuntu
23+
24+
build_script:
25+
- chmod +x ./build.sh
26+
- sh: ./build.sh -t DotnetCoreBuild
27+
828
test: off
929
version: 0.0.1.{build}
1030

@@ -15,4 +35,4 @@ branches:
1535

1636
artifacts:
1737
- path: bin
18-
name: bin
38+
name: bin

build.fsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,21 @@ Target.create "CopyBinaries" (fun _ ->
145145
|> Seq.iter (fun (fromDir, toDir) -> Shell.copyDir toDir fromDir (fun _ -> true))
146146
)
147147

148+
Target.create "CopyBinariesDotnet" (fun _ ->
149+
!! "src/**/*.fsproj"
150+
-- "src/FSharp.Plotly.WPF/FSharp.Plotly.WPF.fsproj"
151+
|> Seq.map (fun f -> ((Path.getDirectory f) </> "bin" </> "Dotnet", "bin" </> (Path.GetFileNameWithoutExtension f)))
152+
|> Seq.iter (fun (fromDir, toDir) -> Shell.copyDir toDir fromDir (fun _ -> true))
153+
)
154+
155+
148156
// --------------------------------------------------------------------------------------
149157
// Clean build results
150158

151159
let buildConfiguration = DotNet.Custom <| Environment.environVarOrDefault "configuration" configuration
152160

161+
let dotnetCoreConfiguration = DotNet.Custom "Dotnet"
162+
153163
Target.create "Clean" (fun _ ->
154164
Shell.cleanDirs ["bin"; "temp"; "pkg"]
155165
)
@@ -168,6 +178,13 @@ Target.create "Build" (fun _ ->
168178
Configuration = buildConfiguration })
169179
)
170180

181+
Target.create "BuildDotnet" (fun _ ->
182+
solutionFile
183+
|> DotNet.build (fun p ->
184+
{ p with
185+
Configuration = dotnetCoreConfiguration }
186+
)
187+
)
171188

172189
// --------------------------------------------------------------------------------------
173190
// Run the unit tests using test runner
@@ -286,6 +303,7 @@ Target.create "GitReleaseNuget" (fun _ ->
286303
Target.create "All" ignore
287304
Target.create "CIBuild" ignore
288305
Target.create "BuildOnly" ignore
306+
Target.create "DotnetCoreBuild" ignore
289307

290308
"Clean"
291309
==> "CleanDocs"
@@ -307,6 +325,13 @@ Target.create "BuildOnly" ignore
307325
==> "BuildReleasePackages"
308326
==> "All"
309327

328+
"Clean"
329+
==> "CleanDocs"
330+
==> "AssemblyInfo"
331+
==> "BuildDotnet"
332+
==> "CopyBinariesDotnet"
333+
==> "DotnetCoreBuild"
334+
310335
"Clean"
311336
==> "CleanDocs"
312337
==> "AssemblyInfo"

src/FSharp.Plotly.WPF/FSharp.Plotly.WPF.fsproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1313
<!-- Optional: Include PDB in the built .nupkg -->
1414
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
15+
<Configurations>Debug;Release;Dotnet</Configurations>
1516
</PropertyGroup>
1617
<ItemGroup>
18+
<Compile Include="AssemblyInfo.fs" />
1719
<Compile Include="ViewContainer.fs" />
1820
<Compile Include="ChartWPF.fs" />
1921
<None Include="WpfTest.fsx" />

src/FSharp.Plotly/FSharp.Plotly.fsproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net45;net47;netstandard2.0</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0;net45;net47</TargetFrameworks>
4+
</PropertyGroup>
5+
<PropertyGroup Condition=" '$(Configuration)' == 'Dotnet' ">
6+
<TargetFramework>netstandard2.0</TargetFramework>
7+
</PropertyGroup>
8+
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' Or '$(Configuration)' == 'Release' ">
9+
<TargetFrameworks>netstandard2.0;net45;net47</TargetFrameworks>
10+
</PropertyGroup>
11+
<PropertyGroup>
412
<RootNamespace>FSharp.Plotly</RootNamespace>
513
<AssemblyName>FSharp.Plotly</AssemblyName>
614
<Name>FSharp.Plotly</Name>
@@ -12,8 +20,10 @@
1220
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1321
<!-- Optional: Include PDB in the built .nupkg -->
1422
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
23+
<Configurations>Debug;Release;Dotnet</Configurations>
1524
</PropertyGroup>
1625
<ItemGroup>
26+
<Compile Include="AssemblyInfo.fs" />
1727
<Compile Include="StyleParams.fs" />
1828
<Compile Include="DynamicObj.fs" />
1929
<Compile Include="Colors.fs" />

tests/FSharp.Plotly.Tests/FSharp.Plotly.Tests.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<OutputType>Exe</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
11+
<Configurations>Debug;Release;Dotnet</Configurations>
1112
</PropertyGroup>
1213
<ItemGroup>
1314
<Compile Include="Generators.fs" />

0 commit comments

Comments
 (0)