-
Notifications
You must be signed in to change notification settings - Fork 352
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 nikelsm/materialx_dev
- Loading branch information
Showing
87 changed files
with
2,722 additions
and
686 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
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 |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: python | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# Generate the sdist first. We'll use it to create the wheels. | ||
# https://packaging.python.org/en/latest/flow#the-source-distribution-sdist | ||
sdist: | ||
name: Generate Source Distribution | ||
runs-on: ubuntu-latest | ||
outputs: | ||
sdist_filename: ${{ steps.generate.outputs.filename }} | ||
|
||
steps: | ||
- name: Sync Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install Build Command | ||
run: python -m pip install build | ||
|
||
- name: Generate Sdist | ||
id: generate | ||
run: | | ||
python -m build -s . --outdir dist | ||
echo "filename=$(ls dist)" >> "$GITHUB_OUTPUT" | ||
- name: Upload Sdist | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: MaterialX_Python_Source_Distribution | ||
path: ./dist/*.tar.gz | ||
|
||
# Create the wheels. It'll use the sdist to confirm that we can compile MaterialX from the sdist. | ||
# https://packaging.python.org/en/latest/flow#the-built-distributions-wheels | ||
wheels: | ||
name: Generate Wheel | ||
runs-on: ${{ matrix.os }} | ||
needs: ['sdist'] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['37', '38', '39', '310', '311'] | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
|
||
steps: | ||
- name: Download Sdist | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: MaterialX_Python_Source_Distribution | ||
path: sdist | ||
|
||
- name: Build Wheel | ||
# https://cibuildwheel.readthedocs.io/en/stable/ | ||
uses: pypa/cibuildwheel@v2.12.1 | ||
with: | ||
# Build from the sdist. We want to make sure it's valid and works as expected. | ||
package-dir: ${{ github.workspace }}/sdist/${{ needs.sdist.outputs.sdist_filename }} | ||
output-dir: wheels | ||
env: | ||
CIBW_BUILD: 'cp${{ matrix.python-version }}-*' | ||
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: Upload Wheel | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: MaterialX_Python_Wheels | ||
path: ./wheels/*.whl | ||
|
||
test: | ||
name: Test Wheel | ||
needs: ['wheels'] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Download Wheels | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: MaterialX_Python_Wheels | ||
path: wheels | ||
|
||
- name: Install Wheel | ||
run: python -m pip install MaterialX --find-links wheels --no-index | ||
|
||
- name: Python Tests | ||
shell: bash | ||
run: | | ||
set -e | ||
python python/MaterialXTest/main.py | ||
python python/MaterialXTest/genshader.py | ||
python python/Scripts/mxformat.py ./resources/Materials/TestSuite/stdlib/upgrade --yes --upgrade | ||
python python/Scripts/mxvalidate.py ./resources/Materials/Examples/StandardSurface/standard_surface_marble_solid.mtlx --stdlib --verbose | ||
python python/Scripts/mxdoc.py --docType md ./libraries/pbrlib/pbrlib_defs.mtlx | ||
python python/Scripts/mxdoc.py --docType html ./libraries/bxdf/standard_surface.mtlx | ||
python python/Scripts/generateshader.py ./resources/Materials/Examples/StandardSurface --target glsl | ||
python python/Scripts/generateshader.py ./resources/Materials/Examples/StandardSurface --target osl | ||
python python/Scripts/generateshader.py ./resources/Materials/Examples/StandardSurface --target mdl | ||
python python/Scripts/generateshader.py ./resources/Materials/Examples/StandardSurface --target msl |
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
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
#define MATERIALX_FILEVERSION @MATERIALX_MAJOR_VERSION@,@MATERIALX_MINOR_VERSION@,@MATERIALX_BUILD_VERSION@,0 | ||
#define MATERIALX_FILEVERSION_STR "@MATERIALX_MAJOR_VERSION@.@MATERIALX_MINOR_VERSION@.@MATERIALX_BUILD_VERSION@.0\0" | ||
#define MATERIALX_FILENAME_STR "@MATERIALX_MODULE_NAME@.dll\0" | ||
|
||
1 VERSIONINFO | ||
FILEVERSION MATERIALX_FILEVERSION | ||
PRODUCTVERSION MATERIALX_FILEVERSION | ||
FILEFLAGSMASK 0x3fL | ||
#ifdef _DEBUG | ||
FILEFLAGS 0x1L | ||
#else | ||
FILEFLAGS 0x0L | ||
#endif | ||
FILEOS 0x4L | ||
FILETYPE 0x1L | ||
FILESUBTYPE 0x0L | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904E4" | ||
BEGIN | ||
VALUE "FileVersion", MATERIALX_FILEVERSION_STR | ||
VALUE "LegalCopyright", "Apache License 2.0\0" | ||
VALUE "OriginalFilename", MATERIALX_FILENAME_STR | ||
VALUE "ProductName", "MaterialX\0" | ||
VALUE "ProductVersion", MATERIALX_FILEVERSION_STR | ||
END | ||
END | ||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x409, 1252 | ||
END | ||
END |
Oops, something went wrong.