diff --git a/.devops/workflows/Test_Devops_Build.yml b/.devops/workflows/Test_Devops_Build.yml index 9cb22f54..6ffed4c0 100644 --- a/.devops/workflows/Test_Devops_Build.yml +++ b/.devops/workflows/Test_Devops_Build.yml @@ -277,12 +277,30 @@ jobs: artifact: DecSm.Atom.Tool-windows-latest path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" + - task: DownloadPipelineArtifact@2 + displayName: DecSm.Atom.Tool + inputs: + artifact: DecSm.Atom.Tool-windows-11-arm + path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" + - task: DownloadPipelineArtifact@2 displayName: DecSm.Atom.Tool inputs: artifact: DecSm.Atom.Tool-ubuntu-latest path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" + - task: DownloadPipelineArtifact@2 + displayName: DecSm.Atom.Tool + inputs: + artifact: DecSm.Atom.Tool-ubuntu-24.04-arm + path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" + + - task: DownloadPipelineArtifact@2 + displayName: DecSm.Atom.Tool + inputs: + artifact: DecSm.Atom.Tool-macos-15-intel + path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" + - task: DownloadPipelineArtifact@2 displayName: DecSm.Atom.Tool inputs: diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 85e33ca8..b0aa0340 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -96,7 +96,7 @@ jobs: PackTool: strategy: matrix: - job-runs-on: [ windows-latest, ubuntu-latest, macos-latest ] + job-runs-on: [ windows-latest, windows-11-arm, ubuntu-latest, ubuntu-24.04-arm, macos-15-intel, macos-latest ] runs-on: ${{ matrix.job-runs-on }} steps: @@ -124,7 +124,7 @@ jobs: TestProjects: strategy: matrix: - job-runs-on: [ windows-latest, ubuntu-latest, macos-latest ] + job-runs-on: [ windows-latest, windows-11-arm, ubuntu-latest, ubuntu-24.04-arm, macos-15-intel, macos-latest ] test-framework: [ net8.0, net9.0, net10.0 ] runs-on: ${{ matrix.job-runs-on }} steps: @@ -248,12 +248,30 @@ jobs: name: DecSm.Atom.Tool-windows-latest path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool" + - name: Download DecSm.Atom.Tool + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool-windows-11-arm + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool" + - name: Download DecSm.Atom.Tool uses: actions/download-artifact@v4 with: name: DecSm.Atom.Tool-ubuntu-latest path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool" + - name: Download DecSm.Atom.Tool + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool-ubuntu-24.04-arm + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool" + + - name: Download DecSm.Atom.Tool + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool-macos-15-intel + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool" + - name: Download DecSm.Atom.Tool uses: actions/download-artifact@v4 with: @@ -334,12 +352,30 @@ jobs: name: DecSm.Atom.Tool-windows-latest path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool" + - name: Download DecSm.Atom.Tool + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool-windows-11-arm + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool" + - name: Download DecSm.Atom.Tool uses: actions/download-artifact@v4 with: name: DecSm.Atom.Tool-ubuntu-latest path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool" + - name: Download DecSm.Atom.Tool + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool-ubuntu-24.04-arm + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool" + + - name: Download DecSm.Atom.Tool + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool-macos-15-intel + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool" + - name: Download DecSm.Atom.Tool uses: actions/download-artifact@v4 with: @@ -364,6 +400,24 @@ jobs: name: DecSm.Atom.Tests-windows-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + - name: Download DecSm.Atom.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tests-windows-11-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + + - name: Download DecSm.Atom.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tests-windows-11-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + + - name: Download DecSm.Atom.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tests-windows-11-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + - name: Download DecSm.Atom.Tests uses: actions/download-artifact@v4 with: @@ -382,6 +436,42 @@ jobs: name: DecSm.Atom.Tests-ubuntu-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + - name: Download DecSm.Atom.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tests-ubuntu-24.04-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + + - name: Download DecSm.Atom.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tests-ubuntu-24.04-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + + - name: Download DecSm.Atom.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tests-ubuntu-24.04-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + + - name: Download DecSm.Atom.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tests-macos-15-intel-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + + - name: Download DecSm.Atom.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tests-macos-15-intel-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + + - name: Download DecSm.Atom.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tests-macos-15-intel-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tests" + - name: Download DecSm.Atom.Tests uses: actions/download-artifact@v4 with: @@ -418,6 +508,24 @@ jobs: name: DecSm.Atom.Analyzers.Tests-windows-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + - name: Download DecSm.Atom.Analyzers.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Analyzers.Tests-windows-11-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + + - name: Download DecSm.Atom.Analyzers.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Analyzers.Tests-windows-11-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + + - name: Download DecSm.Atom.Analyzers.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Analyzers.Tests-windows-11-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + - name: Download DecSm.Atom.Analyzers.Tests uses: actions/download-artifact@v4 with: @@ -436,6 +544,42 @@ jobs: name: DecSm.Atom.Analyzers.Tests-ubuntu-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + - name: Download DecSm.Atom.Analyzers.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Analyzers.Tests-ubuntu-24.04-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + + - name: Download DecSm.Atom.Analyzers.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Analyzers.Tests-ubuntu-24.04-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + + - name: Download DecSm.Atom.Analyzers.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Analyzers.Tests-ubuntu-24.04-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + + - name: Download DecSm.Atom.Analyzers.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Analyzers.Tests-macos-15-intel-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + + - name: Download DecSm.Atom.Analyzers.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Analyzers.Tests-macos-15-intel-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + + - name: Download DecSm.Atom.Analyzers.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Analyzers.Tests-macos-15-intel-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Analyzers.Tests" + - name: Download DecSm.Atom.Analyzers.Tests uses: actions/download-artifact@v4 with: @@ -472,6 +616,24 @@ jobs: name: DecSm.Atom.SourceGenerators.Tests-windows-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + - name: Download DecSm.Atom.SourceGenerators.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.SourceGenerators.Tests-windows-11-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + + - name: Download DecSm.Atom.SourceGenerators.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.SourceGenerators.Tests-windows-11-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + + - name: Download DecSm.Atom.SourceGenerators.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.SourceGenerators.Tests-windows-11-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + - name: Download DecSm.Atom.SourceGenerators.Tests uses: actions/download-artifact@v4 with: @@ -490,6 +652,42 @@ jobs: name: DecSm.Atom.SourceGenerators.Tests-ubuntu-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + - name: Download DecSm.Atom.SourceGenerators.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.SourceGenerators.Tests-ubuntu-24.04-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + + - name: Download DecSm.Atom.SourceGenerators.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.SourceGenerators.Tests-ubuntu-24.04-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + + - name: Download DecSm.Atom.SourceGenerators.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.SourceGenerators.Tests-ubuntu-24.04-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + + - name: Download DecSm.Atom.SourceGenerators.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.SourceGenerators.Tests-macos-15-intel-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + + - name: Download DecSm.Atom.SourceGenerators.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.SourceGenerators.Tests-macos-15-intel-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + + - name: Download DecSm.Atom.SourceGenerators.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.SourceGenerators.Tests-macos-15-intel-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.SourceGenerators.Tests" + - name: Download DecSm.Atom.SourceGenerators.Tests uses: actions/download-artifact@v4 with: @@ -526,6 +724,24 @@ jobs: name: DecSm.Atom.Module.DevopsWorkflows.Tests-windows-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.DevopsWorkflows.Tests-windows-11-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.DevopsWorkflows.Tests-windows-11-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.DevopsWorkflows.Tests-windows-11-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests uses: actions/download-artifact@v4 with: @@ -544,6 +760,42 @@ jobs: name: DecSm.Atom.Module.DevopsWorkflows.Tests-ubuntu-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.DevopsWorkflows.Tests-ubuntu-24.04-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.DevopsWorkflows.Tests-ubuntu-24.04-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.DevopsWorkflows.Tests-ubuntu-24.04-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.DevopsWorkflows.Tests-macos-15-intel-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.DevopsWorkflows.Tests-macos-15-intel-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.DevopsWorkflows.Tests-macos-15-intel-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.DevopsWorkflows.Tests" + - name: Download DecSm.Atom.Module.DevopsWorkflows.Tests uses: actions/download-artifact@v4 with: @@ -580,6 +832,24 @@ jobs: name: DecSm.Atom.Module.GithubWorkflows.Tests-windows-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.GithubWorkflows.Tests-windows-11-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.GithubWorkflows.Tests-windows-11-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.GithubWorkflows.Tests-windows-11-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests uses: actions/download-artifact@v4 with: @@ -598,6 +868,42 @@ jobs: name: DecSm.Atom.Module.GithubWorkflows.Tests-ubuntu-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.GithubWorkflows.Tests-ubuntu-24.04-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.GithubWorkflows.Tests-ubuntu-24.04-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.GithubWorkflows.Tests-ubuntu-24.04-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.GithubWorkflows.Tests-macos-15-intel-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.GithubWorkflows.Tests-macos-15-intel-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Module.GithubWorkflows.Tests-macos-15-intel-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Module.GithubWorkflows.Tests" + - name: Download DecSm.Atom.Module.GithubWorkflows.Tests uses: actions/download-artifact@v4 with: @@ -634,6 +940,24 @@ jobs: name: DecSm.Atom.Tool.Tests-windows-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + - name: Download DecSm.Atom.Tool.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool.Tests-windows-11-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + + - name: Download DecSm.Atom.Tool.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool.Tests-windows-11-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + + - name: Download DecSm.Atom.Tool.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool.Tests-windows-11-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + - name: Download DecSm.Atom.Tool.Tests uses: actions/download-artifact@v4 with: @@ -652,6 +976,42 @@ jobs: name: DecSm.Atom.Tool.Tests-ubuntu-latest-net10.0 path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + - name: Download DecSm.Atom.Tool.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool.Tests-ubuntu-24.04-arm-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + + - name: Download DecSm.Atom.Tool.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool.Tests-ubuntu-24.04-arm-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + + - name: Download DecSm.Atom.Tool.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool.Tests-ubuntu-24.04-arm-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + + - name: Download DecSm.Atom.Tool.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool.Tests-macos-15-intel-net8.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + + - name: Download DecSm.Atom.Tool.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool.Tests-macos-15-intel-net9.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + + - name: Download DecSm.Atom.Tool.Tests + uses: actions/download-artifact@v4 + with: + name: DecSm.Atom.Tool.Tests-macos-15-intel-net10.0 + path: "${{ github.workspace }}/.github/artifacts/DecSm.Atom.Tool.Tests" + - name: Download DecSm.Atom.Tool.Tests uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/Validate.yml b/.github/workflows/Validate.yml index 809b7581..2f972bdb 100644 --- a/.github/workflows/Validate.yml +++ b/.github/workflows/Validate.yml @@ -49,7 +49,7 @@ jobs: PackTool: strategy: matrix: - job-runs-on: [ windows-latest, ubuntu-latest, macos-latest ] + job-runs-on: [ windows-latest, windows-11-arm, ubuntu-latest, ubuntu-24.04-arm, macos-15-intel, macos-latest ] runs-on: ${{ matrix.job-runs-on }} steps: @@ -71,7 +71,7 @@ jobs: TestProjects: strategy: matrix: - job-runs-on: [ windows-latest, ubuntu-latest, macos-latest ] + job-runs-on: [ windows-latest, windows-11-arm, ubuntu-latest, ubuntu-24.04-arm, macos-15-intel, macos-latest ] test-framework: [ net8.0, net9.0, net10.0 ] runs-on: ${{ matrix.job-runs-on }} steps: diff --git a/DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/GithubCustomStepBuild.cs b/DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/GithubCustomStepBuild.cs new file mode 100644 index 00000000..6d881a43 --- /dev/null +++ b/DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/GithubCustomStepBuild.cs @@ -0,0 +1,39 @@ +namespace DecSm.Atom.Module.GithubWorkflows.Tests.Workflows; + +public sealed record GithubTestStep(string Text, GithubCustomStepOrder Order, int Priority = 0) + : GithubCustomStepOption(Order, Priority) +{ + public override void WriteStep(GithubStepWriter writer) + { + using (writer.WriteSection("- name: Test step")) + writer.WriteLine($"run: echo \"{Text}\""); + } +} + +[BuildDefinition] +public partial class GithubCustomStepBuild : MinimalBuildDefinition, IGithubWorkflows, ICustomStepTarget +{ + public override IReadOnlyList Workflows => + [ + new("github-custom-step-workflow") + { + Triggers = [ManualTrigger.Empty], + Targets = [WorkflowTargets.CustomStepTarget], + Options = + [ + new GithubTestStep("Pre step 1", GithubCustomStepOrder.BeforeTarget, 1), + new GithubTestStep("Pre step 3", GithubCustomStepOrder.BeforeTarget, 3), + new GithubTestStep("Pre step 2", GithubCustomStepOrder.BeforeTarget, 2), + new GithubTestStep("Post step 3", GithubCustomStepOrder.AfterTarget, 3), + new GithubTestStep("Post step 1", GithubCustomStepOrder.AfterTarget, 1), + new GithubTestStep("Post step 2", GithubCustomStepOrder.AfterTarget, 2), + ], + WorkflowTypes = [Github.WorkflowType], + }, + ]; +} + +public interface ICustomStepTarget +{ + Target CustomStepTarget => t => t; +} diff --git a/DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.GithubCustomStepBuild_GeneratesWorkflow.verified.txt b/DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.GithubCustomStepBuild_GeneratesWorkflow.verified.txt new file mode 100644 index 00000000..ac7771c8 --- /dev/null +++ b/DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.GithubCustomStepBuild_GeneratesWorkflow.verified.txt @@ -0,0 +1,37 @@ +name: github-custom-step-workflow + +on: + workflow_dispatch: + +jobs: + + CustomStepTarget: + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Test step + run: echo "Pre step 1" + + - name: Test step + run: echo "Pre step 2" + + - name: Test step + run: echo "Pre step 3" + + - name: CustomStepTarget + id: CustomStepTarget + run: dotnet run --project AtomTest/AtomTest.csproj CustomStepTarget --skip --headless + + - name: Test step + run: echo "Post step 1" + + - name: Test step + run: echo "Post step 2" + + - name: Test step + run: echo "Post step 3" diff --git a/DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.cs b/DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.cs index 0cd85925..7af210ff 100644 --- a/DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.cs +++ b/DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.cs @@ -411,4 +411,29 @@ public async Task PermissionsBuild_GeneratesWorkflow() await Verify(workflow); await TestContext.Out.WriteAsync(workflow); } + + [Test] + public async Task GithubCustomStepBuild_GeneratesWorkflow() + { + // Arrange + var fileSystem = FileSystemUtils.DefaultMockFileSystem; + + var build = CreateTestHost(fileSystem: fileSystem, + commandLineArgs: new(true, [new GenArg()])); + + // Act + await build.RunAsync(); + + // Assert + fileSystem + .DirectoryInfo + .New(WorkflowDir) + .Exists + .ShouldBeTrue(); + + var workflow = await fileSystem.File.ReadAllTextAsync($"{WorkflowDir}github-custom-step-workflow.yml"); + + await Verify(workflow); + await TestContext.Out.WriteAsync(workflow); + } } diff --git a/DecSm.Atom.Module.GithubWorkflows/Generation/GithubStepWriter.cs b/DecSm.Atom.Module.GithubWorkflows/Generation/GithubStepWriter.cs new file mode 100644 index 00000000..f1f627e5 --- /dev/null +++ b/DecSm.Atom.Module.GithubWorkflows/Generation/GithubStepWriter.cs @@ -0,0 +1,45 @@ +namespace DecSm.Atom.Module.GithubWorkflows.Generation; + +[PublicAPI] +public sealed record GithubStepWriter(StringBuilder Builder, int BaseIndentLevel) +{ + private const int TabSize = 2; + private int _indentLevel = BaseIndentLevel; + + /// + /// Writes a line of text to the output with the current indentation. + /// + /// The text to write. If null, an empty line is written. + public void WriteLine(string? value = null) + { + if (_indentLevel > 0) + Builder.Append(new string(' ', _indentLevel)); + + Builder.AppendLine(value); + } + + /// + /// Writes a section header and returns a disposable scope that manages indentation for the section's content. + /// + /// The header text for the section. + /// A disposable object that decreases the indentation level upon disposal. + /// + /// + /// using (WriteSection("- checkout: self")) + /// WriteLine("fetchDepth: 0"); + /// + /// + public IDisposable WriteSection(string header) + { + WriteLine(header); + _indentLevel += TabSize; + + return new ActionScope(() => _indentLevel -= TabSize); + } + + public void ResetIndent() => + _indentLevel = BaseIndentLevel; + + public override string ToString() => + Builder.ToString(); +} diff --git a/DecSm.Atom.Module.GithubWorkflows/Generation/GithubWorkflowWriter.cs b/DecSm.Atom.Module.GithubWorkflows/Generation/GithubWorkflowWriter.cs index b4f57eb1..789d2bbc 100644 --- a/DecSm.Atom.Module.GithubWorkflows/Generation/GithubWorkflowWriter.cs +++ b/DecSm.Atom.Module.GithubWorkflows/Generation/GithubWorkflowWriter.cs @@ -492,6 +492,22 @@ private void WriteStep(WorkflowModel workflow, WorkflowStepModel step, WorkflowJ .DistinctBy(x => x.FeedName) .ToList(); + var syncAtomToolVersionToLibraryVersion = setupNugetSteps.Any(x => x.SyncAtomToolVersionToLibraryVersion); + var toolVersion = ""; + + if (syncAtomToolVersionToLibraryVersion) + { + if (SemVer.TryParse(typeof(AtomHost).Assembly + .GetCustomAttribute() + ?.InformationalVersion ?? + "", + out var semVer)) + toolVersion = semVer; + else + throw new InvalidOperationException( + "Failed to parse DecSm.Atom.Host assembly version as SemVer for syncing atom tool version"); + } + // If we know the SetupDotnet step was run for dotnet 10+, // then we can use the dotnet tool exec command instead of installing the tool to run it if (setupDotnetSteps.Any(x => @@ -502,8 +518,12 @@ private void WriteStep(WorkflowModel workflow, WorkflowStepModel step, WorkflowJ using (WriteSection("run: |")) { foreach (var feedToAdd in feedsToAdd) - WriteLine( - $"dotnet tool exec decsm.atom.tool -y -- nuget-add --name \"{feedToAdd.FeedName}\" --url \"{feedToAdd.FeedUrl}\""); + if (syncAtomToolVersionToLibraryVersion) + WriteLine( + $"dotnet tool exec decsm.atom.tool@{toolVersion} -y -- nuget-add --name \"{feedToAdd.FeedName}\" --url \"{feedToAdd.FeedUrl}\""); + else + WriteLine( + $"dotnet tool exec decsm.atom.tool -y -- nuget-add --name \"{feedToAdd.FeedName}\" --url \"{feedToAdd.FeedUrl}\""); } WriteLine("shell: bash"); @@ -664,6 +684,26 @@ private void WriteCommandStep( (string name, string value)[] extraParams, bool includeId) { + var customPreTargetSteps = workflowStep + .Options + .Concat(workflow.Options) + .OfType() + .Where(x => x.Order is GithubCustomStepOrder.BeforeTarget) + .OrderBy(x => x.Priority) + .ToList(); + + if (customPreTargetSteps.Count > 0) + { + var writer = new GithubStepWriter(StringBuilder, IndentLevel); + + foreach (var customPostStep in customPreTargetSteps) + { + customPostStep.WriteStep(writer); + writer.ResetIndent(); + WriteLine(); + } + } + using (WriteSection($"- name: {workflowStep.Name}")) { if (includeId) @@ -818,6 +858,26 @@ private void WriteCommandStep( WriteLine($"{key}: {value}"); } } + + var customPostTargetSteps = workflowStep + .Options + .Concat(workflow.Options) + .OfType() + .Where(x => x.Order is GithubCustomStepOrder.AfterTarget) + .OrderBy(x => x.Priority) + .ToList(); + + if (customPostTargetSteps.Count > 0) + { + var writer = new GithubStepWriter(StringBuilder, IndentLevel); + + foreach (var customPostStep in customPostTargetSteps) + { + WriteLine(); + customPostStep.WriteStep(writer); + writer.ResetIndent(); + } + } } private static string FindProjectPath(IAtomFileSystem fileSystem, string projectName) diff --git a/DecSm.Atom.Module.GithubWorkflows/Generation/Options/GithubCustomStepOption.cs b/DecSm.Atom.Module.GithubWorkflows/Generation/Options/GithubCustomStepOption.cs new file mode 100644 index 00000000..f5bb42cc --- /dev/null +++ b/DecSm.Atom.Module.GithubWorkflows/Generation/Options/GithubCustomStepOption.cs @@ -0,0 +1,7 @@ +namespace DecSm.Atom.Module.GithubWorkflows.Generation.Options; + +[PublicAPI] +public abstract record GithubCustomStepOption(GithubCustomStepOrder Order, int Priority = 0) : IGithubCustomStepOption +{ + public abstract void WriteStep(GithubStepWriter writer); +} diff --git a/DecSm.Atom.Module.GithubWorkflows/Generation/Options/GithubCustomStepOrder.cs b/DecSm.Atom.Module.GithubWorkflows/Generation/Options/GithubCustomStepOrder.cs new file mode 100644 index 00000000..41c5e36e --- /dev/null +++ b/DecSm.Atom.Module.GithubWorkflows/Generation/Options/GithubCustomStepOrder.cs @@ -0,0 +1,8 @@ +namespace DecSm.Atom.Module.GithubWorkflows.Generation.Options; + +[PublicAPI] +public enum GithubCustomStepOrder +{ + BeforeTarget, + AfterTarget, +} diff --git a/DecSm.Atom.Module.GithubWorkflows/Generation/Options/IGithubCustomStepOption.cs b/DecSm.Atom.Module.GithubWorkflows/Generation/Options/IGithubCustomStepOption.cs new file mode 100644 index 00000000..a897c74b --- /dev/null +++ b/DecSm.Atom.Module.GithubWorkflows/Generation/Options/IGithubCustomStepOption.cs @@ -0,0 +1,13 @@ +namespace DecSm.Atom.Module.GithubWorkflows.Generation.Options; + +[PublicAPI] +public interface IGithubCustomStepOption : IWorkflowOption +{ + bool IWorkflowOption.AllowMultiple => true; + + GithubCustomStepOrder Order { get; } + + int Priority { get; } + + void WriteStep(GithubStepWriter writer); +} diff --git a/DecSm.Atom.Module.GithubWorkflows/_usings.cs b/DecSm.Atom.Module.GithubWorkflows/_usings.cs index 769347b4..0c68523e 100644 --- a/DecSm.Atom.Module.GithubWorkflows/_usings.cs +++ b/DecSm.Atom.Module.GithubWorkflows/_usings.cs @@ -1,5 +1,6 @@ global using System.Globalization; global using System.IO.Compression; +global using System.Reflection; global using System.Text; global using DecSm.Atom.Artifacts; global using DecSm.Atom.Build; @@ -13,6 +14,7 @@ global using DecSm.Atom.Params; global using DecSm.Atom.Paths; global using DecSm.Atom.Reports; +global using DecSm.Atom.Util.Scope; global using DecSm.Atom.Variables; global using DecSm.Atom.Workflows.Definition; global using DecSm.Atom.Workflows.Definition.Options; diff --git a/DecSm.Atom.Tool/DecSm.Atom.Tool.csproj b/DecSm.Atom.Tool/DecSm.Atom.Tool.csproj index 97310ec3..864503aa 100644 --- a/DecSm.Atom.Tool/DecSm.Atom.Tool.csproj +++ b/DecSm.Atom.Tool/DecSm.Atom.Tool.csproj @@ -18,7 +18,7 @@ - win-x64;linux-x64;osx-arm64;any + win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64 true diff --git a/DecSm.Atom/Build/Definition/TargetDefinition.cs b/DecSm.Atom/Build/Definition/TargetDefinition.cs index 18954874..24318afb 100644 --- a/DecSm.Atom/Build/Definition/TargetDefinition.cs +++ b/DecSm.Atom/Build/Definition/TargetDefinition.cs @@ -298,6 +298,17 @@ public TargetDefinition ProducesArtifacts(IEnumerable artifactName, stri return this; } + /// + /// Clears all produced artifacts for the current target, ensuring it does not produce any artifacts. + /// + /// The current for fluent chaining. + public TargetDefinition ProducesNoArtifacts() + { + ProducedArtifacts.Clear(); + + return this; + } + /// /// Declares an artifact that this target consumes. /// @@ -366,6 +377,17 @@ public TargetDefinition ConsumesArtifacts( return this; } + /// + /// Clears all consumed artifacts for the current target, ensuring it does not depend on any external artifacts. + /// + /// The current for fluent chaining. + public TargetDefinition ConsumesNoArtifacts() + { + ConsumedArtifacts.Clear(); + + return this; + } + /// /// Declares a variable that this target produces. /// @@ -381,6 +403,17 @@ public TargetDefinition ProducesVariable(string variableName) return this; } + /// + /// Clears all produced variables for the current target, ensuring it does not produce any variables. + /// + /// The current for fluent chaining. + public TargetDefinition ProducesNoVariables() + { + ProducedVariables.Clear(); + + return this; + } + /// /// Declares a variable that this target consumes. /// @@ -393,4 +426,15 @@ public TargetDefinition ConsumesVariable(string targetName, string outputName) return this; } + + /// + /// Clears all consumed variables for the current target, ensuring it does not depend on any external variables. + /// + /// The current for fluent chaining. + public TargetDefinition ConsumesNoVariables() + { + ConsumedVariables.Clear(); + + return this; + } } diff --git a/DecSm.Atom/Nuget/AddNugetFeedsStep.cs b/DecSm.Atom/Nuget/AddNugetFeedsStep.cs index 94f9bbc5..b8f34fac 100644 --- a/DecSm.Atom/Nuget/AddNugetFeedsStep.cs +++ b/DecSm.Atom/Nuget/AddNugetFeedsStep.cs @@ -15,6 +15,8 @@ public sealed record AddNugetFeedsStep : CustomStep /// public IReadOnlyList FeedsToAdd { get; init; } = []; + public bool SyncAtomToolVersionToLibraryVersion { get; init; } + /// /// Generates a standardized environment variable name for a given NuGet feed's authentication token. /// diff --git a/DecSm.Atom/Workflows/Writer/WorkflowFileWriter.cs b/DecSm.Atom/Workflows/Writer/WorkflowFileWriter.cs index d4088783..a40a97d9 100644 --- a/DecSm.Atom/Workflows/Writer/WorkflowFileWriter.cs +++ b/DecSm.Atom/Workflows/Writer/WorkflowFileWriter.cs @@ -16,12 +16,12 @@ public abstract class WorkflowFileWriter(IAtomFileSystem fileSystem, ILogger< : IWorkflowWriter where T : IWorkflowType { - private readonly StringBuilder _stringBuilder = new(); + protected StringBuilder StringBuilder { get; } = new(); /// /// Gets the current indentation level for formatting nested content. /// - private int IndentLevel { get; set; } + protected int IndentLevel { get; private set; } /// /// Gets the number of spaces to use for each indentation level. Defaults to 2. @@ -49,8 +49,8 @@ public async Task Generate(WorkflowModel workflow, CancellationToken cancellatio WriteWorkflow(workflow); - var newText = _stringBuilder.ToString(); - _stringBuilder.Clear(); + var newText = StringBuilder.ToString(); + StringBuilder.Clear(); var existingText = fileSystem.File.Exists(filePath) ? await fileSystem.File.ReadAllTextAsync(filePath, cancellationToken) @@ -89,11 +89,11 @@ public async Task CheckForDirtyWorkflow(WorkflowModel workflow, Cancellati WriteWorkflow(workflow); - var newText = _stringBuilder + var newText = StringBuilder .ToString() .ReplaceLineEndings(); - _stringBuilder.Clear(); + StringBuilder.Clear(); var existingText = fileSystem.File.Exists(filePath) ? await fileSystem.File.ReadAllTextAsync(filePath, cancellationToken) @@ -120,9 +120,9 @@ public async Task CheckForDirtyWorkflow(WorkflowModel workflow, Cancellati protected void WriteLine(string? value = null) { if (IndentLevel > 0) - _stringBuilder.Append(new string(' ', IndentLevel)); + StringBuilder.Append(new string(' ', IndentLevel)); - _stringBuilder.AppendLine(value); + StringBuilder.AppendLine(value); } /// diff --git a/_atom/Build.cs b/_atom/Build.cs index 8303fd69..9bb762a2 100644 --- a/_atom/Build.cs +++ b/_atom/Build.cs @@ -13,6 +13,16 @@ internal partial class Build : BuildDefinition, IDeployTargets { public static readonly string[] PlatformNames = + [ + IJobRunsOn.WindowsLatestTag, + "windows-11-arm", + IJobRunsOn.UbuntuLatestTag, + "ubuntu-24.04-arm", + "macos-15-intel", + IJobRunsOn.MacOsLatestTag, + ]; + + public static readonly string[] DevopsPlatformNames = [ IJobRunsOn.WindowsLatestTag, IJobRunsOn.UbuntuLatestTag, IJobRunsOn.MacOsLatestTag, ]; @@ -94,10 +104,10 @@ internal partial class Build : BuildDefinition, [ WorkflowTargets.SetupBuildInfo, WorkflowTargets.PackProjects, - WorkflowTargets.PackTool.WithDevopsPoolMatrix(PlatformNames), + WorkflowTargets.PackTool.WithDevopsPoolMatrix(DevopsPlatformNames), WorkflowTargets .TestProjects - .WithDevopsPoolMatrix(PlatformNames) + .WithDevopsPoolMatrix(DevopsPlatformNames) .WithMatrixDimensions(TestFrameworkMatrix) .WithOptions(new SetupDotnetStep("8.0.x"), new SetupDotnetStep("9.0.x")), WorkflowTargets.PushToNuget, diff --git a/_atom/Targets/IDeployTargets.cs b/_atom/Targets/IDeployTargets.cs index 9a2fc690..6aa7c1a1 100644 --- a/_atom/Targets/IDeployTargets.cs +++ b/_atom/Targets/IDeployTargets.cs @@ -35,6 +35,12 @@ await PushPackageToNuget( cancellationToken: cancellationToken); }); + Target PushToNugetDevops => + d => d + .Extends(x => x.PushToNuget) + .ConsumesNoArtifacts() + .ConsumesArtifact(nameof(IBuildTargets.PackTool), Projects.DecSm_Atom_Tool.Name, DevopsPlatformNames); + Target PushToRelease => d => d .DescribedAs("Pushes the packages to the release feed.")