Skip to content

Commit 9d625a8

Browse files
committed
Adds CI stuff
1 parent 34ceacb commit 9d625a8

File tree

6 files changed

+130
-2
lines changed

6 files changed

+130
-2
lines changed

.appveyor.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#---------------------------------#
2+
# Build Image #
3+
#---------------------------------#
4+
image: Visual Studio 2019
5+
6+
#---------------------------------#
7+
# Build Script #
8+
#---------------------------------#
9+
build_script:
10+
- ps: .\build.ps1 --target=CI
11+
12+
#---------------------------------#
13+
# Tests
14+
#---------------------------------#
15+
test: off
16+
17+
#---------------------------------#
18+
# Pull Requests #
19+
#---------------------------------#
20+
pull_requests:
21+
do_not_increment_build_number: true
22+
23+
#---------------------------------#
24+
# General #
25+
#---------------------------------#
26+
skip_branch_with_pr: true
27+
28+
#---------------------------------#
29+
# Branches to build #
30+
#---------------------------------#
31+
branches:
32+
# Whitelist
33+
only:
34+
- develop
35+
- master
36+
- /release/.*/
37+
- /hotfix/.*/
38+
39+
#---------------------------------#
40+
# Build Cache #
41+
#---------------------------------#
42+
cache:
43+
- src\packages -> src\**\packages.config
44+
- tools -> recipe.cake

GitReleaseManager.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
issue-labels-include:
2+
- Breaking change
3+
- Feature
4+
- Bug
5+
- Improvement
6+
- Documentation
7+
- Security
8+
issue-labels-exclude:
9+
- Build
10+
issue-labels-alias:
11+
- name: Documentation
12+
header: Documentation
13+
plural: Documentation
14+
- name: security
15+
header: Security
16+
plural: Security

build.ps1

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
$ErrorActionPreference = 'Stop'
2+
3+
$SCRIPT_NAME = "recipe.cake"
4+
5+
Write-Host "Restoring .NET Core tools"
6+
dotnet tool restore
7+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
8+
9+
Write-Host "Bootstrapping Cake"
10+
dotnet cake $SCRIPT_NAME --bootstrap
11+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
12+
13+
Write-Host "Running Build"
14+
dotnet cake $SCRIPT_NAME @args
15+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

build.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
SCRIPT_NAME="recipe.cake"
3+
4+
5+
echo "Bootstrapping Cake"
6+
dotnet cake $SCRIPT_NAME --bootstrap
7+
8+
echo "Running Build"
9+
dotnet cake $SCRIPT_NAME "$@"

recipe.cake

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#load nuget:?package=Cake.Recipe&version=2.2.1
2+
3+
Environment.SetVariableNames();
4+
5+
BuildParameters.SetParameters(
6+
context: Context,
7+
buildSystem: BuildSystem,
8+
sourceDirectoryPath: "./src",
9+
title: "Righthand.Vice.Bridge",
10+
repositoryOwner: "MihaMarkic",
11+
repositoryName: "vice-bridge-net",
12+
appVeyorAccountName: "MihaMarkic",
13+
shouldPublishMyGet: false,
14+
shouldRunDupFinder: false,
15+
shouldRunInspectCode: false,
16+
shouldRunCodecov: false,
17+
shouldRunDotNetCorePack: true);
18+
19+
BuildParameters.PrintParameters(Context);
20+
21+
ToolSettings.SetToolSettings(
22+
context: Context,
23+
dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "source/ViceMonitor.Bridge/Test/ViceMonitor.Bridge/*.cs" },
24+
testCoverageFilter: "+[*]* -[nunit.*]* -[*.Tests]*",
25+
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
26+
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");
27+
Build.RunDotNetCore();

source/ViceMonitor.Bridge/Righthand.ViceMonitor.Bridge/Righthand.ViceMonitor.Bridge.csproj

+19-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,22 @@
22

33
<PropertyGroup>
44
<TargetFramework>net5.0</TargetFramework>
5-
<RootNamespace>Righthand.ViceMonitor.Bridge</RootNamespace>
65
<Nullable>enable</Nullable>
6+
<IncludeSymbols>true</IncludeSymbols>
7+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
8+
</PropertyGroup>
9+
<PropertyGroup>
10+
<PackageId>Righthand.Vice.Bridge</PackageId>
11+
<Title>Righthand Vice.Bridge</Title>
12+
<Description>Bridge for Vice's binary monitor.</Description>
13+
<PackageTags>Vice</PackageTags>
14+
<Authors>Miha Markic</Authors>
15+
<Owners>Miha Markic</Owners>
16+
<RepositoryUrl>https://github.com/MihaMarkic/vice-bridge-net.git</RepositoryUrl>
17+
<RepositoryType>git</RepositoryType>
18+
<PackageProjectUrl>https://github.com/MihaMarkic/vice-bridge-net</PackageProjectUrl>
19+
<!--<PackageIcon>icon.png</PackageIcon>-->
20+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
721
</PropertyGroup>
822
<ItemGroup>
923
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
@@ -15,6 +29,9 @@
1529
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
1630
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
1731
<PackageReference Include="System.Memory" Version="4.5.4" />
32+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
33+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
34+
<PrivateAssets>all</PrivateAssets>
35+
</PackageReference>
1836
</ItemGroup>
19-
2037
</Project>

0 commit comments

Comments
 (0)