✨ Add ALPHA_CUTOFF constant, reorder push constants #97
This file contains hidden or 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: build | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| env: | |
| VCPKG_DEFAULT_TRIPLET: x64-windows | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Vulkan SDK | |
| run: | | |
| $ver = "1.3.280.0" | |
| $url = "https://sdk.lunarg.com/sdk/download/$ver/windows/VulkanSDK-$ver-Installer.exe" | |
| Invoke-WebRequest -Uri $url -OutFile VulkanSDK.exe | |
| Start-Process -FilePath .\VulkanSDK.exe -Args "--accept-licenses --default-answer --confirm-command install" -Wait | |
| echo "VULKAN_SDK=C:\VulkanSDK\$ver" >> $env:GITHUB_ENV | |
| echo "C:\VulkanSDK\$ver\Bin" >> $env:GITHUB_PATH | |
| - name: Create asset directories | |
| run: | | |
| New-Item -ItemType Directory -Path assets -Force | |
| New-Item -ItemType Directory -Path shaders -Force | |
| - name: Run clang-format | |
| run: | | |
| Get-ChildItem -Path src -Include *.cpp,*.h -Recurse | ForEach-Object { | |
| clang-format -i $_.FullName | |
| } | |
| $diff = git diff --name-only | |
| if ($diff) { | |
| Write-Host "::error::clang-format found formatting issues in: $diff" | |
| git diff | |
| exit 1 | |
| } | |
| Write-Host "All source files are properly formatted." | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows | |
| - name: Build | |
| run: cmake --build build --config Release |