Skip to content

Require UINT32 type in Geometry::AppendIndicesU32 #1481

Require UINT32 type in Geometry::AppendIndicesU32

Require UINT32 type in Geometry::AppendIndicesU32 #1481

Workflow file for this run

name: Windows build
on:
pull_request:
# Cancel previous runs if a more recent commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
permissions: read-all
jobs:
windows-build:
name: Build and run unit tests on Windows
runs-on: "windows-2022"
steps:
- name: Setup Windows SDK
uses: GuillaumeFalourd/setup-windows10-sdk-action@v1.11
with:
sdk-version: 22621
- name: Setup Vulkan SDK
run: |
Start-BitsTransfer -Source https://sdk.lunarg.com/sdk/download/1.3.268.0/windows/VulkanSDK-1.3.268.0-Installer.exe
if ((Get-FileHash .\VulkanSDK-1.3.268.0-Installer.exe).Hash -ne "8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5") {
exit 1
}
.\VulkanSDK-1.3.268.0-Installer.exe install --accept-licenses --default-answer --confirm-command --root "$HOME\vulkan-sdk"
"VULKAN_SDK=${HOME}\vulkan-sdk" >> $env:GITHUB_ENV
# Get the vulkan-1.dll and add it to the PATH, which is required when we execute binaries.
Start-BitsTransfer -Source https://sdk.lunarg.com/sdk/download/1.3.268.0/windows/VulkanRT-1.3.268.0-Components.zip
Expand-Archive VulkanRT-1.3.268.0-Components.zip -DestinationPath "$HOME\vulkan-sdk\RTComponents"
"$HOME\vulkan-sdk\RTComponents\VulkanRT-1.3.268.0-Components\x64" >> $env:GITHUB_PATH
- name: Setup software renderer (WARP)
run: |
# We download the latest version of WARP instead of using the one provided by Windows
# since it supports newer features and shader model 6.5, which we use for DX12.
# See https://devblogs.microsoft.com/directx/announcing-warp-preview-with-shader-model-6-7-support/.
Install-Package Microsoft.Direct3D.WARP -Source https://www.nuget.org/api/v2 -Destination "$HOME\warp" -RequiredVersion 1.0.5 -Force
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Switch to pull request branch and clone submodules
run: |
git checkout ${GITHUB_SHA}
git submodule update --init --recursive
- name: Build without XR support
run: |
mkdir build_no_xr
cd build_no_xr
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DPPX_BUILD_TESTS=ON -DPPX_BUILD_XR=0 ..
# TODO(https://github.com/google/bigwheels/issues/97): an issue
# around duplicated targets requires us to build shader targets
# with a single core.
cmake --build . --target all-shaders --config Debug -- /nologo /verbosity:minimal /maxcpucount:1
cmake --build . --target all-dx12 build-tests --config Debug -- /nologo /verbosity:minimal /maxcpucount
- name: Build with XR support
run: |
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DPPX_BUILD_TESTS=ON -DPPX_BUILD_XR=1 ..
# We only build DX12 projects since there is no benefit in building
# the targets for other APIs unless we're running them.
# We also build all shaders targets, irrespective of the API, to
# ensure shader compilation succeeds.
# TODO(https://github.com/google/bigwheels/issues/97): an issue
# around duplicated targets requires us to build shader targets
# with a single core.
cmake --build . --target all-shaders --config Debug -- /nologo /verbosity:minimal /maxcpucount:1
cmake --build . --target all-dx12 build-tests --config Debug -- /nologo /verbosity:minimal /maxcpucount
- name: Run unit tests
run: |
cd build
cmake --build . --target RUN_TESTS --config Debug -- /nologo /verbosity:minimal /maxcpucount
- name: Run runtime tests
run: |
cd build\bin\Debug
# Copy software renderer DLL. Note the DLL is called `d3d10` but
# this is used for all DirectX versions.
cp "$HOME\warp\Microsoft.Direct3D.WARP.1.0.5\build\native\amd64\d3d10warp.dll" .\
.\dx12_sample_03_square_textured --headless --frame-count 2 --screenshot-frame-number 1
magick convert screenshot_frame_1.ppm dx12_03_square_textured_screenshot.png
.\dx12_sample_09_obj_geometry --headless --frame-count 2 --screenshot-frame-number 1
magick convert screenshot_frame_1.ppm dx12_09_obj_geometry_screenshot.png
.\dx12_sample_13_normal_map --headless --frame-count 2 --screenshot-frame-number 1
magick convert screenshot_frame_1.ppm dx12_13_normal_map_screenshot.png
.\dx12_fishtornado --headless --frame-count 2 --screenshot-frame-number 1
magick convert screenshot_frame_1.ppm dx12_fishtornado_screenshot.png
.\dx12_graphics_pipeline --headless --frame-count 2 --screenshot-frame-number 1
magick convert screenshot_frame_1.ppm dx12_graphics_pipeline_screenshot.png
- name: Upload screenshots
uses: actions/upload-artifact@v3
with:
name: screenshots
path: build\bin\Debug\*.png