Skip to content

Commit

Permalink
Add CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman committed Aug 24, 2023
1 parent 0c888e7 commit 3881e9b
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 2 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/BuildDeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [GitHubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_BuildDeploy --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: BuildDeploy

on:
push:
branches:
- main

jobs:
windows-latest:
name: windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
- name: 'Run: Compile, Deploy'
run: ./build.cmd Compile Deploy
env:
NuGetApiKey: ${{ secrets.NUGET_API_KEY }}
- name: 'Publish: output'
uses: actions/upload-artifact@v3
with:
name: output
path: output
40 changes: 40 additions & 0 deletions .github/workflows/BuildOnly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [GitHubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_BuildOnly --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: BuildOnly

on:
push:
branches-ignore:
- main

jobs:
windows-latest:
name: windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
- name: 'Run: Compile'
run: ./build.cmd Compile
120 changes: 120 additions & 0 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
"properties": {
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"Help": {
"type": "boolean",
"description": "Shows the help text for this build assembly"
},
"Host": {
"type": "string",
"description": "Host for execution. Default is 'automatic'",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"NoLogo": {
"type": "boolean",
"description": "Disables displaying the NUKE logo"
},
"NuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"Partition": {
"type": "string",
"description": "Partition to use on CI"
},
"Plan": {
"type": "boolean",
"description": "Shows the execution plan (HTML)"
},
"Profile": {
"type": "array",
"description": "Defines the profiles to load",
"items": {
"type": "string"
}
},
"Root": {
"type": "string",
"description": "Root directory during build execution"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Deploy",
"Pack",
"Print",
"Restore"
]
}
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
},
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
"items": {
"type": "string",
"enum": [
"Clean",
"Compile",
"Deploy",
"Pack",
"Print",
"Restore"
]
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
]
}
}
}
}
}
2 changes: 0 additions & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ partial class Build : NukeBuild
.Executes(() =>
{
DotNetRestore(s => s.SetProjectFile(Solution));
Solution.RestoreSolutionWorkloads();
});

Target Compile => _ => _
Expand Down

0 comments on commit 3881e9b

Please sign in to comment.