-
Notifications
You must be signed in to change notification settings - Fork 467
105 lines (85 loc) · 3 KB
/
ci-gpu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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.5.0, optix-7.7.0, optix-8.0.0 ]
cuda: [ '11.7.0', '12.1.0', '12.2.2', '12.3.2' ]
os: [ ubuntu-20.04, windows-latest ]
name: GPU Build Only (${{ matrix.os }}, CUDA ${{ matrix.cuda }}, ${{ matrix.optix }})
runs-on: ${{ matrix.os }}
steps:
- uses: jimver/[email protected]
id: cuda-toolkit
with:
cuda: ${{ matrix.cuda }}
method: 'network'
sub-packages: '[ "nvcc" ]'
- name: Check NVCC
run: nvcc -V
- name: Checkout pbrt
uses: actions/checkout@v4
with:
submodules: true
- name: Checkout rgb2spectrum tables
uses: actions/checkout@v4
with:
repository: mmp/rgb2spectrum
path: build
- name: Cache OptiX headers
uses: actions/cache@v2
with:
path: optix
key: optix-7.12345
- name: Checkout OptiX headers
uses: actions/checkout@v4
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: ${{ matrix.os == 'windows-latest' }}
run: |
choco install pkgconfiglite
vcpkg install zlib:x64-windows
vcpkg install zlib:x64-windows-static
- name: Install OpenGL
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: 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: ${{ matrix.os == 'windows-latest' }}
run: |
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT"/scripts/buildsystems/vcpkg.cmake -DPBRT_USE_PREGENERATED_RGB_TO_SPECTRUM_TABLES=True -DPBRT_OPTIX7_PATH=../optix/${{ matrix.optix }} -DPBRT_GPU_SHADER_MODEL=sm_80
- name: Configure (Linux)
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
cd build
cmake .. -DPBRT_USE_PREGENERATED_RGB_TO_SPECTRUM_TABLES=True -DPBRT_OPTIX7_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.os == 'windows-latest' }}
uses: actions/upload-artifact@v3
with:
name: pbrt.exe
path: pbrt.exe