Web: Disable WebGPU button if WebGPU is not supported (close #216) #1258
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Win32/UWP build | |
on: [push, pull_request] | |
jobs: | |
precheks: | |
name: Win10 -> Pre-checks | |
runs-on: windows-latest | |
steps: | |
- name: Clone DiligentCore | |
uses: actions/checkout@v4 | |
with: | |
repository: DiligentGraphics/DiligentCore | |
path: DiligentCore | |
- name: Clone DiligentSamples | |
uses: actions/checkout@v4 | |
with: | |
path: DiligentSamples | |
- name: Format validation | |
shell: cmd | |
working-directory: ${{github.workspace}}/DiligentSamples/BuildTools/FormatValidation | |
run: validate_format_win.bat | |
build: | |
needs: precheks | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: false | |
matrix: | |
name: ["Win10"] | |
toolset: ["Win32", "x64"] | |
build_type: ["Debug", "Release"] | |
cmake_generator: ["Visual Studio 17 2022"] | |
# Do not build GLSLang and friends to save time as it is built by the Core and Engine CI. | |
cmake_args: ["-DDILIGENT_NO_WEBGPU=OFF"] | |
platform: ["Win32"] | |
build_args: ["-- -restore"] | |
include: | |
- name: "Win10-Dev" | |
platform: "Win32" | |
toolset: "x64" | |
build_type: "RelWithDebInfo" | |
cmake_generator: "Visual Studio 17 2022" | |
cmake_args: "-DDILIGENT_NO_GLSLANG=ON -DDILIGENT_NO_HLSL=ON -DDILIGENT_DEVELOPMENT=ON" | |
build_args: "-- -restore" | |
- name: "Win10-Ninja" | |
platform: "Win32" | |
toolset: "x64" | |
build_type: "Debug" | |
cmake_generator: "Ninja" | |
cmake_args: "-DDILIGENT_NO_GLSLANG=ON -DDILIGENT_NO_HLSL=ON" | |
- name: "MinGW" | |
platform: "Win32" | |
toolset: "x64" | |
build_type: "Release" | |
cmake_generator: "MinGW Makefiles" | |
cmake_args: "-DDILIGENT_NO_GLSLANG=ON" | |
- name: "UWP" | |
platform: "UWP" | |
toolset: "x64" | |
build_type: "Debug" | |
cmake_generator: "Visual Studio 17 2022" | |
cmake_args: "-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0" | |
- name: "UWP" | |
platform: "UWP" | |
toolset: "x64" | |
build_type: "Release" | |
cmake_generator: "Visual Studio 17 2022" | |
cmake_args: "-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0" | |
name: Win10 -> ${{ matrix.name }}-${{ matrix.toolset }}, ${{ matrix.build_type }} | |
steps: | |
- name: Checkout | |
uses: DiligentGraphics/github-action/checkout@v1 | |
- name: Set up build environment | |
if: success() | |
uses: DiligentGraphics/github-action/setup-build-env@v1 | |
with: | |
platform: ${{ matrix.platform }} | |
cmake-generator: ${{ matrix.cmake_generator }} | |
ninja-vs-arch: ${{ matrix.toolset }} | |
- name: Configure CMake | |
if: success() | |
uses: DiligentGraphics/github-action/configure-cmake@v1 | |
with: | |
generator: ${{ matrix.cmake_generator }} | |
vs-arch: ${{ matrix.toolset }} | |
build-type: ${{ matrix.build_type }} | |
cmake-args: ${{ matrix.cmake_args }} | |
- name: Build | |
id: build | |
if: success() | |
uses: DiligentGraphics/github-action/build@v1 | |
with: | |
build-args: ${{ matrix.build_args }} | |
- name: Sample Tests D3D11 | |
if: ${{ matrix.name == 'Win10' || matrix.name == 'Win8.1' || matrix.name == 'Win10-Ninja' }} | |
uses: DiligentGraphics/github-action/run-sample-tests@v1 | |
with: | |
mode: "d3d11_sw" | |
golden-image-mode: "compare_update" | |
- name: Sample Tests D3D12 | |
# NB: it is essential to include failure() to override the default status check of success() | |
# that is automatically applied to if conditions that don't contain a status check function. | |
if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win10-Ninja') }} | |
uses: DiligentGraphics/github-action/run-sample-tests@v1 | |
with: | |
mode: "d3d12_sw" | |
golden-image-mode: "compare_update" | |
- name: Sample Tests WebGPU | |
# NB: it is essential to include failure() to override the default status check of success() | |
# that is automatically applied to if conditions that don't contain a status check function. | |
if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10') }} | |
uses: DiligentGraphics/github-action/run-sample-tests@v1 | |
with: | |
mode: "wgpu" | |
golden-image-mode: "compare_update" | |
- name: Upload Golden Images | |
uses: actions/upload-artifact@v4 | |
# NB: it is essential to include failure() to override the default status check of success() | |
# that is automatically applied to if conditions that don't contain a status check function. | |
if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Win10' || matrix.name == 'Win8.1') }} | |
with: | |
name: GoldenImages-${{ matrix.name }}-${{ matrix.toolset }}-${{ matrix.build_type }} | |
path: | | |
${{github.workspace}}/DiligentTestData/GoldenImages | |
retention-days: 90 |