mirror of
https://github.com/mmp/pbrt-v4
synced 2026-10-22 11:59:01 +03:00
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: cpu-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' ]
|
|
os: [ ubuntu-20.04, macos-latest, windows-latest ]
|
|
fail-fast: false
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout pbrt
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Checkout rgb2spectrum tables
|
|
uses: actions/checkout@v2
|
|
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 (Ubuntu/MacOS)
|
|
if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-latest' }}
|
|
run: cmake --build build --parallel --config Release -- -j 3
|
|
|
|
- name: Build (Windows)
|
|
if: ${{ matrix.os == 'windows-latest' }}
|
|
run: cmake --build build --parallel --config Release
|
|
|
|
- name: Test (Ubuntu/MacOS)
|
|
if: ${{ (matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-latest') && matrix.config == '' }}
|
|
run: ./pbrt_test
|
|
working-directory: build
|
|
|
|
- name: Test (Windows)
|
|
if: ${{ matrix.os == 'windows-latest' && matrix.config == '' }}
|
|
run: .\Release\pbrt_test.exe
|
|
working-directory: build
|