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
43 changes: 42 additions & 1 deletion .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: SetupBuildInfo
id: SetupBuildInfo
run: dotnet run --project _atom/_atom.csproj -- SetupBuildInfo --skip --headless
Expand Down Expand Up @@ -57,6 +62,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: Pack
id: Pack
run: dotnet run --project _atom/_atom.csproj -- Pack --skip --headless
Expand All @@ -72,6 +82,9 @@ jobs:

TestProjects:
runs-on: ubuntu-latest
strategy:
matrix:
test-framework: [ net10.0, net11.0 ]
steps:

- name: Checkout
Expand All @@ -84,14 +97,22 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: TestProjects
id: TestProjects
run: dotnet run --project _atom/_atom.csproj -- TestProjects --skip --headless
env:
test-framework: ${{ matrix.test-framework }}
build-slice: ${{ matrix.test-framework }}

- name: Store Invex.Tools.ArtifactClean.Tests
uses: actions/upload-artifact@v7
with:
name: Invex.Tools.ArtifactClean.Tests
name: 'Invex.Tools.ArtifactClean.Tests-${{ matrix.test-framework }}'
path: '${{ github.workspace }}/.github/publish/Invex.Tools.ArtifactClean.Tests'

PushToNuget:
Expand All @@ -109,6 +130,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: Retrieve Invex.Tools.ArtifactClean
uses: actions/download-artifact@v8
with:
Expand Down Expand Up @@ -169,6 +195,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: Retrieve Invex.Tools.ArtifactClean
uses: actions/download-artifact@v8
with:
Expand Down Expand Up @@ -226,6 +257,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: BuildDocs
id: BuildDocs
run: dotnet run --project _atom/_atom.csproj -- BuildDocs --skip --headless
Expand Down Expand Up @@ -254,6 +290,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: Retrieve GeneratedDocs
uses: actions/download-artifact@v8
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/Cleanup Prereleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: UnlistOldPrereleases
id: UnlistOldPrereleases
run: dotnet run --project _atom/_atom.csproj -- UnlistOldPrereleases --skip --headless
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/Dependabot Enable auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: ApproveDependabotPr
id: ApproveDependabotPr
run: dotnet run --project _atom/_atom.csproj -- ApproveDependabotPr --skip --headless
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/Validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: SetupBuildInfo
id: SetupBuildInfo
run: dotnet run --project _atom/_atom.csproj -- SetupBuildInfo --skip --headless
Expand Down Expand Up @@ -55,6 +60,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: Pack
id: Pack
run: dotnet run --project _atom/_atom.csproj -- Pack --skip --headless
Expand All @@ -64,6 +74,9 @@ jobs:

TestProjects:
runs-on: ubuntu-latest
strategy:
matrix:
test-framework: [ net10.0, net11.0 ]
steps:

- name: Checkout
Expand All @@ -76,9 +89,17 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: TestProjects
id: TestProjects
run: dotnet run --project _atom/_atom.csproj -- TestProjects --skip --headless
env:
test-framework: ${{ matrix.test-framework }}
build-slice: ${{ matrix.test-framework }}

WaitForCopilotReview:
runs-on: ubuntu-latest
Expand All @@ -94,6 +115,11 @@ jobs:
with:
dotnet-version: 10.0.x

- name: Setup .NET 11.0.x
uses: actions/setup-dotnet@v5
with:
dotnet-version: 11.0.x

- name: WaitForCopilotReview
id: WaitForCopilotReview
run: dotnet run --project _atom/_atom.csproj -- WaitForCopilotReview --skip --headless
Expand Down
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ used for CI, packaging, releases, and documentation publishing.

The solution is `Invex.Tools.slnx` and contains the ArtifactClean project, its
NUnit test project under `tests/Invex.Tools.ArtifactClean.Tests`, and the
`_atom` build project.
`_atom` build project. The tool targets `net10.0` only, because a second target framework collides with the
Native AOT tool packages (NU5118); the test project targets `net10.0` and `net11.0`.

## Build, test, and cleanup

Expand All @@ -27,7 +28,7 @@ dotnet build Invex.Tools.slnx --configuration Release --no-restore
```

Run the tests with `dotnet test Invex.Tools.slnx` and keep the build
warning-free. CI runs them on `net10.0` through the Atom `TestProjects`
warning-free. CI runs them on `net10.0` and `net11.0` through the Atom `TestProjects`
target:

```shell
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<EnablePackageValidation>true</EnablePackageValidation>
<PublishRepositoryUrl>true</PublishRepositoryUrl>

<LangVersion>14</LangVersion>
<LangVersion>15</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Full documentation: [https://invex-games.github.io/tools/](https://invex-games.g

## Development

The repository requires the .NET 10 SDK (see `global.json`).
The repository requires the .NET 11 SDK (see `global.json`), plus the .NET 10 runtime (or SDK) for the `net10.0` projects. Tests run on `net10.0` and `net11.0`.

```shell
dotnet build Invex.Tools.slnx
Expand Down
26 changes: 25 additions & 1 deletion _atom/IBuild.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ internal interface IBuild : IWorkflowBuildDefinition,

static readonly string[] ProjectsToTest = [Projects.Invex_Tools_ArtifactClean_Tests.Name];

static readonly string[] TestFrameworkNames =
[
WorkflowLabels.Dotnet.Framework.Net_10_0,
WorkflowLabels.Dotnet.Framework.Net_11_0,
];

[ParamDefinition("test-framework", "Test framework to use for unit tests")]
string TestFramework => GetParam(() => TestFramework, "net10.0");

Expand Down Expand Up @@ -220,6 +226,8 @@ await UnlistPrereleasesBelowVersionForPackages(NugetFeed,
BuildOptions.GitVersion.ProvideBuildId,
BuildOptions.GitVersion.ProvideBuildVersion,
BuildOptions.Steps.SetupDotnet.Dotnet100X(),
// .NET 11 SDK. The .NET 10 step above still provides the runtime for net10.0 tests.
BuildOptions.Steps.SetupDotnet.Dotnet110X(),
];

IReadOnlyList<WorkflowDefinition> IWorkflowBuildDefinition.Workflows =>
Expand All @@ -243,6 +251,13 @@ await UnlistPrereleasesBelowVersionForPackages(NugetFeed,
},
new(nameof(TestProjects))
{
MatrixDimensions =
[
new(nameof(TestFramework))
{
Values = [..TestFrameworkNames],
},
],
Options = [BuildOptions.Target.SuppressArtifactPublishing],
},
new(nameof(WaitForCopilotReview))
Expand Down Expand Up @@ -281,7 +296,16 @@ await UnlistPrereleasesBelowVersionForPackages(NugetFeed,
},
],
},
new(nameof(TestProjects)),
new(nameof(TestProjects))
{
MatrixDimensions =
[
new(nameof(TestFramework))
{
Values = [..TestFrameworkNames],
},
],
},
new(nameof(PushToNuget))
{
Options = [BuildOptions.Inject.Secret(nameof(NugetApiKey))],
Expand Down
4 changes: 2 additions & 2 deletions _atom/_atom.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<!-- Packages-->
<ItemGroup>
<PackageReference Include="Invex.Atom.Module.GitHubWorkflows" Version="5.0.0" />
<PackageReference Include="Invex.Atom.Module.GitVersion" Version="5.0.0" />
<PackageReference Include="Invex.Atom.Module.GitHubWorkflows" Version="5.2.0" />
<PackageReference Include="Invex.Atom.Module.GitVersion" Version="5.2.0" />
<PackageReference Include="Invex.RepoUtils.Atom.Module" Version="3.0.0" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "10.0.403",
"rollForward": "latestMajor",
"version": "11.0.100",
"rollForward": "latestMinor",
Comment thread
DecSmith42 marked this conversation as resolved.
Resolved
"allowPrerelease": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
<StripSymbols>true</StripSymbols>
<PackAsTool>true</PackAsTool>
<ToolCommandName>artclean</ToolCommandName>
<!--
Single target on purpose. A RID-specific (Native AOT) tool package stores its files under tools/any/<rid>, with
no framework folder, and so does the framework-dependent tools/any/any package. A second target framework
therefore collides when packing (NU5118). The AOT binaries are self-contained either way.
Invex.Tools.ArtifactClean.Tests still runs the tool's code on both net10.0 and net11.0.
-->
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Loading