Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

Commit 8b8e76f

Browse files
authored
Merge pull request #9 from panesofglass/build
Update build
2 parents 90e6c31 + ee70ad4 commit 8b8e76f

File tree

8 files changed

+54
-25
lines changed

8 files changed

+54
-25
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ $tf/
8787
_ReSharper*/
8888
*.[Rr]e[Ss]harper
8989
*.DotSettings.user
90+
.idea/
9091

9192
# JustCode is a .NET coding addin-in
9293
.JustCode

.travis.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
language: csharp
22

3-
mono: 5.2.0
4-
dotnet: 2.0.0
3+
dotnet: 2.1.402
4+
5+
mono:
6+
- 5.2.0
57

68
install:
79
- mozroots --import --sync
@@ -13,21 +15,21 @@ matrix:
1315
- os: linux # Ubuntu 14.04
1416
dist: trusty
1517
sudo: required
16-
dotnet: 2.0.0
18+
dotnet: 2.1.402
1719
- os: osx # OSX 10.12
1820
osx_image: xcode9.1
19-
dotnet: 2.0.0
21+
dotnet: 2.1.402
2022
dist: trusty
2123
sudo: required
2224

2325
script:
2426
- dotnet --info
2527
- dotnet restore
2628
- dotnet build -c Release
27-
- dotnet test tests/Freya.Core.Tests/Freya.Core.Tests.fsproj -c Release
28-
- dotnet test tests/Freya.Core.Hopac.Tests/Freya.Core.Hopac.Tests.fsproj -c Release
29-
- dotnet pack -c Release --include-symbols
30-
- dotnet tests/Freya.Core.Benchmarks/bin/Release/netcoreapp2.0/Freya.Core.Benchmarks.dll
29+
- dotnet test --no-build tests/Freya.Core.Tests/Freya.Core.Tests.fsproj -c Release
30+
- dotnet test --no-build tests/Freya.Core.Hopac.Tests/Freya.Core.Hopac.Tests.fsproj -c Release
31+
- dotnet pack --no-build -c Release --include-symbols
32+
- dotnet tests/Freya.Core.Benchmarks/bin/Release/netcoreapp2.1/Freya.Core.Benchmarks.dll
3133

3234
branches:
3335
except:

appveyor.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
version: 4.0.0-aci-{build}
2-
1+
image: Visual Studio 2017
32
build_script:
4-
- ps: dotnet --info
5-
- ps: dotnet restore
6-
- ps: dotnet build -c Release --version-suffix "aci-${env:APPVEYOR_BUILD_NUMBER}"
7-
- ps: dotnet test -c Release tests\Freya.Core.Tests\Freya.Core.Tests.fsproj
8-
- ps: dotnet test -c Release tests\Freya.Core.Hopac.Tests\Freya.Core.Hopac.Tests.fsproj
9-
- ps: dotnet pack -c Release --include-symbols --version-suffix "aci-${env:APPVEYOR_BUILD_NUMBER}"
10-
- ps: dotnet .\tests\Freya.Core.Benchmarks\bin\Release\netcoreapp2.0\Freya.Core.Benchmarks.dll
11-
12-
test: off
13-
3+
- ps: |
4+
.\build.ps1
5+
if ($lastexitcode -ne 0){ exit $lastexitcode }
146
artifacts:
15-
- path: '**\*.nupkg'
16-
- path: '**\BenchmarkDotNet.Artifacts\**\*.*'
7+
- path: bin\*.nupkg
8+
- path: '**\BenchmarkDotNet.Artifacts\**\*.*'

build.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[xml]$doc = Get-Content .\src\Directory.Build.props
2+
$version = $doc.Project.PropertyGroup.VersionPrefix # the version under development, update after a release
3+
$versionSuffix = '-build.0' # manually incremented for local builds
4+
5+
function isVersionTag($tag){
6+
$v = New-Object Version
7+
[Version]::TryParse($tag, [ref]$v)
8+
}
9+
10+
if ($env:appveyor){
11+
$versionSuffix = '-build.' + $env:appveyor_build_number
12+
if ($env:appveyor_repo_tag -eq 'true' -and (isVersionTag($env:appveyor_repo_tag_name))){
13+
$version = $env:appveyor_repo_tag_name
14+
$versionSuffix = ''
15+
}
16+
Update-AppveyorBuild -Version "$version$versionSuffix"
17+
}
18+
19+
dotnet build -c Release Freya.Core.sln /p:Version=$version$versionSuffix
20+
dotnet test --no-build -c Release tests/Freya.Core.Tests/Freya.Core.Tests.fsproj
21+
dotnet test --no-build -c Release tests/Freya.Core.Hopac.Tests/Freya.Core.Hopac.Tests.fsproj
22+
dotnet pack --no-build -c Release src/Freya.Core /p:Version=$version$versionSuffix -o $psscriptroot/bin
23+
dotnet pack --no-build -c Release src/Freya.Core.Hopac /p:Version=$version$versionSuffix -o $psscriptroot/bin
24+
dotnet tests/Freya.Core.Benchmarks/bin/Release/netcoreapp2.1/Freya.Core.Benchmarks.dll

src/Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,13 @@
1212
<RepositoryUrl>https://github.com/xyncro/freya-core</RepositoryUrl>
1313
<PackageTags>$(PackageTags);functional;web;freya;f#;fsharp</PackageTags>
1414
<PackageTags Condition="'$(Hopac)' == 'true'">$(PackageTags);hopac</PackageTags>
15+
16+
<!-- SourceLink related properties https://github.com/dotnet/SourceLink#using-sourcelink -->
17+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
18+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
19+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
1520
</PropertyGroup>
21+
<ItemGroup>
22+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-*" PrivateAssets="All" />
23+
</ItemGroup>
1624
</Project>

src/Freya.Core.Common.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
</ItemGroup>
2121

2222
<ItemGroup>
23+
<PackageReference Update="FSharp.Core" Version="4.3.4" />
2324
<PackageReference Include="Aether" Version="[8.2.0,9)" />
2425
</ItemGroup>
2526

tests/Freya.Core.Benchmarks/Freya.Core.Benchmarks.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
<TargetFramework>netcoreapp2.1</TargetFramework>
66
<IsPackable>false</IsPackable>
77
<DebugType>none</DebugType>
88
<ServerGarbageCollection>true</ServerGarbageCollection>

tests/Freya.Core.Tests.Common.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
<Project>
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
23
<PropertyGroup>
34
<OutputType>Exe</OutputType>
4-
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
<TargetFramework>netcoreapp2.1</TargetFramework>
56
<DefineConstants Condition="'$(Hopac)' == 'true'">$(DefineConstants);HOPAC</DefineConstants>
67
<ServerGarbageCollection Condition="'$(Hopac)' == 'true'">true</ServerGarbageCollection>
78
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)