Skip to content

Commit

Permalink
feat(merge): merge all commits from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
jbuisine committed Dec 19, 2023
2 parents ef28e9a + 2b5837a commit dff9afd
Show file tree
Hide file tree
Showing 112 changed files with 10,206 additions and 1,632 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/ci-cpu-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: cpu-linux-build-and-test

on:
push:
paths-ignore:
- '**.md'
- 'images/**'
pull_request:
paths-ignore:
- '**.md'
- 'images/**'

jobs:
build:
strategy:
matrix:
config: [ '', '-DPBRT_DBG_LOGGING=True', '-DPBRT_FLOAT_AS_DOUBLE=True' ]
compilers:
- {
cc: "gcc-9",
cxx: "g++-9",
}
- {
cc: "gcc-10",
cxx: "g++-10",
}
- {
cc: "clang-10",
cxx: "clang++-10",
}
- {
cc: "clang-11",
cxx: "clang++-11",
}
# WAR github actions flakiness
# - {
# cc: "clang-12",
# cxx: "clang++-12",
# }

fail-fast: false

runs-on: ubuntu-20.04
name: Build and test ${{ matrix.compilers.cxx }} - ${{ matrix.config }}

steps:
- name: Checkout pbrt
uses: actions/checkout@v3
with:
submodules: true

- name: Checkout rgb2spectrum tables
uses: actions/checkout@v3
with:
repository: mmp/rgb2spectrum
path: build

- name: Get cmake
uses: lukka/get-cmake@latest

- name: Install OpenEXR
run: sudo apt-get -y install libopenexr-dev

- name: Install OpenGL
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

- name: Install compilers
run: sudo apt-get -y install ${{ matrix.compilers.cc }} ${{ matrix.compilers.cxx }}

- name: Configure
run: |
cd build
env CC=${{ matrix.compilers.cc }} CXX=${{ matrix.compilers.cxx }} cmake .. -DPBRT_USE_PREGENERATED_RGB_TO_SPECTRUM_TABLES=True ${{ matrix.config }}
- name: Build
run: cmake --build build --parallel --config Release

- name: Test
if: ${{ matrix.config == '' }}
run: ./pbrt_test
working-directory: build
55 changes: 55 additions & 0 deletions .github/workflows/ci-cpu-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: cpu-macos-build-and-test

on:
push:
paths-ignore:
- '**.md'
- 'images/**'
pull_request:
paths-ignore:
- '**.md'
- 'images/**'

jobs:
build:
name: Build and test

strategy:
matrix:
config: [ '', '-DPBRT_DBG_LOGGING=True', '-DPBRT_FLOAT_AS_DOUBLE=True' ]
fail-fast: false

runs-on: macos-latest

steps:
- name: Checkout pbrt
uses: actions/checkout@v3
with:
submodules: true

- name: Checkout rgb2spectrum tables
uses: actions/checkout@v3
with:
repository: mmp/rgb2spectrum
path: build

- name: Get cmake
uses: lukka/get-cmake@latest

- name: Install OpenEXR
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: brew install openexr

- name: Configure
run: |
cd build
cmake .. -DPBRT_USE_PREGENERATED_RGB_TO_SPECTRUM_TABLES=True ${{ matrix.config }}
- name: Build
run: cmake --build build --parallel --config Release

- name: Test
if: ${{ matrix.config == '' }}
run: ./pbrt_test
working-directory: build
50 changes: 50 additions & 0 deletions .github/workflows/ci-cpu-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: cpu-windows-build-and-test

on:
push:
paths-ignore:
- '**.md'
- 'images/**'
pull_request:
paths-ignore:
- '**.md'
- 'images/**'

jobs:
build:
name: Build and test

strategy:
matrix:
config: [ '', '-DPBRT_DBG_LOGGING=True', '-DPBRT_FLOAT_AS_DOUBLE=True' ]
fail-fast: false

runs-on: windows-latest

steps:
- name: Checkout pbrt
uses: actions/checkout@v3
with:
submodules: true

- name: Checkout rgb2spectrum tables
uses: actions/checkout@v3
with:
repository: mmp/rgb2spectrum
path: build

- name: Get cmake
uses: lukka/get-cmake@latest

- name: Configure
run: |
cd build
cmake .. -DPBRT_USE_PREGENERATED_RGB_TO_SPECTRUM_TABLES=True ${{ matrix.config }}
- name: Build
run: cmake --build build --parallel --config Release

- name: Test
if: ${{ matrix.config == '' }}
run: .\Release\pbrt_test.exe
working-directory: build
88 changes: 88 additions & 0 deletions .github/workflows/ci-gpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: gpu-build-only

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.5.2', '11.6.1', '11.7.0', '12.1.0' ] # 11.3.0 fails for unclear reasons
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@v3
with:
submodules: true

- name: Checkout rgb2spectrum tables
uses: actions/checkout@v3
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@v3
with:
ssh-key: ${{ secrets.CHECKOUT_KEY }}
repository: mmp/optix-headers
path: optix

- name: Get cmake
uses: lukka/get-cmake@latest

- name: Install OpenEXR
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: sudo apt-get -y install libopenexr-dev

- 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

- name: Configure
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


14 changes: 12 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[submodule "src/ext/zlib"]
path = src/ext/zlib
url = https://github.com/mitsuba-renderer/zlib
url = https://github.com/mitsuba-renderer/zlib.git
[submodule "src/ext/ptex"]
path = src/ext/ptex
url = https://github.com/wdas/ptex.git
[submodule "src/ext/double-conversion"]
path = src/ext/double-conversion
url = https://github.com/mmp/double-conversion
url = https://github.com/mmp/double-conversion.git
[submodule "src/ext/stb"]
path = src/ext/stb
url = https://github.com/nothings/stb.git
Expand All @@ -27,3 +27,13 @@
[submodule "src/ext/lodepng"]
path = src/ext/lodepng
url = https://github.com/lvandeve/lodepng.git
[submodule "src/ext/utf8proc"]
path = src/ext/utf8proc
url = https://github.com/JuliaStrings/utf8proc.git
[submodule "src/ext/qoi"]
path = src/ext/qoi
url = https://github.com/phoboslab/qoi.git
[submodule "src/ext/glfw"]
path = src/ext/glfw
url = https://github.com/glfw/glfw.git

Loading

0 comments on commit dff9afd

Please sign in to comment.