From 69c1009c7b13caae4040f561ddcc6d0f17db341f Mon Sep 17 00:00:00 2001 From: Luca Scheller Date: Wed, 20 Mar 2024 21:28:55 -0700 Subject: [PATCH] Add artifact build collect for Maya --- .github/scripts/maya.py | 14 +------------- .github/workflows/build_maya.yml | 5 +++-- src/CachedResolver/CMakeLists.txt | 2 +- src/FileResolver/CMakeLists.txt | 2 +- src/PythonResolver/CMakeLists.txt | 4 ++-- 5 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/scripts/maya.py b/.github/scripts/maya.py index 2d62a05..81de85d 100644 --- a/.github/scripts/maya.py +++ b/.github/scripts/maya.py @@ -273,20 +273,8 @@ def create_autodesk_maya_artifact(artifact_src, artifact_dst, artifact_prefix, a """ re_digitdot = re.compile("[^0-9.]") autodesk_platform = get_autodesk_platform() - if autodesk_platform == "linux": - hfs_build_name = os.path.basename(pathlib.Path("/opt/hfs").resolve()) - elif autodesk_platform == "win64": - hfs_build_name = os.path.basename( - pathlib.Path("C:\Program Files\Side Effects Software\Houdini").resolve() - ) - else: - raise Exception( - "Platform {platform} is currently not" - "supported!".format(platform=platform) - ) - hfs_build_name = re_digitdot.sub("", hfs_build_name) artifact_file_path = os.path.join( - artifact_dst, f"{artifact_prefix}_{artifact_product_name}-{hfs_build_name}-{sidefx_platform}" + artifact_dst, f"{artifact_prefix}_{artifact_product_name}-debug-{autodesk_platform}" ) artifact_dir_path = os.path.dirname(artifact_file_path) if not os.path.exists(artifact_dir_path): diff --git a/.github/workflows/build_maya.yml b/.github/workflows/build_maya.yml index 0f8b8e1..a5e88c3 100644 --- a/.github/workflows/build_maya.yml +++ b/.github/workflows/build_maya.yml @@ -39,7 +39,8 @@ jobs: sudo pip3 install requests - name: Install maya run: | - sudo --preserve-env python3 .github/scripts/maya.py --install --install_maya_product_name ${{ matrix.maya_product_name }} --install_maya_product_version ${{ matrix.maya_product_version }} + repo_root=$(cd .; pwd) + sudo --preserve-env python3 .github/scripts/maya.py --install --install_maya_product_name ${{ matrix.maya_product_name }} --install_maya_product_version ${{ matrix.maya_product_version }} --install_directory $repo_root/dependency - name: Build USD File Resolver run: | .github/scripts/maya_build.sh fileResolver @@ -84,7 +85,7 @@ jobs: pip3 install requests - name: Install Maya run: | - python3 .github\scripts\maya.py --install --install_maya_product_name ${{ matrix.maya_product_name }} --install_maya_product_version ${{ matrix.maya_product_version }} + python3 .github\scripts\maya.py --install --install_maya_product_name ${{ matrix.maya_product_name }} --install_maya_product_version ${{ matrix.maya_product_version }} --install_directory $pwd\dependency - name: Build USD File Resolver run: | .\.github\scripts\maya_build.bat fileResolver diff --git a/src/CachedResolver/CMakeLists.txt b/src/CachedResolver/CMakeLists.txt index 7202090..6e58e2f 100644 --- a/src/CachedResolver/CMakeLists.txt +++ b/src/CachedResolver/CMakeLists.txt @@ -123,7 +123,7 @@ install( set(TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/testenv) set(TESTS_ENV_PYTHONPATH "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${AR_CACHEDRESOLVER_USD_PLUGIN_NAME}/lib/python${AR_ARCH_PATH_SEP}${AR_PXR_PYTHON_LIB_SITEPACKAGES}") set(TESTS_ENV_PXR_PLUGINPATH_NAME "PXR_PLUGINPATH_NAME=${CMAKE_INSTALL_PREFIX}/${AR_CACHEDRESOLVER_USD_PLUGIN_NAME}/resources") -set(TESTS_ENV_LD_LIBRARY_PATH "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${AR_CACHEDRESOLVER_USD_PLUGIN_NAME}/lib") +set(TESTS_ENV_LD_LIBRARY_PATH "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${AR_CACHEDRESOLVER_USD_PLUGIN_NAME}/lib${AR_ARCH_PATH_SEP}${AR_PYTHON_LIB_DIR}") set(TESTS_PYTHON_COMMAND ${AR_PYTHON_EXECUTABLE} -B -m unittest discover ${TESTS_SOURCE_DIR}) add_test( diff --git a/src/FileResolver/CMakeLists.txt b/src/FileResolver/CMakeLists.txt index c7ece14..43f2ea0 100644 --- a/src/FileResolver/CMakeLists.txt +++ b/src/FileResolver/CMakeLists.txt @@ -107,7 +107,7 @@ install( set(TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/testenv) set(TESTS_ENV_PYTHONPATH "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${AR_FILERESOLVER_USD_PLUGIN_NAME}/lib/python${AR_ARCH_PATH_SEP}${AR_PXR_PYTHON_LIB_SITEPACKAGES}") set(TESTS_ENV_PXR_PLUGINPATH_NAME "PXR_PLUGINPATH_NAME=${CMAKE_INSTALL_PREFIX}/${AR_FILERESOLVER_USD_PLUGIN_NAME}/resources") -set(TESTS_ENV_LD_LIBRARY_PATH "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${AR_FILERESOLVER_USD_PLUGIN_NAME}/lib") +set(TESTS_ENV_LD_LIBRARY_PATH "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${AR_FILERESOLVER_USD_PLUGIN_NAME}/lib${AR_ARCH_PATH_SEP}${AR_PYTHON_LIB_DIR}") set(TESTS_ENV_AR_SEARCH_PATHS "AR_SEARCH_PATHS=/env/search/pathA:/env/search/pathB") set(TESTS_ENV_AR_SEARCH_REGEX_EXPRESSION "AR_SEARCH_REGEX_EXPRESSION=(v\\d\\d\\d)") set(TESTS_ENV_AR_SEARCH_REGEX_FORMAT "AR_SEARCH_REGEX_FORMAT=v000") diff --git a/src/PythonResolver/CMakeLists.txt b/src/PythonResolver/CMakeLists.txt index c2739f6..0bfdd35 100644 --- a/src/PythonResolver/CMakeLists.txt +++ b/src/PythonResolver/CMakeLists.txt @@ -112,9 +112,9 @@ install( ### Tests ### set(TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/testenv) -set(TESTS_ENV_PYTHONPATH "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${AR_PYTHONRESOLVER_USD_PLUGIN_NAME}/lib/python") +set(TESTS_ENV_PYTHONPATH "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${AR_PYTHONRESOLVER_USD_PLUGIN_NAME}/lib/python${AR_ARCH_PATH_SEP}${AR_PXR_PYTHON_LIB_SITEPACKAGES}") set(TESTS_ENV_PXR_PLUGINPATH_NAME "PXR_PLUGINPATH_NAME=${CMAKE_INSTALL_PREFIX}/${AR_PYTHONRESOLVER_USD_PLUGIN_NAME}/resources") -set(TESTS_ENV_LD_LIBRARY_PATH "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${AR_PYTHONRESOLVER_USD_PLUGIN_NAME}/lib") +set(TESTS_ENV_LD_LIBRARY_PATH "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${AR_PYTHONRESOLVER_USD_PLUGIN_NAME}/lib${AR_ARCH_PATH_SEP}${AR_PYTHON_LIB_DIR}") set(TESTS_ENV_AR_SEARCH_PATHS "AR_SEARCH_PATHS=/env/search/pathA:/env/search/pathB") set(TESTS_ENV_AR_SEARCH_REGEX_EXPRESSION "AR_SEARCH_REGEX_EXPRESSION=(v\\d\\d\\d)") set(TESTS_ENV_AR_SEARCH_REGEX_FORMAT "AR_SEARCH_REGEX_FORMAT=v000")