mirror of
https://github.com/mmp/pbrt-v4
synced 2026-09-26 16:20:07 +03:00
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
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@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: 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
|