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