Skip to content

Commit

Permalink
Merge branch 'main' into adsk/bugfix/module_path_fix_python_3_8
Browse files Browse the repository at this point in the history
Signed-off-by: JGamache-autodesk <56274617+JGamache-autodesk@users.noreply.github.com>
  • Loading branch information
JGamache-autodesk committed Oct 25, 2023
2 parents 0220de7 + 926ac27 commit 1dd05ef
Show file tree
Hide file tree
Showing 176 changed files with 4,813 additions and 2,848 deletions.
161 changes: 139 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ jobs:
python: 3.11
upload_shaders: ON

- name: Linux_GCC_CoverageAnalysis
os: ubuntu-22.04
compiler: gcc
compiler_version: "None"
python: None
coverage_analysis: ON
cmake_config: -DMATERIALX_COVERAGE_ANALYSIS=ON -DMATERIALX_BUILD_RENDER=OFF -DMATERIALX_BUILD_PYTHON=OFF

- name: Linux_Clang_10_Python37
os: ubuntu-20.04
compiler: clang
Expand Down Expand Up @@ -83,6 +91,13 @@ jobs:
python: 3.11
test_shaders: ON

- name: iOS_Xcode_15
os: macos-13
compiler: xcode
compiler_version: "15.0"
python: None
cmake_config: -DMATERIALX_BUILD_IOS=ON -DCMAKE_OSX_SYSROOT=`xcrun --sdk iphoneos --show-sdk-path` -DCMAKE_OSX_ARCHITECTURES=arm64

- name: Windows_VS2019_Win32_Python37
os: windows-2019
architecture: x86
Expand Down Expand Up @@ -113,28 +128,32 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install xorg-dev mesa-utils
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.compiler_version }} g++-${{ matrix.compiler_version }}-multilib
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
echo "CC=clang-${{ matrix.compiler_version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
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
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
echo "CC=clang-${{ matrix.compiler_version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
fi
fi
- name: Install Dependencies (MacOS)
if: runner.os == 'macOS'
run: |
if [ "${{ matrix.compiler }}" = "gcc" ]; then
brew install gcc@${{ matrix.compiler_version }}
echo "CC=gcc-${{ matrix.compiler_version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
else
ls -ls /Applications/
sudo xcode-select -switch /Applications/Xcode_${{ matrix.compiler_version }}.app
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
if [ "${{ matrix.compiler_version }}" != 'None' ]; then
if [ "${{ matrix.compiler }}" = "gcc" ]; then
brew install gcc@${{ matrix.compiler_version }}
echo "CC=gcc-${{ matrix.compiler_version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
else
ls -ls /Applications/
sudo xcode-select -switch /Applications/Xcode_${{ matrix.compiler_version }}.app
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
fi
fi
- name: Install Dependencies (Windows)
Expand All @@ -153,11 +172,6 @@ jobs:
python-version: ${{ matrix.python }}
architecture: ${{ matrix.architecture }}

- name: Install OpenImageIO
if: matrix.install_oiio == 'ON' && runner.os == 'Windows'
run: |
vcpkg/vcpkg install openimageio --triplet=x64-windows
- name: Install Emscripten
if: matrix.build_javascript == 'ON'
run: |
Expand Down Expand Up @@ -220,6 +234,14 @@ jobs:
run: |
python python/Scripts/generateshader.py resources/Materials/Examples/StandardSurface --target msl --validator "xcrun metal --language=metal" --validatorArgs="-w"
- name: Coverage Analysis Tests
if: matrix.coverage_analysis == 'ON'
run: |
sudo apt-get install gcovr
mkdir coverage
gcovr --html --html-details --output coverage/index.html --exclude .*\/External\/.* --root .. .
working-directory: build

- name: Static Analysis Tests
if: matrix.static_analysis == 'ON' && runner.os == 'Linux'
run: |
Expand Down Expand Up @@ -277,6 +299,13 @@ jobs:
name: Renders_${{ matrix.name }}
path: build/render/*.png

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

- name: JavaScript CMake Generate
if: matrix.build_javascript == 'ON'
run: |
Expand Down Expand Up @@ -319,3 +348,91 @@ jobs:
name: MaterialX_JavaScript
path: javascript/build/installed/JavaScript/MaterialX
if-no-files-found: ignore

sdist:
name: Python SDist
runs-on: ubuntu-latest
if: github.repository == 'AcademySoftwareFoundation/MaterialX'
outputs:
sdist_filename: ${{ steps.generate.outputs.filename }}

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

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

- name: Build SDist
id: generate
run: |
python -m pip install build
python -m build -s . --outdir dist
echo "filename=$(ls dist)" >> "$GITHUB_OUTPUT"
- name: Upload SDist
uses: actions/upload-artifact@v3
with:
name: MaterialX_Python_SDist
path: dist/*.tar.gz

wheels:
name: Python Wheels
runs-on: ${{ matrix.os }}
needs: ['sdist']
if: github.repository == 'AcademySoftwareFoundation/MaterialX'
strategy:
fail-fast: false
matrix:
python-minor: ['7', '8', '9', '10', '11']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']

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

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

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

- name: Build Wheel
uses: pypa/cibuildwheel@v2.13.1
with:
package-dir: ${{ github.workspace }}/sdist/${{ needs.sdist.outputs.sdist_filename }}
env:
CIBW_BUILD: 'cp3${{ matrix.python-minor }}-*'
CIBW_SKIP: '*musllinux*'
CIBW_ARCHS: 'auto64'
# https://github.com/pypa/manylinux
# 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
MACOSX_DEPLOYMENT_TARGET: '10.15'

- name: Install Wheel
run: python -m pip install MaterialX --find-links wheelhouse --no-index

- name: Python Tests
run: |
python MaterialXTest/main.py
python MaterialXTest/genshader.py
working-directory: python

- name: Upload Wheel
uses: actions/upload-artifact@v3
with:
name: MaterialX_Python_Wheels
path: wheelhouse/*.whl
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
dist
38 changes: 37 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
# Change Log

## [1.38.8] - Development
## [1.38.9] - Development

## [1.38.8] - 2023-09-08

### Added
- Added a broad set of new pattern nodes to MaterialX, including [Circle, Hexagon, Cloverleaf, Line, Grid, Crosshatch](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1411), [Checkerboard](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1328), [Random Color, Random Float](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1330), [Triangle Wave](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1334), [Integer Floor, Integer Ceiling](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1362), and [Distance](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1333).
- Added support for [MaterialX builds on iOS](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1435).
- Added support for [drag-and-drop import](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1482) of MaterialX files in the [Web Viewer](https://academysoftwarefoundation.github.io/MaterialX/).
- Added generation of [MaterialX Python wheels](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1317) in GitHub Actions, enabling the distribution of MaterialX Python packages through PyPI.
- Added support for the [lin_displayp3 and srgb_displayp3](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1368) colorspaces in shader generation.
- Added support for the [blackbody PBR node](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1367) in shader generation.
- Added support for [displacement](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1396) in MDL generation.
- Added [blend](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1350) and [up-axis](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1489) controls to the triplanar projection node.
- Added version details to [shared libraries](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1447) on Windows.
- Added a [MacOS 13](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1375) build to GitHub Actions.

### Changed
- Raised the minimum C++ version for MaterialX builds to [C++14](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1340).
- Upgraded the [PyBind11 library](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1343) to version 2.10.4, raising the minimum Python version to 3.6, and enabling support for Python versions 3.11 and beyond.
- Improved the performance and convergence of [GGX importance sampling](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1390) in GLSL generation, leveraging insights from the HPG 2023 paper by Jonathan Dupuy and Anis Benyoub.
- Improved [property panel display](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1346) in the MaterialX Graph Editor.
- Improved [node spacing](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1476) in the MaterialX Graph Editor.
- Improved the robustness of [MaterialX unit tests](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1370) with respect to the current working directory.
- Simplified the handling of [default colors](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1452) in GLSL generation, removing dynamic branches on texture size.
- Simplified the definitions of the [default color transforms](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1352), implementing them as language-independent MaterialX graphs.
- Simplified the interface of [ShaderGenerator::emitFunctionCall](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1344), marking its original interface as deprecated.
- Marked legacy interfaces for [findRenderableElements and findRenderableMaterialNodes](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1340) as deprecated, making their usage visible to clients as compiler warnings.
- Moved the MaterialX specification to [public Markdown files in GitHub](https://github.com/AcademySoftwareFoundation/MaterialX/tree/main/documents/Specification), enabling direct contributions from the community.

### Fixed
- Fixed brightness artifacts in the [triplanar projection node](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1350).
- Aligned default values for [conductor_bsdf](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1379) with the MaterialX specification.
- Fixed [volume mixing](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1395) in MDL generation.
- Fixed a bug to improve [shader generation determinism](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1376).
- Fixed a bug to improve the [consistency of auto layout](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1389) in the MaterialX Graph Editor.
- Fixed a bug to enable [multi-output connection edits](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1506) in the MaterialX Graph Editor.
- Fixed a bug in [dot node optimizations](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1522) for shader generation.

## [1.38.7] - 2023-04-21

Expand Down
Loading

0 comments on commit 1dd05ef

Please sign in to comment.