From 9bd8295d757e9e7b99dc1245662ff7bdb2f78dc4 Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 15 Sep 2026 18:52:39 +0200 Subject: [PATCH] Require Windows allocator tests --- .github/workflows/test.yml | 73 +++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 357385a..0fe0095 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ permissions: contents: read jobs: - test: + linux: runs-on: ubuntu-24.04 env: VMODULES: ${{ github.workspace }}/source/modules @@ -64,6 +64,77 @@ jobs: test -n "$lavapipe_icd" VK_ICD_FILENAMES="$lavapipe_icd" v run examples/stress + windows: + runs-on: windows-2022 + env: + VMODULES: ${{ github.workspace }}/source/modules + steps: + - uses: actions/checkout@v7 + with: + path: source/modules/antono2/vkmemalloc + - uses: actions/checkout@v7 + with: + repository: antono2/vulkan + path: source/modules/antono2/vulkan + - uses: actions/checkout@v7 + with: + repository: antono2/memory + ref: v1.4.0 + path: source/modules/antono2/memory + - uses: prantlf/setup-v-action@v4 + with: + version: 0.5.2 + - name: Install Vulkan SDK and SwiftShader test artifacts + shell: bash + run: bash source/modules/antono2/vulkan/.github/scripts/setup-vulkan-ci.sh 1.4.309.0 v1.2 + - name: Install binding-matched Vulkan headers and Volk + shell: bash + working-directory: source/modules/antono2/vulkan + run: | + set -euo pipefail + registry_commit=$(tr -d '\r\n' < REGISTRY_COMMIT) + registry_checkout="$RUNNER_TEMP/Vulkan-Headers" + git init "$registry_checkout" + git -C "$registry_checkout" remote add origin https://github.com/KhronosGroup/Vulkan-Headers.git + git -C "$registry_checkout" fetch --depth 1 origin "$registry_commit" + git -C "$registry_checkout" checkout --detach FETCH_HEAD + cp -R "$registry_checkout/include/." "$VULKAN_SDK/include/" + + volk_commit=$(tr -d '\r\n' < VOLK_COMMIT) + mkdir -p "$VULKAN_SDK/include/volk" + curl --fail --silent --show-error --location \ + "https://raw.githubusercontent.com/zeux/volk/$volk_commit/volk.h" \ + --output "$VULKAN_SDK/include/volk/volk.h" + curl --fail --silent --show-error --location \ + "https://raw.githubusercontent.com/zeux/volk/$volk_commit/volk.c" \ + --output "$VULKAN_SDK/include/volk/volk.c" + - name: Verify the public setup diagnostics + working-directory: source/modules/antono2/vkmemalloc + run: v run setup.vsh --check + - name: Test with the Microsoft C compiler + working-directory: source/modules/antono2/vkmemalloc + shell: pwsh + run: | + $VsWhere = Join-Path ${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe' + $InstallPath = & $VsWhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + if (-not $InstallPath) { throw 'Visual Studio C++ tools were not found' } + Import-Module (Join-Path $InstallPath 'Common7\Tools\Microsoft.VisualStudio.DevShell.dll') + Enter-VsDevShell -VsInstallPath $InstallPath -SkipAutomaticLocation -DevCmdArguments '-arch=x64 -host_arch=x64' + v -cc msvc test . + + test: + if: always() + needs: [linux, windows] + runs-on: ubuntu-24.04 + steps: + - name: Verify required platforms + env: + LINUX_RESULT: ${{ needs.linux.result }} + WINDOWS_RESULT: ${{ needs.windows.result }} + run: | + test "$LINUX_RESULT" = success + test "$WINDOWS_RESULT" = success + sanitizers: runs-on: ubuntu-24.04 env: