From aec773f87350806dc4de1245afdd9c5833a38558 Mon Sep 17 00:00:00 2001 From: TNTwise <77559100+TNTwise@users.noreply.github.com> Date: Fri, 5 Jan 2024 01:46:40 +0000 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 67 +++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd99260..aa85f41 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -142,45 +142,52 @@ jobs: run: | sudo cp openmp-macos/include/* $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include sudo cp openmp-macos/lib/libomp.a $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib - - name: cache-vulkansdk - id: cache-vulkansdk - uses: actions/cache@v1 - with: - path: "vulkansdk-macos-1.2.189.0" - key: vulkansdk-macos-1.2.189.0 + - name: vulkansdk if: steps.cache-vulkansdk.outputs.cache-hit != 'true' run: | brew install vulkan-tools - wget https://sdk.lunarg.com/sdk/download/1.2.189.0/mac/vulkansdk-macos-1.2.189.0.dmg?Human=true -O vulkansdk-macos-1.2.189.0.dmg - hdiutil attach vulkansdk-macos-1.2.189.0.dmg - cp -r /Volumes/vulkansdk-macos-1.2.189.0 . + wget https://sdk.lunarg.com/sdk/download/1.3.261.1/mac/vulkansdk-macos-1.3.261.1.dmg?Human=true -O vulkansdk-macos-1.3.261.1.dmg + hdiutil attach vulkansdk-macos-1.3.261.1.dmg + cp -r /Volumes/vulkansdk-macos-1.3.261.1 . ls - rm -rf vulkansdk-macos-1.2.189.0/Applications - find vulkansdk-macos-1.2.189.0 -type f | grep -v -E 'vulkan|glslang|MoltenVK' | xargs rm - hdiutil detach /Volumes/vulkansdk-macos-1.2.189.0 + rm -rf vulkansdk-macos-1.3.261.1/Applications + find vulkansdk-macos-1.3.261.1 -type f | grep -v -E 'vulkan|glslang|MoltenVK' | xargs rm + hdiutil detach /Volumes/vulkansdk-macos-1.3.261.1 - name: build-x86_64 run: | - brew install vulkan-tools - wget https://sdk.lunarg.com/sdk/download/1.2.189.0/mac/vulkansdk-macos-1.2.189.0.dmg?Human=true -O vulkansdk-macos-1.2.189.0.dmg - hdiutil attach vulkansdk-macos-1.2.189.0.dmg - cp -r /Volumes/vulkansdk-macos-1.2.189.0 . - ls - rm -rf vulkansdk-macos-1.2.189.0/Applications - find vulkansdk-macos-1.2.189.0 -type f | grep -v -E 'vulkan|glslang|MoltenVK' | xargs rm - hdiutil detach /Volumes/vulkansdk-macos-1.2.189.0 - export VULKAN_SDK=`pwd`/vulkansdk-macos-1.2.189.0/macOS - mkdir build-x86_64 && cd build-x86_64 - cmake -DUSE_STATIC_MOLTENVK=ON -DCMAKE_OSX_ARCHITECTURES="x86_64" \ - -DOpenMP_C_FLAGS="-Xclang -fopenmp" -DOpenMP_CXX_FLAGS="-Xclang -fopenmp" \ - -DOpenMP_C_LIB_NAMES="libomp" -DOpenMP_CXX_LIB_NAMES="libomp" \ - -DOpenMP_libomp_LIBRARY="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libomp.a" \ - ../src - - cmake --build . -j 3 + export VULKAN_SDK=`pwd`/vulkansdk-macos-1.3.261.1/macOS + mkdir build-x86_64 && cd build-x86_64 + cmake -D USE_STATIC_MOLTENVK=ON -D CMAKE_OSX_ARCHITECTURES="x86_64" \ + -D OpenMP_C_FLAGS="-Xclang -fopenmp" -D OpenMP_CXX_FLAGS="-Xclang -fopenmp" \ + -D OpenMP_C_LIB_NAMES="libomp" -D OpenMP_CXX_LIB_NAMES="libomp" \ + -D OpenMP_libomp_LIBRARY="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libomp.a" \ + -D Vulkan_INCLUDE_DIR=`pwd`/../vulkansdk-macos-1.3.261.1/MoltenVK/include \ + -D Vulkan_LIBRARY=`pwd`/../vulkansdk-macos-1.3.261.1/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a \ + ../src + cmake --build . -j 3 + - name: install-openmp for arm64 + run: | + brew fetch --force --bottle-tag=arm64_monterey libomp + brew reinstall $(brew --cache --bottle-tag=arm64_monterey libomp) + sudo cp /usr/local/Cellar/libomp/$(brew list --versions libomp | grep -oE '[0-9]+\.[0-9]+\.[0-9]')/include/* $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include + sudo cp /usr/local/Cellar/libomp/$(brew list --versions libomp | grep -oE '[0-9]+\.[0-9]+\.[0-9]')/lib/libomp.a $DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib + - name: build-arm64 + run: | + export VULKAN_SDK=`pwd`/vulkansdk-macos-1.3.261.1/macOS + mkdir build-arm64 && cd build-arm64 + cmake -D USE_STATIC_MOLTENVK=ON -D CMAKE_OSX_ARCHITECTURES="arm64" \ + -D CMAKE_CROSSCOMPILING=ON -D CMAKE_SYSTEM_PROCESSOR=arm64 \ + -D OpenMP_C_FLAGS="-Xclang -fopenmp" -D OpenMP_CXX_FLAGS="-Xclang -fopenmp" \ + -D OpenMP_C_LIB_NAMES="libomp" -D OpenMP_CXX_LIB_NAMES="libomp" \ + -D OpenMP_libomp_LIBRARY="$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libomp.a" \ + -D Vulkan_INCLUDE_DIR=`pwd`/../vulkansdk-macos-1.3.261.1/MoltenVK/include \ + -D Vulkan_LIBRARY=`pwd`/../vulkansdk-macos-1.3.261.1/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a \ + ../src + cmake --build . -j 3 # - name: build-arm64 # run: | - # export VULKAN_SDK=`pwd`/vulkansdk-macos-1.2.189.0/macOS + # export VULKAN_SDK=`pwd`/vulkansdk-macos-1.3.261.1/macOS # mkdir build-arm64 && cd build-arm64 # cmake -DUSE_STATIC_MOLTENVK=ON -DCMAKE_OSX_ARCHITECTURES="arm64" \ # -DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR=arm64 \