diff --git a/.github/workflows/_artifacts_linux.yml b/.github/workflows/_artifacts_linux.yml index 262adf454d..ceb3e7c969 100644 --- a/.github/workflows/_artifacts_linux.yml +++ b/.github/workflows/_artifacts_linux.yml @@ -7,7 +7,12 @@ on: arch: required: true type: string - + dockerDistros: + required: true + type: string + dotnetVersions: + required: true + type: string env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" @@ -18,17 +23,9 @@ jobs: runs-on: ${{ inputs.runner }} strategy: fail-fast: false - matrix: - dockerDistro: - - alpine.3.20 - - centos.stream.9 - - debian.12 - - fedora.40 - - ubuntu.20.04 - - ubuntu.22.04 - - ubuntu.24.04 - dotnetVersion: [ '8.0', '6.0' ] - + matrix: + dockerDistro: ${{ fromJson(inputs.dockerDistros) }} + dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }} steps: - name: Checkout diff --git a/.github/workflows/_docker.yml b/.github/workflows/_docker.yml index b226199e38..9781d00c46 100644 --- a/.github/workflows/_docker.yml +++ b/.github/workflows/_docker.yml @@ -7,7 +7,12 @@ on: arch: required: true type: string - + dockerDistros: + required: true + type: string + dotnetVersions: + required: true + type: string env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" @@ -19,16 +24,8 @@ jobs: strategy: fail-fast: false matrix: - dockerDistro: - - alpine.3.20 - - centos.stream.9 - - debian.12 - - fedora.40 - - ubuntu.20.04 - - ubuntu.22.04 - - ubuntu.24.04 - dotnetVersion: [ '8.0', '6.0' ] - + dockerDistro: ${{ fromJson(inputs.dockerDistros) }} + dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }} steps: - name: Checkout diff --git a/.github/workflows/_docker_manifests.yml b/.github/workflows/_docker_manifests.yml index 33e65458cf..abb3b5cd05 100644 --- a/.github/workflows/_docker_manifests.yml +++ b/.github/workflows/_docker_manifests.yml @@ -1,6 +1,12 @@ on: workflow_call: - + inputs: + dockerDistros: + required: true + type: string + dotnetVersions: + required: true + type: string env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" @@ -12,16 +18,8 @@ jobs: strategy: fail-fast: false matrix: - dockerDistro: - - alpine.3.20 - - centos.stream.9 - - debian.12 - - fedora.40 - - ubuntu.20.04 - - ubuntu.22.04 - - ubuntu.24.04 - dotnetVersion: [ '8.0', '6.0' ] - + dockerDistro: ${{ fromJson(inputs.dockerDistros) }} + dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }} steps: - name: Checkout diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml index 0195ffdb25..5c5d485933 100644 --- a/.github/workflows/_prepare.yml +++ b/.github/workflows/_prepare.yml @@ -1,6 +1,12 @@ on: workflow_call: - + outputs: + dockerDistros: + description: 'List of Docker distros' + value: ${{ jobs.set_matrix.outputs.dockerDistros }} + dotnetVersions: + description: 'List of .NET versions' + value: ${{ jobs.set_matrix.outputs.dotnetVersions }} jobs: prepare: name: ${{ matrix.os }} @@ -40,3 +46,22 @@ jobs: name: '[Prepare]' shell: pwsh run: dotnet run/build.dll --target=BuildPrepare + set_matrix: + needs: [ prepare ] + name: Set Matrix + runs-on: ubuntu-latest + outputs: + dockerDistros: ${{ steps.set_matrix.outputs.dockerDistros }} + dotnetVersions: ${{ steps.set_matrix.outputs.dotnetVersions }} + steps: + - + name: Checkout + uses: actions/checkout@v4 + - + name: Restore State + uses: ./.github/actions/cache-restore + - + name: '[Matrix]' + id: set_matrix + shell: pwsh + run: dotnet run/config.dll --target=SetMatrix \ No newline at end of file diff --git a/.github/workflows/_unit_tests.yml b/.github/workflows/_unit_tests.yml index 96d954d9e5..594e2a55ae 100644 --- a/.github/workflows/_unit_tests.yml +++ b/.github/workflows/_unit_tests.yml @@ -1,6 +1,9 @@ on: workflow_call: - + inputs: + dotnetVersions: + required: true + type: string env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" @@ -14,7 +17,7 @@ jobs: fail-fast: false matrix: os: [windows-latest, ubuntu-latest, macos-15] - dotnetVersion: [ '8.0', '6.0' ] + dotnetVersion: ${{ fromJson(inputs.dotnetVersions) }} runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae4576d4db..1249908800 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: prepare: name: Prepare uses: ./.github/workflows/_prepare.yml - + build: name: Build & Package needs: [ prepare ] @@ -53,6 +53,8 @@ jobs: name: Test needs: [ prepare ] uses: ./.github/workflows/_unit_tests.yml + with: + dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }} secrets: inherit artifacts_windows_test: @@ -61,7 +63,7 @@ jobs: uses: ./.github/workflows/_artifacts_windows.yml artifacts_linux_test: - needs: [ build ] + needs: [ prepare, build ] name: Artifacts Linux (${{ matrix.arch }}) strategy: fail-fast: false @@ -75,9 +77,11 @@ jobs: with: runner: ${{ matrix.runner }} arch: ${{ matrix.arch }} + dockerDistros: ${{ needs.prepare.outputs.dockerDistros }} + dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }} docker_linux_images: - needs: [ build ] + needs: [ prepare, build ] name: Docker Images (${{ matrix.arch }}) strategy: fail-fast: false @@ -92,12 +96,17 @@ jobs: with: runner: ${{ matrix.runner }} arch: ${{ matrix.arch }} + dockerDistros: ${{ needs.prepare.outputs.dockerDistros }} + dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }} secrets: inherit docker_linux_manifests: - needs: [ docker_linux_images ] + needs: [ prepare, docker_linux_images ] name: Docker Manifests uses: ./.github/workflows/_docker_manifests.yml + with: + dockerDistros: ${{ needs.prepare.outputs.dockerDistros }} + dotnetVersions: ${{ needs.prepare.outputs.dotnetVersions }} secrets: inherit publish: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9f4d8ed7ad..271abaebcc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,11 +33,7 @@ env: jobs: prepare: name: Prepare Build - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [windows-latest, ubuntu-latest] + runs-on: ubuntu-latest steps: - @@ -127,7 +123,7 @@ jobs: publish: name: Publish docs needs: [ validate ] - runs-on: windows-latest + runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} GITHUB_USERNAME: ${{ github.actor }} @@ -143,8 +139,7 @@ jobs: - name: '[Build Schemas]' shell: pwsh - run: | - dotnet run/docs.dll --target=GenerateSchemas + run: dotnet run/docs.dll --target=GenerateSchemas - name: '[Publish Documentation]' if: ${{ github.event_name == 'repository_dispatch' }} diff --git a/build/CI.sln b/build/CI.sln index a3f2e1156e..026caa9324 100644 --- a/build/CI.sln +++ b/build/CI.sln @@ -34,14 +34,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{ ..\.github\workflows\format.yml = ..\.github\workflows\format.yml ..\.github\workflows\homebrew.yml = ..\.github\workflows\homebrew.yml ..\.github\workflows\release.yml = ..\.github\workflows\release.yml - ..\.github\workflows\_artifacts_linux.yml = ..\.github\workflows\_artifacts_linux.yml - ..\.github\workflows\_artifacts_windows.yml = ..\.github\workflows\_artifacts_windows.yml - ..\.github\workflows\_build.yml = ..\.github\workflows\_build.yml - ..\.github\workflows\_docker.yml = ..\.github\workflows\_docker.yml - ..\.github\workflows\_docker_manifests.yml = ..\.github\workflows\_docker_manifests.yml - ..\.github\workflows\_prepare.yml = ..\.github\workflows\_prepare.yml - ..\.github\workflows\_publish.yml = ..\.github\workflows\_publish.yml - ..\.github\workflows\_unit_tests.yml = ..\.github\workflows\_unit_tests.yml ..\.github\workflows\stale.yml = ..\.github\workflows\stale.yml ..\.github\workflows\winget.yml = ..\.github\workflows\winget.yml ..\.github\workflows\mkdocs.yml = ..\.github\workflows\mkdocs.yml @@ -87,6 +79,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "artifacts-attest", "artifac ..\.github\actions\artifacts-attest\action.yml = ..\.github\actions\artifacts-attest\action.yml EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{C9CB0BFB-E2C4-44F6-86A4-54DDF600EE5D}" + ProjectSection(SolutionItems) = preProject + ..\.github\workflows\_artifacts_linux.yml = ..\.github\workflows\_artifacts_linux.yml + ..\.github\workflows\_artifacts_windows.yml = ..\.github\workflows\_artifacts_windows.yml + ..\.github\workflows\_build.yml = ..\.github\workflows\_build.yml + ..\.github\workflows\_docker.yml = ..\.github\workflows\_docker.yml + ..\.github\workflows\_docker_manifests.yml = ..\.github\workflows\_docker_manifests.yml + ..\.github\workflows\_prepare.yml = ..\.github\workflows\_prepare.yml + ..\.github\workflows\_publish.yml = ..\.github\workflows\_publish.yml + ..\.github\workflows\_unit_tests.yml = ..\.github\workflows\_unit_tests.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -133,5 +137,6 @@ Global {965AC311-8A65-4AEB-B11F-3E4EBDFFBB8F} = {A9B92261-AB9C-47D6-A8A7-616A5A62B063} {FF815E24-AE9E-49E5-BC93-F859450F9CD0} = {A9B92261-AB9C-47D6-A8A7-616A5A62B063} {C4A801B1-45B1-4D2E-8911-4823778BF582} = {A9B92261-AB9C-47D6-A8A7-616A5A62B063} + {C9CB0BFB-E2C4-44F6-86A4-54DDF600EE5D} = {8E5B758F-925A-49E4-9011-20AD2A9E1F43} EndGlobalSection EndGlobal