Fix hero sampling #42
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| env: | |
| VULKAN_SDK_VERSION: 1.4.341.1 | |
| VULKAN_SDK_WINDOWS_SHA256: bcf2d75aa9556889ab974858666e20b3655b6055a0db704ccb47279ff33b5bfe | |
| VULKAN_SDK_LINUX_SHA256: 17c8b7e872d8038fbd4e1239aa8483b495f862ad16b1c58644f7ecd8041d20cc | |
| APPIMAGETOOL_VERSION: 1.9.0 | |
| APPIMAGETOOL_SHA256: 46fdd785094c7f6e545b61afcfb0f3d98d8eab243f644b4b17698c01d06083d1 | |
| jobs: | |
| build-windows: | |
| name: Windows MSVC | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| cache-dependency-path: .github/workflows/release.yml | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1.13.0 | |
| - name: Cache Vulkan SDK | |
| id: vulkan-cache-windows | |
| uses: actions/cache@v5 | |
| with: | |
| path: VULKAN_SDK | |
| key: ${{ runner.os }}-vulkan-${{ env.VULKAN_SDK_VERSION }} | |
| - name: Cache Meson Wrap Downloads | |
| uses: actions/cache@v5 | |
| with: | |
| path: subprojects/packagecache | |
| key: ${{ runner.os }}-meson-wraps-${{ hashFiles('subprojects/*.wrap', 'subprojects/packagefiles/**') }} | |
| - name: Install Vulkan SDK | |
| if: steps.vulkan-cache-windows.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| $version = '${{ env.VULKAN_SDK_VERSION }}' | |
| $expectedHash = '${{ env.VULKAN_SDK_WINDOWS_SHA256 }}' | |
| $sdkDir = Join-Path $PWD 'VULKAN_SDK' | |
| $installer = Join-Path $PWD 'vulkan_sdk.exe' | |
| Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$version/windows/vulkan_sdk.exe?Human=true" -OutFile $installer | |
| $actualHash = (Get-FileHash $installer -Algorithm SHA256).Hash.ToLower() | |
| if ($actualHash -ne $expectedHash) { | |
| throw "Vulkan SDK hash mismatch: expected $expectedHash, got $actualHash" | |
| } | |
| Start-Process -FilePath $installer -ArgumentList @('--root', $sdkDir, '--accept-licenses', '--default-answer', '--confirm-command', 'install', 'copy_only=1') -Wait -NoNewWindow | |
| - name: Set Vulkan SDK Environment | |
| shell: pwsh | |
| run: | | |
| $sdkDir = Join-Path $PWD 'VULKAN_SDK' | |
| "VULKAN_SDK=$sdkDir" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| "VK_SDK_PATH=$sdkDir" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 | |
| (Join-Path $sdkDir 'Bin') | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8 | |
| - name: Install Meson and Ninja | |
| run: python -m pip install meson ninja | |
| - name: Configure | |
| run: meson setup build --buildtype=release -Db_vscrt=static_from_buildtype -Dvkrt_version='${{ github.ref_name }}' | |
| - name: Build | |
| run: meson compile -C build | |
| - name: Test | |
| run: ./build/vkrt.exe --help && ./build/vkrt.exe --version | |
| shell: bash | |
| - name: Package Windows Artifact | |
| run: | | |
| python scripts/stage_release.py windows . --zip | |
| - name: Test Windows Package | |
| shell: bash | |
| run: ./vkrt-windows-x64/bin/vkrt.exe --help && ./vkrt-windows-x64/bin/vkrt.exe --version | |
| - name: Upload Windows Release Asset | |
| if: github.ref_type == 'tag' | |
| uses: softprops/action-gh-release@v2.6.1 | |
| with: | |
| files: vkrt-windows-x64.zip | |
| - name: Upload Windows Artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: vkrt-windows-x64 | |
| path: vkrt-windows-x64.zip | |
| build-linux: | |
| name: Ubuntu Linux | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| cache-dependency-path: .github/workflows/release.yml | |
| - name: Cache Vulkan SDK | |
| id: vulkan-cache-linux | |
| uses: actions/cache@v5 | |
| with: | |
| path: VULKAN_SDK | |
| key: ${{ runner.os }}-vulkan-${{ env.VULKAN_SDK_VERSION }} | |
| - name: Cache Meson Wrap Downloads | |
| uses: actions/cache@v5 | |
| with: | |
| path: subprojects/packagecache | |
| key: ${{ runner.os }}-meson-wraps-${{ hashFiles('subprojects/*.wrap', 'subprojects/packagefiles/**') }} | |
| - name: Cache AppImageTool | |
| uses: actions/cache@v5 | |
| with: | |
| path: appimagetool | |
| key: ${{ runner.os }}-appimagetool-${{ env.APPIMAGETOOL_VERSION }}-${{ env.APPIMAGETOOL_SHA256 }} | |
| - name: Install Vulkan SDK | |
| if: steps.vulkan-cache-linux.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| curl -fsSL "https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_SDK_VERSION }}/linux/vulkan_sdk.tar.xz?Human=true" -o vulkan_sdk.tar.xz | |
| echo "${{ env.VULKAN_SDK_LINUX_SHA256 }} vulkan_sdk.tar.xz" | sha256sum -c - | |
| tar -xJf vulkan_sdk.tar.xz | |
| mkdir -p VULKAN_SDK | |
| cp -a "${{ env.VULKAN_SDK_VERSION }}/x86_64/." VULKAN_SDK/ | |
| - name: Set Vulkan SDK Environment | |
| shell: bash | |
| run: | | |
| echo "VULKAN_SDK=$PWD/VULKAN_SDK" >> "$GITHUB_ENV" | |
| echo "$PWD/VULKAN_SDK/bin" >> "$GITHUB_PATH" | |
| - name: Install Linux Packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libdbus-1-dev libturbojpeg0-dev pkg-config libfuse2 desktop-file-utils libwayland-dev libxkbcommon-dev wayland-protocols libx11-dev libxrandr-dev libxinerama-dev libxi-dev libxcursor-dev libxext-dev | |
| - name: Install Meson and Ninja | |
| run: python -m pip install meson ninja | |
| - name: Configure | |
| run: meson setup build --buildtype=release -Dlinux_window_backend=both -Dnfd_backend=portal -Dvkrt_version='${{ github.ref_name }}' | |
| - name: Build | |
| run: meson compile -C build | |
| - name: Test | |
| run: ./build/vkrt --help && ./build/vkrt --version | |
| - name: Package Linux Artifact | |
| env: | |
| APPIMAGETOOL_VERSION: ${{ env.APPIMAGETOOL_VERSION }} | |
| APPIMAGETOOL_SHA256: ${{ env.APPIMAGETOOL_SHA256 }} | |
| run: | | |
| python scripts/build_appimage.py . --appimage | |
| - name: Test Linux Package | |
| run: ./vkrt-linux-x64/bin/vkrt --help && ./vkrt-linux-x64/bin/vkrt --version | |
| - name: Test Linux Tarball | |
| shell: bash | |
| run: | | |
| mkdir -p packaged-linux | |
| tar -xzf vkrt-linux-x64.tar.gz -C packaged-linux | |
| ./packaged-linux/bin/vkrt --help | |
| ./packaged-linux/bin/vkrt --version | |
| - name: Test AppImage | |
| shell: bash | |
| run: | | |
| chmod +x vkrt-linux-x86_64.AppImage | |
| ./vkrt-linux-x86_64.AppImage --appimage-extract-and-run --help | |
| ./vkrt-linux-x86_64.AppImage --appimage-extract-and-run --version | |
| - name: Upload Linux Release Assets | |
| if: github.ref_type == 'tag' | |
| uses: softprops/action-gh-release@v2.6.1 | |
| with: | |
| files: | | |
| vkrt-linux-x64.tar.gz | |
| vkrt-linux-x86_64.AppImage | |
| - name: Upload Linux Artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: vkrt-linux-x64 | |
| path: | | |
| vkrt-linux-x64.tar.gz | |
| vkrt-linux-x86_64.AppImage |