Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TNTwise authored Jan 5, 2024
1 parent d2c8b33 commit aec773f
Showing 1 changed file with 37 additions and 30 deletions.
67 changes: 37 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit aec773f

Please sign in to comment.