Skip to content

Commit

Permalink
Merge branch 'AcademySoftwareFoundation:main' into adsk_contrib/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolassavva-autodesk authored Oct 22, 2023
2 parents cf3306e + 78d2762 commit 220ff58
Show file tree
Hide file tree
Showing 90 changed files with 1,517 additions and 1,862 deletions.
61 changes: 44 additions & 17 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 @@ -120,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 Down Expand Up @@ -222,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 @@ -279,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
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ option(MATERIALX_INSTALL_PYTHON "Install the MaterialX Python package as a third
option(MATERIALX_INSTALL_RESOURCES "Install the resources folder when building render modules." ON)
option(MATERIALX_TEST_RENDER "Run rendering tests for MaterialX Render module. GPU required for graphics validation." ON)
option(MATERIALX_WARNINGS_AS_ERRORS "Interpret all compiler warnings as errors." OFF)
option(MATERIALX_COVERAGE_ANALYSIS "Build MaterialX libraries with coverage analysis on supporting platforms." OFF)
option(MATERIALX_DYNAMIC_ANALYSIS "Build MaterialX libraries with dynamic analysis on supporting platforms." OFF)
option(MATERIALX_OSL_LEGACY_CLOSURES "Build OSL shader generation supporting the legacy OSL closures." ON)

Expand Down Expand Up @@ -140,6 +141,7 @@ mark_as_advanced(MATERIALX_INSTALL_PYTHON)
mark_as_advanced(MATERIALX_INSTALL_RESOURCES)
mark_as_advanced(MATERIALX_TEST_RENDER)
mark_as_advanced(MATERIALX_WARNINGS_AS_ERRORS)
mark_as_advanced(MATERIALX_COVERAGE_ANALYSIS)
mark_as_advanced(MATERIALX_DYNAMIC_ANALYSIS)
mark_as_advanced(MATERIALX_PYTHON_VERSION)
mark_as_advanced(MATERIALX_PYTHON_EXECUTABLE)
Expand Down Expand Up @@ -230,6 +232,10 @@ else()
if(MATERIALX_WARNINGS_AS_ERRORS)
add_compile_options(-Werror)
endif()
if(MATERIALX_COVERAGE_ANALYSIS)
add_compile_options(--coverage -O0)
add_link_options(--coverage)
endif()
if(MATERIALX_DYNAMIC_ANALYSIS)
set(DYNAMIC_ANALYSIS_OPTIONS -fsanitize=address -fsanitize=leak -fsanitize=undefined -fno-sanitize-recover=all)
add_compile_options(${DYNAMIC_ANALYSIS_OPTIONS})
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ The Open Chess Set is an open reference asset, consisting of a [MaterialX file](

The following packages contain pre-built binaries for the latest release, including the MaterialX viewer, Python libraries, and example assets:

- [Microsoft Windows (Visual Studio 2022, Python 3.9)](https://github.com/AcademySoftwareFoundation/MaterialX/releases/latest/download/MaterialX_Windows_VS2022_x64_Python39.zip)
- [MacOS (Xcode 13, Python 3.9)](https://github.com/AcademySoftwareFoundation/MaterialX/releases/latest/download/MaterialX_MacOS_Xcode_13_Python39.zip)
- [Linux (GCC 11, Python 3.9)](https://github.com/AcademySoftwareFoundation/MaterialX/releases/latest/download/MaterialX_Linux_GCC_11_Python39.zip)
- [Microsoft Windows (Visual Studio 2022, Python 3.11)](https://github.com/AcademySoftwareFoundation/MaterialX/releases/latest/download/MaterialX_Windows_VS2022_x64_Python311.zip)
- [MacOS (Xcode 14, Python 3.11)](https://github.com/AcademySoftwareFoundation/MaterialX/releases/latest/download/MaterialX_MacOS_Xcode_14_Python311.zip)
- [Linux (GCC 12, Python 3.11)](https://github.com/AcademySoftwareFoundation/MaterialX/releases/latest/download/MaterialX_Linux_GCC_12_Python311.zip)

### Additional Resources

- The [Developer Guide](http://www.materialx.org/docs/api/index.html) contains a developer-oriented overview of MaterialX with API documentation.
- The [Python Scripts](python/Scripts) folder contains standalone examples of MaterialX Python code.
- The [JavaScript](javascript) folder contains details on building JavaScript bindings for MaterialX.
- Presentations at [ASWF Open Source Days](http://www.materialx.org/assets/ASWF_OSD2022_MaterialX_OSL_Final.pdf) and the [SIGGRAPH Physically Based Shading Course](https://blog.selfshadow.com/publications/s2020-shading-course/#materialx) provide details on the roadmap for MaterialX development.
- Presentations at [ASWF Open Source Days](https://materialx.org/assets/ASWF_OSD2023_MaterialX_Final.pdf) and the [SIGGRAPH Physically Based Shading Course](https://blog.selfshadow.com/publications/s2020-shading-course/#materialx) provide details on the roadmap for MaterialX development.
2 changes: 1 addition & 1 deletion documents/DeveloperGuide/MainPage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MaterialX Overview

MaterialX is an open standard for transfer of rich material and look-development content between applications and renderers. Originated at Lucasfilm in 2012, MaterialX has been used by Industrial Light & Magic (ILM) in feature films such as _Star Wars: The Force Awakens_ and real-time experiences such as _Trials on Tatooine_, and it remains the central material format for new ILM productions.
MaterialX is an open standard for representing rich material and look-development content in computer graphics, enabling its platform-independent description and exchange across applications and renderers. Launched at [Industrial Light & Magic](https://www.ilm.com/) in 2012, MaterialX has been a key technology in their feature films and real-time experiences since _Star Wars: The Force Awakens_ and _Millennium Falcon: Smugglers Run_. The project was released as open source in 2017, with companies including Sony Pictures Imageworks, Pixar, Autodesk, Adobe, and SideFX contributing to its ongoing development. In 2021, MaterialX became the seventh hosted project of the [Academy Software Foundation](https://www.aswf.io/).

### Quick Start for Developers

Expand Down
Loading

0 comments on commit 220ff58

Please sign in to comment.