render: Use correct length when creating Material resources from Rust #1322
This file contains 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: Argus | |
on: [push, pull_request] | |
jobs: | |
Build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2022, macos-12, macos-13, macos-14] | |
compiler: [gcc, clang, msvc] | |
configuration: [Release, Debug] | |
exclude: | |
- os: windows-2022 | |
compiler: gcc | |
- os: windows-2022 | |
compiler: clang | |
- os: ubuntu-20.04 | |
compiler: msvc | |
- os: ubuntu-22.04 | |
compiler: msvc | |
- os: ubuntu-24.04 | |
compiler: msvc | |
- os: macos-12 | |
compiler: msvc | |
- os: macos-12 | |
compiler: gcc | |
- os: macos-13 | |
compiler: msvc | |
- os: macos-13 | |
compiler: gcc | |
- os: macos-14 | |
compiler: msvc | |
- os: macos-14 | |
compiler: gcc | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set env vars for current matrix configuration | |
shell: pwsh | |
run: | | |
$os_name = "${{ runner.os }}".ToLower() | |
echo "OS_NAME=$os_name" >> "$env:GITHUB_ENV" | |
$runner_name = "${{ matrix.os }}".Replace("-", "").Replace(".", "").ToLower() | |
echo "RUNNER_NAME=$runner_name" >> "$env:GITHUB_ENV" | |
$config_name = "${{ matrix.configuration }}".ToLower() | |
echo "CONFIG_NAME=$config_name" >> $env:GITHUB_ENV | |
- name: Set env vars for GCC | |
shell: pwsh | |
run: | | |
$suffix = if ("$env:OS_NAME" -eq "macos") { "-12" } else { "" } | |
echo "CC=gcc$suffix" >> "$env:GITHUB_ENV" | |
echo "CXX=g++$suffix" >> "$env:GITHUB_ENV" | |
if: matrix.compiler == 'gcc' | |
- name: Set env vars for Clang | |
shell: pwsh | |
run: | | |
echo "CC=clang" >> "$env:GITHUB_ENV" | |
echo "CXX=clang++" >> "$env:GITHUB_ENV" | |
if: matrix.compiler == 'clang' | |
- name: Set env vars for Win32 CMake | |
shell: pwsh | |
run: | | |
echo "CMAKE_GENERATOR=Visual Studio 17" >> "$env:GITHUB_ENV" | |
if: startsWith(matrix.os, 'windows') | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{secrets.ACCESS_TOKEN}} | |
submodules: recursive | |
- uses: ruby/setup-ruby@v1 | |
with: | |
working-directory: external/tooling/aglet | |
ruby-version: '3.0' | |
bundler-cache: true | |
- name: Install dependencies (Ubuntu Focal) | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
libgl1-mesa-dev \ | |
libgl1-mesa-glx \ | |
libxrandr-dev \ | |
libxinerama-dev \ | |
libxcursor-dev \ | |
libxi-dev \ | |
libvulkan-dev \ | |
libsdl2-dev \ | |
liblua5.3-dev \ | |
nlohmann-json3-dev \ | |
glslang-dev \ | |
spirv-tools | |
if: matrix.os == 'ubuntu-20.04' | |
- name: Install dependencies (Ubuntu Jammy) | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
libgl1-mesa-dev \ | |
libgl1-mesa-glx \ | |
libxrandr-dev \ | |
libxinerama-dev \ | |
libxcursor-dev \ | |
libxi-dev \ | |
libvulkan-dev \ | |
libsdl2-dev \ | |
liblua5.4-dev \ | |
nlohmann-json3-dev \ | |
glslang-dev \ | |
spirv-tools | |
if: matrix.os == 'ubuntu-22.04' | |
- name: Install dependencies (Ubuntu Noble) | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
libgl1 \ | |
libgl1-mesa-dev \ | |
libglx-mesa0 \ | |
libxrandr-dev \ | |
libxinerama-dev \ | |
libxcursor-dev \ | |
libxi-dev \ | |
libvulkan-dev \ | |
libsdl2-dev \ | |
libpng-dev \ | |
liblua5.4-dev \ | |
nlohmann-json3-dev \ | |
glslang-dev \ | |
glslang-tools \ | |
spirv-tools | |
if: matrix.os == 'ubuntu-24.04' | |
- name: Install dependencies (macOS) | |
run: | | |
brew install \ | |
ninja \ | |
sdl2 \ | |
lua \ | |
nlohmann-json \ | |
glslang \ | |
spirv-tools | |
if: startsWith(matrix.os, 'macos') | |
- name: Setup Vulkan SDK (Windows) | |
run: | | |
$ver = (Invoke-WebRequest -Uri "https://vulkan.lunarg.com/sdk/latest.json" | ConvertFrom-Json).windows | |
echo Version $ver | |
$ProgressPreference = 'SilentlyContinue' | |
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$ver/windows/VulkanSDK-$ver-Installer.exe" -OutFile VulkanSDK.exe | |
echo Downloaded | |
.\VulkanSDK.exe --root C:\VulkanSDK --accept-licenses --default-answer --confirm-command install | |
echo "VULKAN_SDK=C:\VulkanSDK\" >> "$env:GITHUB_ENV" | |
if: startsWith(matrix.os, 'windows') | |
- name: Configure | |
shell: pwsh | |
run: | | |
mkdir build | |
cd build | |
if ("$env:OS_NAME" -eq "windows") { | |
cmake -G "$env:CMAKE_GENERATOR" -DCMAKE_SYSTEM_VERSION=10.0.22621.963 -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} .. | |
} elseif ("$env:OS_NAME" -eq "linux") { | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} .. | |
} elseif ("$env:OS_NAME" -eq "macos") { | |
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DBUILD_VULKAN_BACKEND=OFF .. | |
} | |
- name: Build | |
run: cmake --build build --config ${{ matrix.configuration }} --parallel 2 | |
- name: Run Tests | |
working-directory: build | |
run: ctest -C ${{ matrix.configuration }} | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: argus_dist-${{ env.RUNNER_NAME }}-${{ matrix.compiler }}-${{ env.CONFIG_NAME }} | |
path: build/dist/ |