[Build] Generate shaders on build instead of having them checked in
This commit is contained in:
56
.github/workflows/Windows_build.yml
vendored
56
.github/workflows/Windows_build.yml
vendored
@@ -68,8 +68,62 @@ jobs:
|
||||
- uses: actions/checkout@main
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Cache Vulkan SDK
|
||||
id: cache-vulkan-sdk
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: C:\VulkanSDK
|
||||
key: ${{ runner.os }}-vulkan-sdk-${{ hashFiles('**/vulkan-sdk.exe') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-vulkan-sdk-
|
||||
- name: Setup
|
||||
run: git submodule update --init --depth=1 -j $env:NUMBER_OF_PROCESSORS (Select-String -CaseSensitive '(?<=path = )(?!third_party\/(FidelityFX-(CAS|FSR)|premake-(androidndk|cmake|export-compile-commands))).+' .gitmodules).Matches.Value
|
||||
run: |
|
||||
# Install Vulkan SDK which includes spirv-tools
|
||||
if (Test-Path -Path "C:\VulkanSDK") {
|
||||
echo "Vulkan SDK found in cache."
|
||||
} else {
|
||||
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe" -OutFile "vulkan-sdk.exe"
|
||||
Start-Process -FilePath "vulkan-sdk.exe" -ArgumentList "--accept-licenses", "--default-answer", "--confirm-command", "install" -Wait
|
||||
}
|
||||
$env:VULKAN_SDK = "C:\VulkanSDK\$(Get-ChildItem -Path 'C:\VulkanSDK' -Directory | Select-Object -First 1 -ExpandProperty Name)"
|
||||
$env:PATH = "$env:VULKAN_SDK\Bin;$env:PATH"
|
||||
echo "VULKAN_SDK=$env:VULKAN_SDK" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "$env:VULKAN_SDK\Bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
|
||||
# Verify shader tools are available
|
||||
$spirvOptPath = "$env:VULKAN_SDK\Bin\spirv-opt.exe"
|
||||
if (Test-Path $spirvOptPath) {
|
||||
& $spirvOptPath --version
|
||||
echo "spirv-opt found at: $spirvOptPath"
|
||||
} else {
|
||||
echo "Warning: spirv-opt.exe not found at expected location"
|
||||
}
|
||||
|
||||
$glslangPath = "$env:VULKAN_SDK\Bin\glslangValidator.exe"
|
||||
if (Test-Path $glslangPath) {
|
||||
& $glslangPath --version
|
||||
echo "glslangValidator found at: $glslangPath"
|
||||
} else {
|
||||
echo "Warning: glslangValidator.exe not found at expected location"
|
||||
}
|
||||
|
||||
$spirvDisPath = "$env:VULKAN_SDK\Bin\spirv-dis.exe"
|
||||
if (Test-Path $spirvDisPath) {
|
||||
echo "spirv-dis found at: $spirvDisPath"
|
||||
} else {
|
||||
echo "Warning: spirv-dis.exe not found at expected location"
|
||||
}
|
||||
|
||||
# Verify FXC is available (from Windows SDK)
|
||||
$fxcPaths = Get-ChildItem -Path "${env:ProgramFiles(x86)}\Windows Kits\10\bin\*\x64\fxc.exe" -ErrorAction SilentlyContinue | Sort-Object FullName
|
||||
if ($fxcPaths) {
|
||||
$fxcPath = $fxcPaths[-1].FullName
|
||||
echo "FXC found at: $fxcPath"
|
||||
} else {
|
||||
echo "Warning: fxc.exe not found in Windows SDK"
|
||||
}
|
||||
|
||||
git submodule update --init --depth=1 -j $env:NUMBER_OF_PROCESSORS (Select-String -CaseSensitive '(?<=path = )(?!third_party\/(premake-(androidndk|cmake|export-compile-commands))).+' .gitmodules).Matches.Value
|
||||
- name: Build
|
||||
run: python xenia-build.py build --config=Release --target=src\xenia-app
|
||||
- name: Prepare artifacts
|
||||
|
||||
Reference in New Issue
Block a user