Use matrix to verify packages in pipeline

このコミットが含まれているのは:
Sergio Pedri committed 2022-11-07 15:04:30 -08:00
1 親 afe31885e1
コミット ef45d89d69
1ファイル変更
+32 -82
+32 -82
ファイルの表示
@@ -94,6 +94,8 @@ jobs:
- name: Run ComputeSharp.Tests.Internals
run: dotnet test tests\ComputeSharp.Tests.Internals\ComputeSharp.Tests.Internals.csproj -c Release -f ${{matrix.framework}} /p:Platform=x64 -v n -l "console;verbosity=detailed"
shell: cmd
# Only run the source generators tests once, as they're not runtime specific
- if: matrix.framework == 'net6.0'
name: Run ComputeSharp.Tests.SourceGenerators
run: dotnet test tests\ComputeSharp.Tests.SourceGenerators\ComputeSharp.Tests.SourceGenerators.csproj -v n -l "console;verbosity=detailed"
@@ -185,6 +187,22 @@ jobs:
# a test to ensure the NuGet packages work in a consuming project.
verify-packages:
needs: [build-packages]
strategy:
matrix:
framework: [net6.0, netcoreapp3.1, net472]
include:
- framework: net6.0
options: ''
path: Release\net6.0
extension: dll
- framework: netcoreapp3.1
options: -r win-x64
path: Release\netcoreapp3.1\win-x64
extension: exe
- framework: net472
options: /p:Platform=x64
path: x64\Release\net472
extension: exe
runs-on: windows-2022
steps:
- name: Git checkout
@@ -197,91 +215,23 @@ jobs:
with:
name: nuget_packages
path: artifacts
- name: Build ComputeSharp.NuGet (.NET 6)
run: dotnet build tests\ComputeSharp.NuGet\ComputeSharp.NuGet.csproj -c Release -f net6.0
- name: Build ComputeSharp.NuGet
run: dotnet build tests\ComputeSharp.NuGet\ComputeSharp.NuGet.csproj -c Release -f ${{matrix.framework}} ${{matrix.options}}
shell: cmd
- name: Run ComputeSharp.NuGet (.NET 6)
run: dotnet tests\ComputeSharp.NuGet\bin\Release\net6.0\ComputeSharp.NuGet.dll
- name: Run ComputeSharp.NuGet
run: dotnet tests\ComputeSharp.NuGet\bin\${{matrix.path}}\ComputeSharp.NuGet.${{matrix.extension}}
shell: cmd
- name: Build ComputeSharp.NuGet (.NET Core 3.1)
run: dotnet build tests\ComputeSharp.NuGet\ComputeSharp.NuGet.csproj -c Release -f netcoreapp3.1 -r win-x64
- name: Build ComputeSharp.Dynamic.NuGet
run: dotnet build tests\ComputeSharp.Dynamic.NuGet\ComputeSharp.Dynamic.NuGet.csproj -c Release -f ${{matrix.framework}} ${{matrix.options}}
shell: cmd
- name: Run ComputeSharp.NuGet (.NET Core 3.1)
run: tests\ComputeSharp.NuGet\bin\Release\netcoreapp3.1\win-x64\ComputeSharp.NuGet.exe
- name: Run ComputeSharp.Dynamic.NuGet
run: dotnet tests\ComputeSharp.Dynamic.NuGet\bin\${{matrix.path}}\ComputeSharp.Dynamic.NuGet.${{matrix.extension}}
shell: cmd
- name: Build ComputeSharp.NuGet (.NET Framework 4.7.2)
run: dotnet build tests\ComputeSharp.NuGet\ComputeSharp.NuGet.csproj -c Release -f net472 /p:Platform=x64
- name: Build ComputeSharp.Pix.NuGet
run: dotnet build tests\ComputeSharp.Pix.NuGet\ComputeSharp.Pix.NuGet.csproj -c Release -f ${{matrix.framework}} ${{matrix.options}}
shell: cmd
- name: Run ComputeSharp.NuGet (.NET Framework 4.7.2)
run: tests\ComputeSharp.NuGet\bin\x64\Release\net472\ComputeSharp.NuGet.exe
shell: cmd
# Download the NuGet packages and test the ComputeSharp.Dynamic dependency
verify-packages-dynamic:
needs: [build-packages]
runs-on: windows-2022
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Create local NuGet feed
run: mkdir artifacts
shell: cmd
- name: Download package artifacts
uses: actions/download-artifact@v3
with:
name: nuget_packages
path: artifacts
- name: Build ComputeSharp.Dynamic.NuGet (.NET 6)
run: dotnet build tests\ComputeSharp.Dynamic.NuGet\ComputeSharp.Dynamic.NuGet.csproj -c Release -f net6.0
shell: cmd
- name: Run ComputeSharp.Dynamic.NuGet (.NET 6)
run: dotnet tests\ComputeSharp.Dynamic.NuGet\bin\Release\net6.0\ComputeSharp.Dynamic.NuGet.dll
shell: cmd
- name: Build ComputeSharp.Dynamic.NuGet (.NET Core 3.1)
run: dotnet build tests\ComputeSharp.Dynamic.NuGet\ComputeSharp.Dynamic.NuGet.csproj -c Release -f netcoreapp3.1 -r win-x64
shell: cmd
- name: Run ComputeSharp.Dynamic.NuGet (.NET Core 3.1)
run: tests\ComputeSharp.Dynamic.NuGet\bin\Release\netcoreapp3.1\win-x64\ComputeSharp.Dynamic.NuGet.exe
shell: cmd
- name: Build ComputeSharp.Dynamic.NuGet (.NET Framework 4.7.2)
run: dotnet build tests\ComputeSharp.Dynamic.NuGet\ComputeSharp.Dynamic.NuGet.csproj -c Release -f net472 /p:Platform=x64
shell: cmd
- name: Run ComputeSharp.Dynamic.NuGet (.NET Framework 4.7.2)
run: tests\ComputeSharp.Dynamic.NuGet\bin\x64\Release\net472\ComputeSharp.Dynamic.NuGet.exe
shell: cmd
# Download the NuGet packages and test the ComputeSharp.Pix dependency
verify-packages-pix:
needs: [build-packages]
runs-on: windows-2022
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Create local NuGet feed
run: mkdir artifacts
shell: cmd
- name: Download package artifacts
uses: actions/download-artifact@v3
with:
name: nuget_packages
path: artifacts
- name: Build ComputeSharp.Pix.NuGet (.NET 6)
run: dotnet build tests\ComputeSharp.Pix.NuGet\ComputeSharp.Pix.NuGet.csproj -c Release -f net6.0
shell: cmd
- name: Run ComputeSharp.Pix.NuGet (.NET 6)
run: dotnet tests\ComputeSharp.Pix.NuGet\bin\Release\net6.0\ComputeSharp.Pix.NuGet.dll
shell: cmd
- name: Build ComputeSharp.Pix.NuGet (.NET Core 3.1)
run: dotnet build tests\ComputeSharp.Pix.NuGet\ComputeSharp.Pix.NuGet.csproj -c Release -f netcoreapp3.1 -r win-x64
shell: cmd
- name: Run ComputeSharp.Pix.NuGet (.NET Core 3.1)
run: tests\ComputeSharp.Pix.NuGet\bin\Release\netcoreapp3.1\win-x64\ComputeSharp.Pix.NuGet.exe
shell: cmd
- name: Build ComputeSharp.Pix.NuGet (.NET Framework 4.7.2)
run: dotnet build tests\ComputeSharp.Pix.NuGet\ComputeSharp.Pix.NuGet.csproj -c Release -f net472 /p:Platform=x64
shell: cmd
- name: Run ComputeSharp.Pix.NuGet (.NET Framework 4.7.2)
run: tests\ComputeSharp.Pix.NuGet\bin\x64\Release\net472\ComputeSharp.Pix.NuGet.exe
- name: Run ComputeSharp.Pix.NuGet
run: dotnet tests\ComputeSharp.Pix.NuGet\bin\${{matrix.path}}\ComputeSharp.Pix.NuGet.${{matrix.extension}}
shell: cmd
# Run the extra tests to validate a number of build and publishing configurations.
@@ -299,7 +249,7 @@ jobs:
# Publish the packages to GitHub packages
publish-nightlies-github:
needs: [run-tests, run-dx12-samples, verify-packages, verify-packages-dynamic, verify-packages-pix, verify-package-native-libs]
needs: [run-tests, run-dx12-samples, verify-packages, verify-package-native-libs]
runs-on: windows-2022
if: ${{github.event_name == 'push'}}
steps:
@@ -312,7 +262,7 @@ jobs:
# Publish the packages to Azure DevOps
publish-nightlies-azure-devops:
needs: [run-tests, run-dx12-samples, verify-packages, verify-packages-dynamic, verify-packages-pix, verify-package-native-libs]
needs: [run-tests, run-dx12-samples, verify-packages, verify-package-native-libs]
runs-on: windows-2022
if: ${{github.event_name == 'push'}}
steps: