Skip to content

Commit

Permalink
Merge build changes from chiron-6 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
tachyus-ryan committed Oct 1, 2018
2 parents 1e1ce04 + 3558cbe commit 13b508d
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -12,6 +12,7 @@ paket-files
*.suo
*.user
*.sln.docstates
.vs/

# Build results
.fake/
Expand Down
1 change: 0 additions & 1 deletion Chiron.sln
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
Expand Down
16 changes: 4 additions & 12 deletions appveyor.yml
@@ -1,17 +1,9 @@
version: 7.0.0-aci-{build}

image: Visual Studio 2017

build_script:
- ps: dotnet --info
- ps: dotnet restore
- ps: dotnet build -c Release --version-suffix "aci-${env:APPVEYOR_BUILD_NUMBER}"
- ps: dotnet test -c Release tests\Chiron.Tests\Chiron.Tests.fsproj
- ps: dotnet pack -c Release --version-suffix "aci-${env:APPVEYOR_BUILD_NUMBER}"
- ps: dotnet benchmarks\Chiron.Benchmarks\bin\Release\netcoreapp2.0\Chiron.Benchmarks.dll --class SwaggerSchema

- ps: |
.\build.ps1
if ($lastexitcode -ne 0){ exit $lastexitcode }
test: off

artifacts:
- path: '**\*.nupkg'
- path: bin\*.nupkg
- path: '**\BenchmarkDotNet.Artifacts\**\*.*'
22 changes: 22 additions & 0 deletions build.ps1
@@ -0,0 +1,22 @@
[xml]$doc = Get-Content .\src\Directory.Build.props
$version = $doc.Project.PropertyGroup.VersionPrefix # the version under development, update after a release
$versionSuffix = '-build.0' # manually incremented for local builds

function isVersionTag($tag){
$v = New-Object Version
[Version]::TryParse($tag, [ref]$v)
}

if ($env:appveyor){
$versionSuffix = '-build.' + $env:appveyor_build_number
if ($env:appveyor_repo_tag -eq 'true' -and (isVersionTag($env:appveyor_repo_tag_name))){
$version = $env:appveyor_repo_tag_name
$versionSuffix = ''
}
Update-AppveyorBuild -Version "$version$versionSuffix"
}

dotnet build -c Release Chiron.sln /p:Version=$version$versionSuffix
dotnet test --no-build -c Release tests/Chiron.Tests/Chiron.Tests.fsproj
dotnet pack --no-build -c Release src/Chiron /p:Version=$version$versionSuffix -o $psscriptroot/bin
# dotnet benchmarks\Chiron.Benchmarks\bin\Release\netcoreapp2.0\Chiron.Benchmarks.dll --class SwaggerSchema
4 changes: 2 additions & 2 deletions src/Chiron/Chiron.fs
Expand Up @@ -879,7 +879,7 @@ module Serialization =
| Some a -> buildWith a jObj
| None -> jObj

let ref (): JsonEncoder<'a> ref * JsonEncoder<'a> =
let ref<'a> (): JsonEncoder<'a> ref * JsonEncoder<'a> =
let innerRef = ref (Unchecked.defaultof<JsonEncoder<'a>>)
innerRef, (fun a -> (!innerRef) a)

Expand Down Expand Up @@ -1152,7 +1152,7 @@ module Serialization =
Encode.jsonObject jObj
|> decode

let ref (): Decoder<'s,'a> ref * Decoder<'s,'a> =
let ref<'s, 'a> (): Decoder<'s,'a> ref * Decoder<'s,'a> =
let innerRef = ref (Unchecked.defaultof<Decoder<'s,'a>>)
innerRef, (fun s -> (!innerRef) s)

Expand Down
9 changes: 4 additions & 5 deletions src/Chiron/Chiron.fsproj
@@ -1,17 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
<VersionPrefix>7.0.0</VersionPrefix>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<!--<Compile Include="Chiron.fsi" />-->
<Compile Include="Chiron.fs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard'">
<PackageReference Include="FParsec" Version="1.0.2" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<ItemGroup>
<PackageReference Include="Aether" Version="8.2.0" />
<PackageReference Include="FParsec" Version="1.0.3" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-*" PrivateAssets="All" />
</ItemGroup>
</Project>
12 changes: 7 additions & 5 deletions tests/Chiron.Tests/Chiron.Tests.fsproj
Expand Up @@ -8,15 +8,17 @@
<Compile Include="Chiron.Tests.fs" />
<Compile Include="Chiron.Testing.fs" />
<Compile Include="Chiron.Properties.fs" />
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.*" />
<PackageReference Include="xunit" Version="2.3.*" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.*" />
<PackageReference Include="Unquote" Version="4.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.*" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="FsCheck.Xunit" Version="3.0.0-*" />
<PackageReference Include="FsCheck" Version="3.0.0-*" />
<PackageReference Include="Unquote" Version="4.*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Chiron\Chiron.fsproj" />
Expand Down
2 changes: 0 additions & 2 deletions tests/Chiron.Tests/Program.fs

This file was deleted.

0 comments on commit 13b508d

Please sign in to comment.