Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
[PublicAPI]
[UnsetVisualStudioEnvironmentVariables]
[PackageIcon("http://www.omnisharp.net/images/logo.png")]
[EnsureReadmeIsUpdated]
[DotNetVerbosityMapping]
[MSBuildVerbosityMapping]
[NuGetVerbosityMapping]
Expand All @@ -25,7 +24,6 @@
ICanBuildWithDotNetCore,
ICanTestWithDotNetCore,
ICanPackWithDotNetCore,
IHaveDataCollector,
ICanClean,
ICanUpdateReadme,
IGenerateCodeCoverageReport,
Expand All @@ -51,19 +49,19 @@
.DependsOn(Test)
.DependsOn(Pack);

public Target Build => _ => _.Inherit<ICanBuildWithDotNetCore>(x => x.CoreBuild);
public Target Build => _ => _.Inherit<ICanBuildWithDotNetCore>(x => x.DotnetCoreBuild);

public Target Pack => _ => _.Inherit<ICanPackWithDotNetCore>(x => x.CorePack)
public Target Pack => _ => _.Inherit<ICanPackWithDotNetCore>(x => x.DotnetCorePack)
.DependsOn(Clean);

[ComputedGitVersion] public GitVersion GitVersion { get; } = null!;

public Target Clean => _ => _.Inherit<ICanClean>(x => x.Clean);
public Target Restore => _ => _.Inherit<ICanRestoreWithDotNetCore>(x => x.CoreRestore);
public Target Clean => _ => _.Inherit<ICanClean>(x => x.CleanWellKnownTemporaryFiles);
public Target Restore => _ => _.Inherit<ICanRestoreWithDotNetCore>(x => x.DotnetCoreRestore);

public Target Test => _ => _.Inherit<ICanTestWithDotNetCore>(x => x.CoreTest);
public Target Test => _ => _.Inherit<ICanTestWithDotNetCore>(x => x.DotnetCoreTest);

public Target NpmInstall => _ => _

Check warning on line 64 in .build/Build.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Member 'NpmInstall' does not access instance data and can be marked as static (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822)

Check warning on line 64 in .build/Build.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Member 'NpmInstall' does not access instance data and can be marked as static (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822)

Check warning on line 64 in .build/Build.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Member 'NpmInstall' does not access instance data and can be marked as static (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822)
.Executes(() =>
NpmTasks.NpmCi(s => s
.SetProcessWorkingDirectory(VscodeTestExtensionProjectDirectory)));
Expand All @@ -79,6 +77,8 @@
.Before(Default)
.Before(Clean);

public Target Docs => _ => _.Inherit<IGenerateDocFx>(x => x.GenerateDocFx);

[Parameter("Configuration to build")] public Configuration Configuration { get; } = IsLocalBuild ? Configuration.Debug : Configuration.Release;

AbsolutePath ICanUpdateReadme.ReadmeFilePath => RootDirectory / "README.md";
Expand Down
3 changes: 1 addition & 2 deletions .build/Solution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Build;

internal class LocalConstants

Check warning on line 9 in .build/Solution.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Type 'LocalConstants' can be sealed because it has no subtypes in its containing assembly and is not externally visible (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1852)

Check warning on line 9 in .build/Solution.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

Type 'LocalConstants' can be sealed because it has no subtypes in its containing assembly and is not externally visible (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1852)

Check warning on line 9 in .build/Solution.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

Type 'LocalConstants' can be sealed because it has no subtypes in its containing assembly and is not externally visible (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1852)
{
public static string[] PathsIgnore => new[]
{
Expand Down Expand Up @@ -56,7 +56,7 @@
NonEntryTargets = new[]
{
nameof(ICIEnvironment.CIEnvironment),
nameof(ITriggerCodeCoverageReports.TriggerCodeCoverageReports),
nameof(ITriggerCodeCoverageReports.CollectCodeCoverage),
nameof(ITriggerCodeCoverageReports.GenerateCodeCoverageReportCobertura),
nameof(IGenerateCodeCoverageBadges.GenerateCodeCoverageBadges),
nameof(IGenerateCodeCoverageReport.GenerateCodeCoverageReport),
Expand Down Expand Up @@ -96,7 +96,6 @@
{
configuration
.ExcludeRepositoryConfigurationFiles()
.AddNugetPublish()
.Jobs.OfType<RocketSurgeonsGithubActionsJob>()
.First(z => z.Name.Equals("Build", StringComparison.OrdinalIgnoreCase))
.ConfigureStep<CheckoutStep>(step => step.FetchDepth = 0)
Expand All @@ -111,7 +110,7 @@
}
}

public static class Extensions

Check warning on line 113 in .build/Solution.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The type name Extensions conflicts in whole or in part with the namespace name 'Azure.Core.Extensions'. Change either name to eliminate the conflict. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1724)

Check warning on line 113 in .build/Solution.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The type name Extensions conflicts in whole or in part with the namespace name 'Azure.Core.Extensions'. Change either name to eliminate the conflict. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1724)

Check warning on line 113 in .build/Solution.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

The type name Extensions conflicts in whole or in part with the namespace name 'Azure.Core.Extensions'. Change either name to eliminate the conflict. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1724)
{
public static RocketSurgeonsGithubActionsJob AddVscodeExtensionTests(this RocketSurgeonsGithubActionsJob job)
{
Expand Down
7 changes: 7 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
"jb"
],
"rollForward": false
},
"dotnet-coverage": {
"version": "18.8.0",
"commands": [
"dotnet-coverage"
],
"rollForward": false
}
}
}
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,25 +107,25 @@ jobs:
- name: 🎁 Restore
id: restore
run: |
dotnet nuke Restore --skip
dotnet nuke --target DotnetCoreRestore Restore
- name: Update NuGet Cache
if: always() && steps.restore-nuget-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v6
with:
key: "${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}-${{ hashFiles('**/dotnet-tools.json') }}"
path: '${{ github.workspace }}/.nuget/packages'
- name: ⚙ Build
- name: ⚙ Build
id: build
run: |
dotnet nuke Build --skip
- name: 🚦 Test
dotnet .build/bin/Debug/.build.dll --target DotnetCoreBuild Build
- name: 💨 Test
id: test
run: |
dotnet nuke Test TriggerCodeCoverageReports GenerateCodeCoverageReportCobertura GenerateCodeCoverageBadges GenerateCodeCoverageSummary GenerateCodeCoverageReport --skip
dotnet .build/bin/Debug/.build.dll --target DotnetCoreTest Test CollectCodeCoverage GenerateCodeCoverageReportCobertura GenerateCodeCoverageBadges GenerateCodeCoverageSummary GenerateCodeCoverageReport
- name: 📦 Pack
id: pack
run: |
dotnet nuke Pack --skip
dotnet .build/bin/Debug/.build.dll --target DotnetCorePack Pack --skip Build
- name: Npm install
working-directory: vscode-testextension
run: |
Expand Down
208 changes: 98 additions & 110 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,77 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
"Host": {
"type": "string",
"enum": [
"AppVeyor",
"AzurePipelines",
"Bamboo",
"Bitbucket",
"Bitrise",
"GitHubActions",
"GitLab",
"Jenkins",
"Rider",
"SpaceAutomation",
"TeamCity",
"Terminal",
"TravisCI",
"VisualStudio",
"VSCode"
]
},
"ExecutableTarget": {
"type": "string",
"enum": [
"Build",
"BuildVersion",
"Clean",
"CleanWellKnownTemporaryFiles",
"CollectCodeCoverage",
"Default",
"Docs",
"DotnetCoreBuild",
"DotnetCorePack",
"DotnetCoreRestore",
"DotnetCoreTest",
"DotnetToolRestore",
"GenerateCodeCoverageBadges",
"GenerateCodeCoverageReport",
"GenerateCodeCoverageReportCobertura",
"GenerateCodeCoverageSummary",
"GenerateDocFx",
"GenerateReadme",
"NpmInstall",
"Pack",
"Restore",
"Test",
"TestVscodeExtension"
]
},
"Verbosity": {
"type": "string",
"description": "",
"enum": [
"Verbose",
"Normal",
"Minimal",
"Quiet"
]
},
"NukeBuild": {
"properties": {
"Artifacts": {
"type": "string",
"description": "The directory where artifacts are to be dropped"
},
"Configuration": {
"type": "string",
"description": "Configuration to build",
"enum": [
"Debug",
"Release"
]
},
"Continue": {
"type": "boolean",
"description": "Indicates to continue a previously failed build attempt"
},
"Coverage": {
"type": "string",
"description": "The directory where coverage artifacts are to be dropped"
},
"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"
]
"$ref": "#/definitions/Host"
},
"NoLogo": {
"type": "boolean",
Expand All @@ -74,95 +96,61 @@
"type": "string",
"description": "Root directory during build execution"
},
"Serve": {
"type": "boolean",
"description": "serve the docs"
},
"Skip": {
"type": "array",
"description": "List of targets to be skipped. Empty list skips all dependencies",
"items": {
"type": "string",
"enum": [
"Build",
"BuildVersion",
"Clean",
"CoreBuild",
"CoreDocs",
"CorePack",
"CoreRestore",
"CoreTest",
"Default",
"DotnetToolRestore",
"Generate_Code_Coverage_Badges",
"Generate_Code_Coverage_Report",
"Generate_Code_Coverage_Report_Cobertura",
"Generate_Code_Coverage_Summary",
"GenerateCodeCoverageBadges",
"GenerateCodeCoverageReport",
"GenerateCodeCoverageReportCobertura",
"GenerateCodeCoverageSummary",
"GenerateReadme",
"NpmInstall",
"Pack",
"Restore",
"Test",
"TestVscodeTestExtension",
"Trigger_Code_Coverage_Reports",
"TriggerCodeCoverageReports"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"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": [
"Build",
"BuildVersion",
"Clean",
"CoreBuild",
"CoreDocs",
"CorePack",
"CoreRestore",
"CoreTest",
"Default",
"DotnetToolRestore",
"Generate_Code_Coverage_Badges",
"Generate_Code_Coverage_Report",
"Generate_Code_Coverage_Report_Cobertura",
"Generate_Code_Coverage_Summary",
"GenerateCodeCoverageBadges",
"GenerateCodeCoverageReport",
"GenerateCodeCoverageReportCobertura",
"GenerateCodeCoverageSummary",
"GenerateReadme",
"NpmInstall",
"Pack",
"Restore",
"Test",
"TestVscodeTestExtension",
"Trigger_Code_Coverage_Reports",
"TriggerCodeCoverageReports"
]
"$ref": "#/definitions/ExecutableTarget"
}
},
"Verbosity": {
"type": "string",
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
}
}
}
},
"allOf": [
{
"properties": {
"Artifacts": {
"type": "string",
"description": "The directory where artifacts are to be dropped"
},
"Configuration": {
"type": "string",
"description": "Configuration to build",
"enum": [
"Minimal",
"Normal",
"Quiet",
"Verbose"
"Debug",
"Release"
]
},
"Coverage": {
"type": "string",
"description": "The directory where coverage artifacts are to be dropped"
},
"Serve": {
"type": [
"boolean",
"null"
],
"description": "serve the docs"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
}
]
}
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<PackageVersion Include="GitVersion.Tool" Version="6.7.0" />
<PackageVersion Include="JetBrains.ReSharper.CommandLineTools" Version="2025.2.6" />
<PackageVersion Include="ReportGenerator" Version="5.5.10" />
<PackageVersion Include="Rocket.Surgery.Nuke" Version="1.8.36" />
<PackageVersion Include="Rocket.Surgery.Nuke" Version="2.9.12" />
</ItemGroup>
<ItemGroup>
<!-- backwards compat is maintained in Directory.Packages.supports.props -->
Expand Down
Loading
Loading