diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc92024edf42b..123d87cc78b14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -195,7 +195,8 @@ jobs: - name: Create Python Wheel run: | - brew install molten-vk + # Use the molten-vk v1.1.10 downloaded from taichi assets + brew uninstall molten-vk -f export PATH=$(pwd)/taichi-llvm/bin/:$PATH .github/workflows/scripts/unix-build.sh env: diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 049c17a05d534..55a4afbfe40e7 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -228,7 +228,8 @@ jobs: - name: Build & Install if: needs.check_files.outputs.run_job == 'true' run: | - brew install molten-vk + # Use the molten-vk v1.1.10 downloaded from taichi assets + brew uninstall molten-vk -f .github/workflows/scripts/unix-build.sh env: CXX: clang++ diff --git a/cmake/TaichiCore.cmake b/cmake/TaichiCore.cmake index 1b9f912cc6174..8fa100e494890 100644 --- a/cmake/TaichiCore.cmake +++ b/cmake/TaichiCore.cmake @@ -332,12 +332,19 @@ endif() if (TI_WITH_VULKAN) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTI_WITH_VULKAN") if (APPLE) - find_library(MOLTEN_VK libMoltenVK.dylib PATHS $HOMEBREW_CELLAR/molten-vk $VULKAN_SDK REQUIRED) - configure_file(${MOLTEN_VK} ${CMAKE_BINARY_DIR}/libMoltenVK.dylib COPYONLY) - message(STATUS "MoltenVK library ${MOLTEN_VK}") - if (EXISTS ${CMAKE_BINARY_DIR}/libMoltenVK.dylib) - install(FILES ${CMAKE_BINARY_DIR}/libMoltenVK.dylib DESTINATION ${INSTALL_LIB_DIR}/runtime) + # The latest Molten-vk v1.2.0 and v1.1.11 breaks GGUI: mpm3d_ggui.py + # So we have to manually download and install Molten-vk v1.10.0 + # + # Uncomment the following lines if the mpm3d_ggui.py runs well with the latest Molten-vk + #find_library(MOLTEN_VK libMoltenVK.dylib PATHS $HOMEBREW_CELLAR/molten-vk $VULKAN_SDK REQUIRED) + #configure_file(${MOLTEN_VK} ${CMAKE_BINARY_DIR}/libMoltenVK.dylib COPYONLY) + #message(STATUS "MoltenVK library ${MOLTEN_VK}") + + if(NOT EXISTS ${CMAKE_BINARY_DIR}/libMoltenVK.dylib) + execute_process(COMMAND curl -L -o ${CMAKE_BINARY_DIR}/libMoltenVK.zip https://github.com/taichi-dev/taichi_assets/files/9977436/libMoltenVK.dylib.zip) + execute_process(COMMAND tar -xf ${CMAKE_BINARY_DIR}/libMoltenVK.zip --directory ${CMAKE_BINARY_DIR}) endif() + install(FILES ${CMAKE_BINARY_DIR}/libMoltenVK.dylib DESTINATION ${INSTALL_LIB_DIR}/runtime) endif() add_subdirectory(taichi/rhi/vulkan) add_subdirectory(taichi/runtime/program_impls/vulkan)