|
78 | 78 | compiler_version: "16.4" |
79 | 79 | python: 3.13 |
80 | 80 | test_shaders: ON |
| 81 | + test_render: ON |
81 | 82 |
|
82 | 83 | - name: MacOS_Xcode_26_Python313 |
83 | 84 | os: macos-26 |
@@ -265,25 +266,40 @@ jobs: |
265 | 266 | fi |
266 | 267 | cppcheck --project=build/compile_commands.json --error-exitcode=1 --suppress=normalCheckLevelMaxBranches --suppress=*:*/External/* --suppress=*:*/NanoGUI/* |
267 | 268 |
|
268 | | - - name: Initialize Virtual Framebuffer |
| 269 | + - name: Setup Rendering Environment (Linux) |
269 | 270 | if: matrix.test_render == 'ON' && runner.os == 'Linux' |
270 | 271 | run: | |
271 | 272 | Xvfb :1 -screen 0 1280x960x24 & |
272 | 273 | echo "DISPLAY=:1" >> $GITHUB_ENV |
273 | 274 | echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV |
274 | 275 |
|
| 276 | + - name: Setup Rendering Environment (MacOS) |
| 277 | + if: matrix.test_render == 'ON' && runner.os == 'macOS' |
| 278 | + run: | |
| 279 | + # macOS can render headless with Metal backend without virtual display |
| 280 | + # Force software rendering for Metal backend (more reliable in CI) |
| 281 | + echo "MTL_HARDWARE_RENDERING=0" >> $GITHUB_ENV |
| 282 | + # Enable Metal debug layer for better debugging in CI |
| 283 | + echo "MTL_DEBUG_LAYER=1" >> $GITHUB_ENV |
| 284 | + echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV |
| 285 | +
|
275 | 286 | - name: Render Script Tests |
276 | 287 | if: matrix.test_render == 'ON' |
277 | 288 | run: | |
278 | 289 | mkdir build/render |
279 | 290 | python python/Scripts/baketextures.py resources/Materials/Examples/StandardSurface/standard_surface_brass_tiled.mtlx build/render/brass_average_baked.mtlx --average |
280 | 291 | python python/Scripts/translateshader.py resources/Materials/Examples/StandardSurface/standard_surface_carpaint.mtlx build/render/usd_preview_surface_carpaint.mtlx UsdPreviewSurface --hdr |
281 | 292 |
|
282 | | - - name: Render Application Tests |
| 293 | + - name: Viewer Tests |
283 | 294 | if: matrix.test_render == 'ON' |
284 | 295 | run: | |
285 | 296 | ../installed/bin/MaterialXView --material brass_average_baked.mtlx --mesh ../../resources/Geometry/sphere.obj --screenWidth 128 --screenHeight 128 --cameraZoom 1.4 --shadowMap false --captureFilename Viewer_BrassAverage.png |
286 | 297 | ../installed/bin/MaterialXView --material usd_preview_surface_carpaint.mtlx --mesh ../../resources/Geometry/sphere.obj --screenWidth 128 --screenHeight 128 --cameraZoom 1.4 --shadowMap false --captureFilename Viewer_CarpaintTranslated.png |
| 298 | + working-directory: build/render |
| 299 | + |
| 300 | + - name: Graph Editor Tests |
| 301 | + if: matrix.test_render == 'ON' && runner.os == 'Linux' |
| 302 | + run: | |
287 | 303 | ../installed/bin/MaterialXGraphEditor --material ../../resources/Materials/Examples/StandardSurface/standard_surface_marble_solid.mtlx --viewWidth 128 --viewHeight 128 --captureFilename GraphEditor_MarbleSolid.png |
288 | 304 | working-directory: build/render |
289 | 305 |
|
|
0 commit comments