Skip to content

Commit cefbfbf

Browse files
committed
Replace PSake build with Nuke C# build project (#406)
1 parent 6d0c1b0 commit cefbfbf

37 files changed

Lines changed: 718 additions & 5867 deletions

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*']
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up .NET
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: '10.x'
26+
27+
- name: Install Chrome
28+
run: |
29+
which google-chrome || which chromium-browser || (
30+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - &&
31+
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list &&
32+
sudo apt-get update -q &&
33+
sudo apt-get install -y google-chrome-stable
34+
)
35+
36+
- name: Build HTML, PDF artifacts and publish release
37+
run: chmod +x ./build.sh && ./build.sh PublishRelease
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ _site
66

77
.idea/
88
/node_modules/
9+
10+
# Nuke
11+
/.nuke/temp
12+
/build/bin
13+
/build/obj

.nuke/build.schema.json

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"definitions": {
4+
"Host": {
5+
"type": "string",
6+
"enum": [
7+
"AppVeyor",
8+
"AzurePipelines",
9+
"Bamboo",
10+
"Bitbucket",
11+
"Bitrise",
12+
"GitHubActions",
13+
"GitLab",
14+
"Jenkins",
15+
"Rider",
16+
"SpaceAutomation",
17+
"TeamCity",
18+
"Terminal",
19+
"TravisCI",
20+
"VisualStudio",
21+
"VSCode"
22+
]
23+
},
24+
"ExecutableTarget": {
25+
"type": "string",
26+
"enum": [
27+
"BuildHtml",
28+
"BuildPdf",
29+
"Clean",
30+
"Compile",
31+
"CompileCheatsheet",
32+
"LaunchWebsite",
33+
"PublishRelease"
34+
]
35+
},
36+
"Verbosity": {
37+
"type": "string",
38+
"description": "",
39+
"enum": [
40+
"Verbose",
41+
"Normal",
42+
"Minimal",
43+
"Quiet"
44+
]
45+
},
46+
"NukeBuild": {
47+
"properties": {
48+
"Continue": {
49+
"type": "boolean",
50+
"description": "Indicates to continue a previously failed build attempt"
51+
},
52+
"Help": {
53+
"type": "boolean",
54+
"description": "Shows the help text for this build assembly"
55+
},
56+
"Host": {
57+
"description": "Host for execution. Default is 'automatic'",
58+
"$ref": "#/definitions/Host"
59+
},
60+
"NoLogo": {
61+
"type": "boolean",
62+
"description": "Disables displaying the NUKE logo"
63+
},
64+
"Partition": {
65+
"type": "string",
66+
"description": "Partition to use on CI"
67+
},
68+
"Plan": {
69+
"type": "boolean",
70+
"description": "Shows the execution plan (HTML)"
71+
},
72+
"Profile": {
73+
"type": "array",
74+
"description": "Defines the profiles to load",
75+
"items": {
76+
"type": "string"
77+
}
78+
},
79+
"Root": {
80+
"type": "string",
81+
"description": "Root directory during build execution"
82+
},
83+
"Skip": {
84+
"type": "array",
85+
"description": "List of targets to be skipped. Empty list skips all dependencies",
86+
"items": {
87+
"$ref": "#/definitions/ExecutableTarget"
88+
}
89+
},
90+
"Target": {
91+
"type": "array",
92+
"description": "List of targets to be invoked. Default is '{default_target}'",
93+
"items": {
94+
"$ref": "#/definitions/ExecutableTarget"
95+
}
96+
},
97+
"Verbosity": {
98+
"description": "Logging verbosity during build execution. Default is 'Normal'",
99+
"$ref": "#/definitions/Verbosity"
100+
}
101+
}
102+
}
103+
},
104+
"allOf": [
105+
{},
106+
{
107+
"$ref": "#/definitions/NukeBuild"
108+
}
109+
]
110+
}

.nuke/parameters.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "./build.schema.json",
3+
"Solution": "CSharpGuidelines.slnx"
4+
}

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

Build.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

Build/.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[*.cs]
2+
dotnet_style_qualification_for_field = false:warning
3+
dotnet_style_qualification_for_property = false:warning
4+
dotnet_style_qualification_for_method = false:warning
5+
dotnet_style_qualification_for_event = false:warning
6+
dotnet_style_require_accessibility_modifiers = never:warning
7+
8+
csharp_style_expression_bodied_properties = true:warning
9+
csharp_style_expression_bodied_indexers = true:warning
10+
csharp_style_expression_bodied_accessors = true:warning
11+
12+
dotnet_diagnostic.IDE0044.severity = none
13+
dotnet_diagnostic.IDE0051.severity = none
14+
dotnet_diagnostic.RCS1110.severity = none
15+
dotnet_diagnostic.RCS1169.severity = none
16+
dotnet_diagnostic.S2365.severity = none
17+
dotnet_diagnostic.S3903.severity = none
18+
dotnet_diagnostic.SA1009.severity = none
19+
dotnet_diagnostic.SA1111.severity = none
20+
dotnet_diagnostic.SA1306.severity = none
21+
dotnet_diagnostic.SA1400.severity = none
22+
23+
# ReSharper properties
24+
resharper_place_field_attribute_on_same_line = false

0 commit comments

Comments
 (0)