mirror of
https://github.com/mmp/pbrt-v4
synced 2026-09-26 16:20:07 +03:00
109 lines
3.2 KiB
YAML
109 lines
3.2 KiB
YAML
name: gpu-build-only
|
|
|
|
permissions: # https://github.com/actions/checkout/issues/254
|
|
actions: write # Necessary to cancel workflow executions
|
|
checks: write # Necessary to write reports
|
|
pull-requests: write # Necessary to comment on PRs
|
|
contents: read
|
|
packages: write
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
- 'images/**'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
- 'images/**'
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
optix: [ optix-7.7.0, optix-8.1.0, optix-9.0.0 ]
|
|
cuda: [ '12.9.1', '13.0.1', '13.1.1', '13.2.0' ]
|
|
os: [ ubuntu-24.04, windows-2022 ]
|
|
include:
|
|
- os: windows-2022
|
|
cuda: '13.2.0'
|
|
optix: optix-9.0.0
|
|
upload_binary: true
|
|
|
|
name: GPU Build Only (${{ matrix.os }}, CUDA ${{ matrix.cuda }}, ${{ matrix.optix }})
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: jimver/cuda-toolkit@v0.2.35
|
|
id: cuda-toolkit
|
|
with:
|
|
cuda: ${{ matrix.cuda }}
|
|
use-github-cache: false
|
|
use-local-cache: false
|
|
log-file-suffix: ${{ matrix.os }}-${{ matrix.cuda }}-${{ matrix.optix }}.txt
|
|
|
|
- name: Check NVCC
|
|
run: nvcc -V
|
|
|
|
- name: Checkout pbrt
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Checkout rgb2spectrum tables
|
|
uses: actions/checkout@v5
|
|
with:
|
|
repository: mmp/rgb2spectrum
|
|
path: build
|
|
|
|
- name: Checkout OptiX headers
|
|
uses: actions/checkout@v5
|
|
with:
|
|
ssh-key: ${{ secrets.CHECKOUT_KEY }}
|
|
repository: mmp/optix-headers
|
|
path: optix
|
|
|
|
- name: Get cmake
|
|
uses: lukka/get-cmake@latest
|
|
|
|
- name: Install pkgconfig and zlib
|
|
if: ${{ startsWith(matrix.os, 'windows-') }}
|
|
run: |
|
|
choco install pkgconfiglite
|
|
|
|
- name: Install OpenGL
|
|
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libgl1-mesa-dev libwayland-bin libwayland-dev wayland-protocols libxkbcommon-dev libxkbcommon-x11-0
|
|
|
|
- name: Configure (Windows)
|
|
if: ${{ startsWith(matrix.os, 'windows-') }}
|
|
run: |
|
|
cd build
|
|
$env:CUDACXX = "$env:CUDA_PATH\bin\nvcc.exe"
|
|
cmake .. `
|
|
-T "cuda=$env:CUDA_PATH" `
|
|
"-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
|
|
"-DPBRT_USE_PREGENERATED_RGB_TO_SPECTRUM_TABLES=True" `
|
|
"-DPBRT_OPTIX_PATH=../optix/${{ matrix.optix }}" `
|
|
"-DPBRT_GPU_SHADER_MODEL=sm_80"
|
|
|
|
- name: Configure (Linux)
|
|
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
|
|
run: |
|
|
cd build
|
|
cmake .. -DPBRT_USE_PREGENERATED_RGB_TO_SPECTRUM_TABLES=True -DPBRT_OPTIX_PATH=../optix/${{ matrix.optix }} -DPBRT_GPU_SHADER_MODEL=sm_80
|
|
|
|
- name: Build
|
|
# We need to limit the number of jobs so that it doesn't OOM
|
|
run: cmake --build build --parallel 3 --config Release
|
|
|
|
- name: Save Windows executable
|
|
if: ${{ matrix.upload_binary }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: pbrt.exe
|
|
path: build/Release/pbrt.exe
|