mirror of
https://github.com/mmp/pbrt-v4
synced 2026-09-26 16:20:07 +03:00
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
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-10",
|
|
cxx: "g++-10",
|
|
}
|
|
- {
|
|
cc: "gcc-11",
|
|
cxx: "g++-11",
|
|
}
|
|
- {
|
|
cc: "gcc-12",
|
|
cxx: "g++-12",
|
|
}
|
|
- {
|
|
cc: "clang-14",
|
|
cxx: "clang++-14",
|
|
}
|
|
|
|
fail-fast: false
|
|
|
|
runs-on: ubuntu-22.04
|
|
name: Build and test ${{ matrix.compilers.cxx }} - ${{ matrix.config }}
|
|
|
|
steps:
|
|
- 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: 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 libwayland-bin libwayland-dev wayland-protocols libxkbcommon-dev libxkbcommon-x11-0
|
|
|
|
- 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 3 --config Release
|
|
|
|
- name: Test
|
|
if: ${{ matrix.config == '' }}
|
|
run: ./pbrt_test
|
|
working-directory: build
|