Use matrix for unit tests in pipeline
このコミットが含まれているのは:
1 親
56bb58a75f
コミット
afe31885e1
1ファイル変更
+41
-108
+41
-108
@@ -70,125 +70,62 @@ jobs:
|
|||||||
path: artifacts\*.nupkg
|
path: artifacts\*.nupkg
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
# Run all the DX12 unit tests referencing the ComputeSharp project directly
|
# Run all unit tests referencing the ComputeSharp project directly
|
||||||
run-dx12-tests:
|
run-tests:
|
||||||
if: success()
|
|
||||||
needs: [build-solution]
|
needs: [build-solution]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
framework: [net6.0, netcoreapp3.1, net472]
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
- name: Git checkout
|
- name: Git checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Run ComputeSharp.Tests (.NET 6)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests\ComputeSharp.Tests.csproj -c Release -f net6.0 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.DisableDynamicCompilation (.NET 6)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.DisableDynamicCompilation\ComputeSharp.Tests.DisableDynamicCompilation.csproj -c Release -f net6.0 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.GlobalStatements (.NET 6)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.GlobalStatements\ComputeSharp.Tests.GlobalStatements.csproj -c Release -f net6.0 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.Internals (.NET 6)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.Internals\ComputeSharp.Tests.Internals.csproj -c Release -f net6.0 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests (.NET Core 3.1)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests\ComputeSharp.Tests.csproj -c Release -f netcoreapp3.1 /p:Platform=x64 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.DisableDynamicCompilation (.NET Core 3.1)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.DisableDynamicCompilation\ComputeSharp.Tests.DisableDynamicCompilation.csproj -c Release -f netcoreapp3.1 /p:Platform=x64 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.GlobalStatements (.NET Core 3.1)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.GlobalStatements\ComputeSharp.Tests.GlobalStatements.csproj -c Release -f netcoreapp3.1 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.Internals (.NET Core 3.1)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.Internals\ComputeSharp.Tests.Internals.csproj -c Release -f netcoreapp3.1 /p:Platform=x64 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests (.NET Framework 4.7.2)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests\ComputeSharp.Tests.csproj -c Release -f net472 /p:Platform=x64 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.DisableDynamicCompilation (.NET Framework 4.7.2)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.DisableDynamicCompilation\ComputeSharp.Tests.DisableDynamicCompilation.csproj -c Release -f net472 /p:Platform=x64 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.GlobalStatements (.NET Framework 4.7.2)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.GlobalStatements\ComputeSharp.Tests.GlobalStatements.csproj -c Release -f net472 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.Internals (.NET Framework 4.7.2)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.Internals\ComputeSharp.Tests.Internals.csproj -c Release -f net472 /p:Platform=x64 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
|
|
||||||
- name: Run ComputeSharp.Tests.SourceGenerators
|
# DirectX 12 unit tests
|
||||||
|
- name: Run ComputeSharp.Tests
|
||||||
|
run: dotnet test tests\ComputeSharp.Tests\ComputeSharp.Tests.csproj -c Release -f ${{matrix.framework}} /p:Platform=x64 -v n -l "console;verbosity=detailed"
|
||||||
|
shell: cmd
|
||||||
|
- name: Run ComputeSharp.Tests.DisableDynamicCompilation
|
||||||
|
run: dotnet test tests\ComputeSharp.Tests.DisableDynamicCompilation\ComputeSharp.Tests.DisableDynamicCompilation.csproj -c Release -f ${{matrix.framework}} /p:Platform=x64 -v n -l "console;verbosity=detailed"
|
||||||
|
shell: cmd
|
||||||
|
- name: Run ComputeSharp.Tests.GlobalStatements
|
||||||
|
run: dotnet test tests\ComputeSharp.Tests.GlobalStatements\ComputeSharp.Tests.GlobalStatements.csproj -c Release -f ${{matrix.framework}} /p:Platform=x64 -v n -l "console;verbosity=detailed"
|
||||||
|
shell: cmd
|
||||||
|
- 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
|
||||||
|
- 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"
|
run: dotnet test tests\ComputeSharp.Tests.SourceGenerators\ComputeSharp.Tests.SourceGenerators.csproj -v n -l "console;verbosity=detailed"
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|
||||||
# Run all the DX12 device lost unit tests (run the separately to minimize issues).
|
# DirectX 12 device lost unit tests.
|
||||||
# These tests are run one class at a time to ensure there's no accidental conflicts between any of them. This is because
|
# These tests are run one class at a time to ensure there's no accidental conflicts between any of them. This is because
|
||||||
# the code paths being tested in this project are heavily dependent on process-wide mutable state (ie. DirectX 12 devices).
|
# the code paths being tested in this project are heavily dependent on process-wide mutable state (ie. DirectX 12 devices).
|
||||||
run-dx12-device-lost-tests:
|
- name: Run ComputeSharp.Tests.DeviceLost "DeviceDisposal"
|
||||||
if: success()
|
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceDisposal" -c Release -f ${{matrix.framework}} -v n -l "console;verbosity=detailed"
|
||||||
needs: [build-solution]
|
|
||||||
runs-on: windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Git checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Run ComputeSharp.Tests.DeviceLost "DeviceDisposal" (.NET 6)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceDisposal" -c Release -f net6.0 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.DeviceLost "DeviceLost" (.NET 6)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceLost" -c Release -f net6.0 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.DeviceLost "GetDefaultDevice" (.NET 6)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=GetDefaultDevice" -c Release -f net6.0 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.DeviceLost "DeviceDisposal" (.NET Core 3.1)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceDisposal" -c Release -f netcoreapp3.1 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.DeviceLost "DeviceLost" (.NET Core 3.1)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceLost" -c Release -f netcoreapp3.1 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.DeviceLost "GetDefaultDevice" (.NET Core 3.1)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=GetDefaultDevice" -c Release -f netcoreapp3.1 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.Tests.DeviceLost "DeviceDisposal" (.NET Framework 4.7.2)
|
|
||||||
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceDisposal" -c Release -f net472 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|
||||||
# These tests are failing randomly in the CI, disabling them just for now
|
# These tests are failing randomly in the CI on .NET Framework, disabling them just for now
|
||||||
# - name: Run ComputeSharp.Tests.DeviceLost "DeviceLost" (.NET Framework 4.7.2)
|
- if: matrix.framework != 'net472'
|
||||||
# run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceLost" -c Release -f net472 -v n -l "console;verbosity=detailed"
|
name: Run ComputeSharp.Tests.DeviceLost "DeviceLost"
|
||||||
# shell: cmd
|
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=DeviceLost" -c Release -f ${{matrix.framework}} -v n -l "console;verbosity=detailed"
|
||||||
# - name: Run ComputeSharp.Tests.DeviceLost "GetDefaultDevice" (.NET Framework 4.7.2)
|
shell: cmd
|
||||||
# run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=GetDefaultDevice" -c Release -f net472 -v n -l "console;verbosity=detailed"
|
- if: matrix.framework != 'net472'
|
||||||
# shell: cmd
|
name: Run ComputeSharp.Tests.DeviceLost "GetDefaultDevice"
|
||||||
|
run: dotnet test tests\ComputeSharp.Tests.DeviceLost\ComputeSharp.Tests.DeviceLost.csproj --filter "TestCategory=GetDefaultDevice" -c Release -f ${{matrix.framework}} -v n -l "console;verbosity=detailed"
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
# Run all the D2D1 unit tests (referencing ComputeSharp.D2D1)
|
# D2D1 unit tests
|
||||||
run-d2d1-tests:
|
- name: Run ComputeSharp.D2D1.Tests
|
||||||
if: success()
|
run: dotnet test tests\ComputeSharp.D2D1.Tests\ComputeSharp.D2D1.Tests.csproj -c Release -f ${{matrix.framework}} -v n -l "console;verbosity=detailed"
|
||||||
needs: [build-solution]
|
|
||||||
runs-on: windows-2022
|
|
||||||
steps:
|
|
||||||
- name: Git checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Run ComputeSharp.D2D1.Tests (.NET 6)
|
|
||||||
run: dotnet test tests\ComputeSharp.D2D1.Tests\ComputeSharp.D2D1.Tests.csproj -c Release -f net6.0 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
shell: cmd
|
||||||
- name: Run ComputeSharp.D2D1.Tests.AssemblyLevelAttributes (.NET 6)
|
- name: Run ComputeSharp.D2D1.Tests.AssemblyLevelAttributes
|
||||||
run: dotnet test tests\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj -c Release -f net6.0 -v n -l "console;verbosity=detailed"
|
run: dotnet test tests\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj -c Release -f ${{matrix.framework}} -v n -l "console;verbosity=detailed"
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.D2D1.Tests (.NET Core 3.1)
|
|
||||||
run: dotnet test tests\ComputeSharp.D2D1.Tests\ComputeSharp.D2D1.Tests.csproj -c Release -f netcoreapp3.1 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.D2D1.Tests.AssemblyLevelAttributes (.NET Core 3.1)
|
|
||||||
run: dotnet test tests\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj -c Release -f netcoreapp3.1 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.D2D1.Tests (.NET Framework 4.7.2)
|
|
||||||
run: dotnet test tests\ComputeSharp.D2D1.Tests\ComputeSharp.D2D1.Tests.csproj -c Release -f net472 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
|
||||||
- name: Run ComputeSharp.D2D1.Tests.AssemblyLevelAttributes (.NET Framework 4.7.2)
|
|
||||||
run: dotnet test tests\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes\ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj -c Release -f net472 -v n -l "console;verbosity=detailed"
|
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|
||||||
# Run all the local samples to ensure they build and run with no errors
|
# Run all the local samples to ensure they build and run with no errors
|
||||||
run-dx12-samples:
|
run-dx12-samples:
|
||||||
if: success()
|
|
||||||
needs: [build-solution]
|
needs: [build-solution]
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
@@ -247,7 +184,6 @@ jobs:
|
|||||||
# to build and run the sample project referencing them. This is used as
|
# to build and run the sample project referencing them. This is used as
|
||||||
# a test to ensure the NuGet packages work in a consuming project.
|
# a test to ensure the NuGet packages work in a consuming project.
|
||||||
verify-packages:
|
verify-packages:
|
||||||
if: success()
|
|
||||||
needs: [build-packages]
|
needs: [build-packages]
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
@@ -282,7 +218,6 @@ jobs:
|
|||||||
|
|
||||||
# Download the NuGet packages and test the ComputeSharp.Dynamic dependency
|
# Download the NuGet packages and test the ComputeSharp.Dynamic dependency
|
||||||
verify-packages-dynamic:
|
verify-packages-dynamic:
|
||||||
if: success()
|
|
||||||
needs: [build-packages]
|
needs: [build-packages]
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
@@ -317,7 +252,6 @@ jobs:
|
|||||||
|
|
||||||
# Download the NuGet packages and test the ComputeSharp.Pix dependency
|
# Download the NuGet packages and test the ComputeSharp.Pix dependency
|
||||||
verify-packages-pix:
|
verify-packages-pix:
|
||||||
if: success()
|
|
||||||
needs: [build-packages]
|
needs: [build-packages]
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
@@ -354,7 +288,6 @@ jobs:
|
|||||||
# This is used to ensure the native dependencies can always be loaded correctly
|
# This is used to ensure the native dependencies can always be loaded correctly
|
||||||
# regardless of whether the app is shipping with R2R, self-contained, etc.
|
# regardless of whether the app is shipping with R2R, self-contained, etc.
|
||||||
verify-package-native-libs:
|
verify-package-native-libs:
|
||||||
if: success()
|
|
||||||
needs: [build-packages]
|
needs: [build-packages]
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
@@ -366,7 +299,7 @@ jobs:
|
|||||||
|
|
||||||
# Publish the packages to GitHub packages
|
# Publish the packages to GitHub packages
|
||||||
publish-nightlies-github:
|
publish-nightlies-github:
|
||||||
needs: [run-dx12-tests, run-dx12-device-lost-tests, run-d2d1-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-packages-dynamic, verify-packages-pix, verify-package-native-libs]
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
if: ${{github.event_name == 'push'}}
|
if: ${{github.event_name == 'push'}}
|
||||||
steps:
|
steps:
|
||||||
@@ -379,7 +312,7 @@ jobs:
|
|||||||
|
|
||||||
# Publish the packages to Azure DevOps
|
# Publish the packages to Azure DevOps
|
||||||
publish-nightlies-azure-devops:
|
publish-nightlies-azure-devops:
|
||||||
needs: [run-dx12-tests, run-dx12-device-lost-tests, run-d2d1-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-packages-dynamic, verify-packages-pix, verify-package-native-libs]
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
if: ${{github.event_name == 'push'}}
|
if: ${{github.event_name == 'push'}}
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
新しいイシューから参照
ユーザーをブロックする