Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit ab73894

Browse files
Merge pull request #18 from JasperFx/nuke
Add Nuke.Build, remove net6/7 targets
2 parents 919d853 + 7bfad83 commit ab73894

25 files changed

+615
-114
lines changed

.github/workflows/Build_&_Test.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# ------------------------------------------------------------------------------
2+
# <auto-generated>
3+
#
4+
# This code was generated.
5+
#
6+
# - To turn off auto-generation set:
7+
#
8+
# [GithubActionsExtended (AutoGenerate = false)]
9+
#
10+
# - To trigger manual generation invoke:
11+
#
12+
# nuke --generate-configuration GitHubActions_Build_&_Test --host GitHubActions
13+
#
14+
# </auto-generated>
15+
# ------------------------------------------------------------------------------
16+
17+
name: Build_&_Test
18+
19+
on:
20+
push:
21+
branches:
22+
- main
23+
pull_request:
24+
branches:
25+
- main
26+
27+
jobs:
28+
ubuntu-latest:
29+
name: ubuntu-latest
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/setup-dotnet@v4
33+
with:
34+
dotnet-version: |
35+
8.0
36+
9.0
37+
- uses: actions/checkout@v4
38+
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
39+
uses: actions/cache@v4
40+
with:
41+
path: |
42+
.nuke/temp
43+
~/.nuget/packages
44+
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
45+
- name: 'Run: Test'
46+
run: ./build.cmd Test
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# ------------------------------------------------------------------------------
2+
# <auto-generated>
3+
#
4+
# This code was generated.
5+
#
6+
# - To turn off auto-generation set:
7+
#
8+
# [GithubActionsExtended (AutoGenerate = false)]
9+
#
10+
# - To trigger manual generation invoke:
11+
#
12+
# nuke --generate-configuration GitHubActions_Manual_Nuget_Push --host GitHubActions
13+
#
14+
# </auto-generated>
15+
# ------------------------------------------------------------------------------
16+
17+
name: Manual_Nuget_Push
18+
19+
on: [workflow_dispatch]
20+
21+
jobs:
22+
ubuntu-latest:
23+
name: ubuntu-latest
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/setup-dotnet@v4
27+
with:
28+
dotnet-version: |
29+
8.0
30+
9.0
31+
- uses: actions/checkout@v4
32+
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
33+
uses: actions/cache@v4
34+
with:
35+
path: |
36+
.nuke/temp
37+
~/.nuget/packages
38+
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
39+
- name: 'Run: NugetPush'
40+
run: ./build.cmd NugetPush
41+
env:
42+
NugetApiKey: ${{ secrets.NUGET_API_KEY }}

.github/workflows/dotnet.yml

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

.github/workflows/publish_nuget.yml

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

.nuke/build.schema.json

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
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+
"Clean",
28+
"Compile",
29+
"NugetPack",
30+
"NugetPush",
31+
"Restore",
32+
"Test"
33+
]
34+
},
35+
"Verbosity": {
36+
"type": "string",
37+
"description": "",
38+
"enum": [
39+
"Verbose",
40+
"Normal",
41+
"Minimal",
42+
"Quiet"
43+
]
44+
},
45+
"NukeBuild": {
46+
"properties": {
47+
"Continue": {
48+
"type": "boolean",
49+
"description": "Indicates to continue a previously failed build attempt"
50+
},
51+
"Help": {
52+
"type": "boolean",
53+
"description": "Shows the help text for this build assembly"
54+
},
55+
"Host": {
56+
"description": "Host for execution. Default is 'automatic'",
57+
"$ref": "#/definitions/Host"
58+
},
59+
"NoLogo": {
60+
"type": "boolean",
61+
"description": "Disables displaying the NUKE logo"
62+
},
63+
"Partition": {
64+
"type": "string",
65+
"description": "Partition to use on CI"
66+
},
67+
"Plan": {
68+
"type": "boolean",
69+
"description": "Shows the execution plan (HTML)"
70+
},
71+
"Profile": {
72+
"type": "array",
73+
"description": "Defines the profiles to load",
74+
"items": {
75+
"type": "string"
76+
}
77+
},
78+
"Root": {
79+
"type": "string",
80+
"description": "Root directory during build execution"
81+
},
82+
"Skip": {
83+
"type": "array",
84+
"description": "List of targets to be skipped. Empty list skips all dependencies",
85+
"items": {
86+
"$ref": "#/definitions/ExecutableTarget"
87+
}
88+
},
89+
"Target": {
90+
"type": "array",
91+
"description": "List of targets to be invoked. Default is '{default_target}'",
92+
"items": {
93+
"$ref": "#/definitions/ExecutableTarget"
94+
}
95+
},
96+
"Verbosity": {
97+
"description": "Logging verbosity during build execution. Default is 'Normal'",
98+
"$ref": "#/definitions/Verbosity"
99+
}
100+
}
101+
}
102+
},
103+
"allOf": [
104+
{
105+
"properties": {
106+
"NugetApiKey": {
107+
"type": "string",
108+
"description": "Nuget Api Key",
109+
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
110+
},
111+
"Solution": {
112+
"type": "string",
113+
"description": "Path to a solution file that is automatically loaded"
114+
}
115+
}
116+
},
117+
{
118+
"$ref": "#/definitions/NukeBuild"
119+
}
120+
]
121+
}

.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": "JasperFx.Core.sln"
4+
}

Directory.Build.props

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

8-
<LangVersion>10.0</LangVersion>
8+
<LangVersion>12.0</LangVersion>
99
<Authors>Jeremy D. Miller;Babu Annamalai;Oskar Dudycz;Joona-Pekka Kokko</Authors>
1010
<DebugType>portable</DebugType>
1111

@@ -20,7 +20,5 @@
2020
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
2121
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
2222
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
23-
24-
<nullable>enable</nullable>
2523
</PropertyGroup>
2624
</Project>

JasperFx.Core.sln

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionIt
2222
Directory.Build.props = Directory.Build.props
2323
EndProjectSection
2424
EndProject
25+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{5F3F58F0-F24D-49CA-B359-707EF7320DC5}"
26+
EndProject
2527
Global
2628
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2729
Debug|Any CPU = Debug|Any CPU
@@ -31,6 +33,8 @@ Global
3133
HideSolutionNode = FALSE
3234
EndGlobalSection
3335
GlobalSection(ProjectConfigurationPlatforms) = postSolution
36+
{5F3F58F0-F24D-49CA-B359-707EF7320DC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37+
{5F3F58F0-F24D-49CA-B359-707EF7320DC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
3438
{971B26E7-7991-415B-8AF2-C67086F79B54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3539
{971B26E7-7991-415B-8AF2-C67086F79B54}.Debug|Any CPU.Build.0 = Debug|Any CPU
3640
{971B26E7-7991-415B-8AF2-C67086F79B54}.Release|Any CPU.ActiveCfg = Release|Any CPU

build.cmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:; set -eo pipefail
2+
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
3+
:; ${SCRIPT_DIR}/build.sh "$@"
4+
:; exit $?
5+
6+
@ECHO OFF
7+
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %*

0 commit comments

Comments
 (0)