Update build configuration to support smoke simulation benchmarks and… #34
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: Linux Build (Arch) | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - '**' | |
| pull_request: | |
| paths: | |
| - '**' | |
| concurrency: | |
| group: linux-build-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| arch-build-and-benchmark: | |
| name: Build (Arch Linux, CMake+Ninja) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: archlinux:latest | |
| env: | |
| CMAKE_BUILD_TYPE: Release | |
| CUDAToolkit_ROOT: /opt/cuda | |
| SLANG_URL: https://github.com/shader-slang/slang/releases/download/v2026.1/slang-2026.1-linux-x86_64.tar.gz | |
| steps: | |
| - name: Prepare Arch keyring + update system | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| pacman-key --init | |
| pacman-key --populate archlinux | |
| pacman -Syu --noconfirm | |
| - name: Install build dependencies | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| pacman -S --noconfirm --needed \ | |
| base-devel git \ | |
| cmake ninja pkgconf \ | |
| gcc \ | |
| ca-certificates curl tar unzip \ | |
| python \ | |
| vulkan-headers vulkan-icd-loader vulkan-tools vulkan-validation-layers \ | |
| shaderc glslang \ | |
| wayland wayland-protocols libxkbcommon \ | |
| libx11 libxrandr libxinerama libxcursor libxi \ | |
| mesa \ | |
| cuda | |
| pacman -Scc --noconfirm || true | |
| echo "/opt/cuda/bin" >> "$GITHUB_PATH" | |
| echo "CUDAToolkit_ROOT=/opt/cuda" >> "$GITHUB_ENV" | |
| - name: Install Slang (slangc) | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| mkdir -p /opt/slang | |
| curl -L --fail --retry 5 --retry-delay 2 "${SLANG_URL}" -o /tmp/slang.tar.gz | |
| tar -xzf /tmp/slang.tar.gz -C /opt/slang | |
| rm -f /tmp/slang.tar.gz | |
| test -x /opt/slang/bin/slangc | |
| /opt/slang/bin/slangc -version | |
| echo "/opt/slang/bin" >> "$GITHUB_PATH" | |
| echo "SLANG_DIR=/opt/slang" >> "$GITHUB_ENV" | |
| - name: Toolchain sanity | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| g++ --version | |
| cmake --version | |
| ninja --version | |
| command -v nvcc | |
| nvcc --version | |
| command -v glslc && glslc --version | |
| command -v glslangValidator && glslangValidator --version | |
| command -v slangc && slangc -version | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Configure | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| cmake -S . -B build -G Ninja \ | |
| -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \ | |
| -DSMOKE_BUILD_BENCHMARK=ON \ | |
| -DSMOKE_BUILD_VULKAN_APP=ON | |
| - name: Build | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| cmake --build build --target all --parallel | |