Skip to content

Commit

Permalink
Merge pull request #20 from ChrisPulman/UpdateBuildConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPulman authored Sep 6, 2023
2 parents 62ac601 + 6864a18 commit 9d21c62
Show file tree
Hide file tree
Showing 97 changed files with 4,480 additions and 4,185 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
113 changes: 35 additions & 78 deletions .github/workflows/BuildOnly.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,40 @@
name: CrissCross CI-BuildOnly
# ------------------------------------------------------------------------------
# <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:
pull_request:
branches: [ "master" ]
push:
branches-ignore:
- main

jobs:
ci-build-and-test:

runs-on: windows-2022
outputs:
nbgv: ${{ steps.nbgv.outputs.SemVer2 }}
windows-latest:
name: windows-latest
runs-on: windows-latest
steps:
- name: Get Current Visual Studio Information
shell: bash
run: |
dotnet tool update -g dotnet-vs
echo "-- About RELEASE --"
vs where release
- name: Update Visual Studio Latest Release
shell: bash
run: |
echo "-- Update RELEASE --"
vs update release Enterprise
vs modify release Enterprise +mobile +desktop +uwp +web
echo "-- About RELEASE Updated --"
vs where release
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Install DotNet workloads
shell: bash
run: |
dotnet workload install android ios tvos macos maui maccatalyst
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1.3
with:
vs-prerelease: true

- name: NBGV
id: nbgv
uses: dotnet/nbgv@master
with:
setAllVars: true
- run: echo 'SemVer2=${{ steps.nbgv.outputs.SemVer2 }}'

- name: NuGet Restore
run: dotnet restore CrissCross.sln
working-directory: src

- name: Build
run: msbuild /t:build,pack /nowarn:MSB4011 /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=Release CrissCross.sln
working-directory: src

- name: Run Unit Tests and Generate Coverage
uses: glennawatson/coverlet-msbuild@v2.1
with:
project-files: 'src/**/*Tests*.csproj'
no-build: true
include-filter: 'CrissCross*'
output-format: cobertura
configuration: Release

- name: Upload Code Coverage
uses: codecov/codecov-action@v3

- name: Create NuGet Artifacts
uses: actions/upload-artifact@master
with:
name: nuget
path: '**/*.nupkg'
- 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
92 changes: 0 additions & 92 deletions .github/workflows/dotnet.yml

This file was deleted.

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"
]
}
}
}
}
}
4 changes: 4 additions & 0 deletions .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "./build.schema.json",
"Solution": "src/CrissCross.sln"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ or

Install-Package CrissCross.Avalonia

COMING SOON
or

Install-Package CrissCross.WinForms

Expand Down
Loading

0 comments on commit 9d21c62

Please sign in to comment.