forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into adsk/bugfix/module_path_fix_python_3_8
Signed-off-by: JGamache-autodesk <[email protected]>
- Loading branch information
Showing
176 changed files
with
4,813 additions
and
2,848 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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) | ||
|
@@ -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: | | ||
|
@@ -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: | | ||
|
@@ -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: | | ||
|
@@ -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/[email protected] | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
build | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.