Skip to content

Commit

Permalink
Merge branch 'main' into 1585-fix-dpi-scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
jstone-lucasfilm authored Jun 28, 2024
2 parents 47d5b56 + 9b4b66e commit b22e289
Show file tree
Hide file tree
Showing 683 changed files with 24,768 additions and 22,651 deletions.
135 changes: 63 additions & 72 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,20 @@ jobs:
python: 3.7
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON

- name: Linux_GCC_11_Python39
os: ubuntu-20.04
compiler: gcc
compiler_version: "11"
python: 3.9
build_javascript: ON

- name: Linux_GCC_12_Python311
os: ubuntu-22.04
compiler: gcc
compiler_version: "12"
python: 3.11
build_javascript: ON

- name: Linux_GCC_13_Python312
os: ubuntu-24.04
compiler: gcc
compiler_version: "13"
python: 3.12
static_analysis: ON
cmake_config: -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

- name: Linux_GCC_CoverageAnalysis
os: ubuntu-22.04
Expand All @@ -52,46 +54,45 @@ jobs:
compiler_version: "10"
python: 3.7
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON
static_analysis: ON

- name: Linux_Clang_14_Python311
os: ubuntu-22.04
- name: Linux_Clang_18_Python312
os: ubuntu-24.04
compiler: clang
compiler_version: "14"
python: 3.11
compiler_version: "18"
python: 3.12
test_render: ON
clang_format: ON

- name: Linux_Clang_14_DynamicAnalysis
os: ubuntu-22.04
compiler: clang
compiler_version: "14"
python: None
cmake_config: -DMATERIALX_DYNAMIC_ANALYSIS=ON
dynamic_analysis: ON

- name: MacOS_Xcode_11_Python37
os: macos-11
- name: MacOS_Xcode_13_Python37
os: macos-12
compiler: xcode
compiler_version: "11.7"
compiler_version: "13.1"
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON
python: 3.7

- name: MacOS_Xcode_13_Python39
os: macos-12
compiler: xcode
compiler_version: "13.4"
python: 3.9

- name: MacOS_Xcode_14_Python311
os: macos-13
os: macos-14
compiler: xcode
compiler_version: "14.3"
python: 3.11

- name: MacOS_Xcode_15_Python312
os: macos-14
compiler: xcode
compiler_version: "15.0"
python: 3.12
test_shaders: ON

- name: MacOS_Xcode_DynamicAnalysis
os: macos-14
compiler: xcode
compiler_version: "15.0"
python: None
dynamic_analysis: ON
cmake_config: -DMATERIALX_DYNAMIC_ANALYSIS=ON

- name: iOS_Xcode_15
os: macos-13
os: macos-14
compiler: xcode
compiler_version: "15.0"
python: None
Expand Down Expand Up @@ -119,22 +120,21 @@ jobs:

steps:
- name: Sync Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install xorg-dev mesa-utils
sudo apt-get install xorg-dev
if [ "${{ matrix.compiler_version }}" != 'None' ]; then
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.compiler_version }} g++-${{ matrix.compiler_version }}-multilib
sudo apt-get install -y g++-${{ matrix.compiler_version }}
echo "CC=gcc-${{ matrix.compiler_version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.compiler_version }} libc++-${{ matrix.compiler_version }}-dev libc++abi-${{ matrix.compiler_version }}-dev
sudo apt-get install -y clang-${{ matrix.compiler_version }}
echo "CC=clang-${{ matrix.compiler_version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
fi
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
- name: Install Python ${{ matrix.python }}
if: matrix.python != 'None'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}
Expand All @@ -188,23 +188,19 @@ jobs:
- name: Install Node
if: matrix.build_javascript == 'ON'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16'

- name: Run Clang Format
if: matrix.clang_format == 'ON'
run: find source \( -name *.h -o -name *.cpp -o -name *.mm \) ! -path "*/External/*" ! -path "*/NanoGUI/*" | xargs clang-format -i --verbose
run: find source \( -name *.h -o -name *.cpp -o -name *.mm -o -name *.inl \) ! -path "*/External/*" ! -path "*/NanoGUI/*" | xargs clang-format -i --verbose

- name: CMake Generate
run: |
mkdir build
cd build
cmake -DMATERIALX_BUILD_PYTHON=ON -DMATERIALX_BUILD_VIEWER=ON -DMATERIALX_BUILD_GRAPH_EDITOR=ON -DMATERIALX_TEST_RENDER=OFF -DMATERIALX_WARNINGS_AS_ERRORS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ${{matrix.cmake_config}} ..
run: cmake -S . -B build -DMATERIALX_BUILD_PYTHON=ON -DMATERIALX_BUILD_VIEWER=ON -DMATERIALX_BUILD_GRAPH_EDITOR=ON -DMATERIALX_BUILD_TESTS=ON -DMATERIALX_TEST_RENDER=OFF -DMATERIALX_WARNINGS_AS_ERRORS=ON ${{matrix.cmake_config}}

- name: CMake Build
run: cmake --build . --target install --config Release --parallel 2
working-directory: build
run: cmake --build build --target install --config Release --parallel 2

- name: CMake Unit Tests
run: ctest -VV --output-on-failure --build-config Release
Expand All @@ -215,6 +211,8 @@ jobs:
run: |
python MaterialXTest/main.py
python MaterialXTest/genshader.py
python Scripts/creatematerial.py ../resources/Materials/Examples/StandardSurface/chess_set --texturePrefix chessboard --shadingModel standard_surface
python Scripts/creatematerial.py ../resources/Materials/Examples/GltfPbr/boombox --shadingModel gltf_pbr
python Scripts/mxformat.py ../resources/Materials/TestSuite/stdlib/upgrade --yes --upgrade
python Scripts/mxvalidate.py ../resources/Materials/Examples/StandardSurface/standard_surface_marble_solid.mtlx --stdlib --verbose
python Scripts/mxdoc.py --docType md ../libraries/pbrlib/pbrlib_defs.mtlx
Expand Down Expand Up @@ -258,7 +256,6 @@ jobs:
Xvfb :1 -screen 0 1280x960x24 &
echo "DISPLAY=:1" >> $GITHUB_ENV
echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV
echo "GALLIUM_DRIVER=llvmpipe" >> $GITHUB_ENV
- name: Render Script Tests
if: matrix.test_render == 'ON'
Expand All @@ -277,50 +274,46 @@ jobs:

- name: Upload Installed Package
if: matrix.python != 'None'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: MaterialX_${{ matrix.name }}
path: build/installed/

- name: Upload Formatted Source
if: matrix.clang_format == 'ON'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: MaterialX_ClangFormat
path: source

- name: Upload Reference Shaders
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: matrix.upload_shaders == 'ON'
with:
name: Reference_Shaders_${{ matrix.name }}
path: build/bin/reference/

- name: Upload Renders
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: matrix.test_render == 'ON'
with:
name: Renders_${{ matrix.name }}
path: build/render/*.png

- name: Upload Coverage Report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: matrix.coverage_analysis == 'ON'
with:
name: MaterialX_Coverage
path: build/coverage

- name: JavaScript CMake Generate
if: matrix.build_javascript == 'ON'
run: |
mkdir javascript/build
cd javascript/build
cmake -DMATERIALX_BUILD_JS=ON -DMATERIALX_EMSDK_PATH=${{ env.EMSDK }} -DMATERIALX_BUILD_RENDER=OFF -DMATERIALX_BUILD_TESTS=OFF -DMATERIALX_BUILD_GEN_OSL=OFF -DMATERIALX_BUILD_GEN_MDL=OFF ../..
run: cmake -S . -B javascript/build -DMATERIALX_BUILD_JS=ON -DMATERIALX_EMSDK_PATH=${{ env.EMSDK }}

- name: JavaScript CMake Build
if: matrix.build_javascript == 'ON'
run: cmake --build . --target install --config Release --parallel 2
working-directory: javascript/build
run: cmake --build javascript/build --target install --config Release --parallel 2

- name: JavaScript Unit Tests
if: matrix.build_javascript == 'ON'
Expand All @@ -338,7 +331,7 @@ jobs:
working-directory: javascript/MaterialXView

- name: Deploy Web Viewer
if: matrix.build_javascript == 'ON' && github.ref == 'refs/heads/main'
if: matrix.build_javascript == 'ON' && github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
Expand All @@ -347,11 +340,10 @@ jobs:

- name: Upload JavaScript Package
if: matrix.build_javascript == 'ON'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: MaterialX_JavaScript
path: javascript/build/installed/JavaScript/MaterialX
if-no-files-found: ignore

sdist:
name: Python SDist
Expand All @@ -362,10 +354,10 @@ jobs:

steps:
- name: Sync Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

Expand All @@ -377,7 +369,7 @@ jobs:
echo "filename=$(ls dist)" >> "$GITHUB_OUTPUT"
- name: Upload SDist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: MaterialX_Python_SDist
path: dist/*.tar.gz
Expand All @@ -390,26 +382,26 @@ jobs:
strategy:
fail-fast: false
matrix:
python-minor: ['7', '8', '9', '10', '11']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-minor: ['7', '8', '9', '10', '11', '12']
os: ['ubuntu-latest', 'windows-2022', 'macos-13']

steps:
- name: Sync Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Python 3.${{ matrix.python-minor }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.${{ matrix.python-minor }}

- name: Download Sdist
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: MaterialX_Python_SDist
path: sdist

- name: Build Wheel
uses: pypa/cibuildwheel@v2.13.1
uses: pypa/cibuildwheel@v2.17.0
with:
package-dir: ${{ github.workspace }}/sdist/${{ needs.sdist.outputs.sdist_filename }}
env:
Expand All @@ -420,7 +412,6 @@ jobs:
# manylinux2014 is CentOS 7 based. Which means GCC 10 and glibc 2.17.
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_ALL_LINUX: yum install -y libXt-devel
CIBW_BEFORE_ALL_MACOS: sudo xcode-select -switch /Applications/Xcode_13.4.app
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: CMAKE_BUILD_PARALLEL_LEVEL=2
# CIBW_BUILD_FRONTEND: build # https://github.com/pypa/build
Expand All @@ -436,7 +427,7 @@ jobs:
working-directory: python

- name: Upload Wheel
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: MaterialX_Python_Wheels
name: MaterialX_Python_Wheel_${{ runner.os }}_3_${{ matrix.python-minor }}
path: wheelhouse/*.whl
Loading

0 comments on commit b22e289

Please sign in to comment.