Update README #25
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*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-windows: | |
| name: Windows Release | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Setup MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Resolve Vulkan SDK Version | |
| id: vulkan-windows | |
| shell: pwsh | |
| run: | | |
| $version = (Invoke-WebRequest -Uri 'https://vulkan.lunarg.com/sdk/latest/windows.txt').Content.Trim() | |
| "version=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8 | |
| - name: Cache Vulkan SDK | |
| id: vulkan-cache-windows | |
| uses: actions/cache@v4 | |
| with: | |
| path: VULKAN_SDK | |
| key: ${{ runner.os }}-vulkan-${{ steps.vulkan-windows.outputs.version }} | |
| - name: Install Vulkan SDK | |
| if: steps.vulkan-cache-windows.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: | | |
| $version = '${{ steps.vulkan-windows.outputs.version }}' | |
| $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 | |
| 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 | |
| - name: Build | |
| run: meson compile -C build | |
| - name: Test | |
| run: ./build/vkrt --help && ./build/vkrt --version | |
| shell: bash | |
| - name: Stage Release | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path vkrt-windows-x64 | Out-Null | |
| Copy-Item build\vkrt.exe vkrt-windows-x64 | |
| Copy-Item -Recurse assets vkrt-windows-x64 | |
| Copy-Item README.md vkrt-windows-x64 | |
| Compress-Archive -Path vkrt-windows-x64\* -DestinationPath vkrt-windows-x64.zip -Force | |
| - name: Upload Release Asset | |
| if: github.ref_type == 'tag' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: vkrt-windows-x64.zip | |
| - name: Upload Workflow Artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: vkrt-windows-x64 | |
| path: vkrt-windows-x64.zip | |
| build-linux: | |
| name: Linux Release | |
| 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" | |
| - name: Resolve Vulkan SDK Version | |
| id: vulkan-linux | |
| shell: bash | |
| run: echo "version=$(curl -fsSL https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_OUTPUT" | |
| - name: Cache Vulkan SDK | |
| id: vulkan-cache-linux | |
| uses: actions/cache@v4 | |
| with: | |
| path: VULKAN_SDK | |
| key: ${{ runner.os }}-vulkan-${{ steps.vulkan-linux.outputs.version }} | |
| - name: Install Vulkan SDK | |
| if: steps.vulkan-cache-linux.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| curl -fsSL "https://sdk.lunarg.com/sdk/download/${{ steps.vulkan-linux.outputs.version }}/linux/vulkan_sdk.tar.xz?Human=true" -o vulkan_sdk.tar.xz | |
| tar -xJf vulkan_sdk.tar.xz | |
| mkdir -p VULKAN_SDK | |
| cp -a "${{ steps.vulkan-linux.outputs.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 pkg-config libfuse2 libwayland-dev libxkbcommon-dev wayland-protocols libxrandr-dev libxinerama-dev libxi-dev libxcursor-dev | |
| - name: Install Meson and Ninja | |
| run: python -m pip install meson ninja | |
| - name: Configure | |
| run: meson setup build --buildtype=release -Dnfd_backend=portal | |
| - name: Build | |
| run: meson compile -C build | |
| - name: Test | |
| run: ./build/vkrt --help && ./build/vkrt --version | |
| - name: Build AppImage | |
| run: | | |
| mkdir -p AppDir/usr/bin AppDir/usr/lib | |
| cp build/vkrt AppDir/usr/bin/ | |
| cp -r assets AppDir/usr/bin/ | |
| cp README.md AppDir/usr/bin/ | |
| DBUS_LIB=$(ldconfig -p | grep 'libdbus-1.so.3 ' | head -1 | awk '{print $NF}') | |
| [ -n "$DBUS_LIB" ] && cp "$DBUS_LIB" AppDir/usr/lib/ | |
| printf '[Desktop Entry]\nType=Application\nName=vkrt\nExec=vkrt\nIcon=vkrt\nCategories=Graphics;\nTerminal=false\n' > AppDir/vkrt.desktop | |
| printf '\x89PNG\r\n\x1a\n' > AppDir/vkrt.png | |
| printf '#!/bin/bash\nHERE="$(dirname "$(readlink -f "$0")")"\nexport LD_LIBRARY_PATH="${HERE}/usr/lib:${LD_LIBRARY_PATH}"\ncd "${HERE}/usr/bin"\nexec "./vkrt" "$@"\n' > AppDir/AppRun | |
| chmod +x AppDir/AppRun | |
| wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" -O appimagetool | |
| chmod +x appimagetool | |
| ARCH=x86_64 ./appimagetool AppDir vkrt-linux-x86_64.AppImage | |
| - name: Stage Tarball | |
| run: | | |
| mkdir -p vkrt-linux-x64 | |
| cp build/vkrt vkrt-linux-x64/ | |
| cp -r assets vkrt-linux-x64/ | |
| cp README.md vkrt-linux-x64/ | |
| tar -czf vkrt-linux-x64.tar.gz -C vkrt-linux-x64 . | |
| - name: Upload Release Assets | |
| if: github.ref_type == 'tag' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| vkrt-linux-x64.tar.gz | |
| vkrt-linux-x86_64.AppImage | |
| - name: Upload Workflow Artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: vkrt-linux-x64 | |
| path: | | |
| vkrt-linux-x64.tar.gz | |
| vkrt-linux-x86_64.AppImage |