Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to vulkan version in CI build and release #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI
on: [push, pull_request]
env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
jobs:
windows:
runs-on: windows-latest
Expand All @@ -14,13 +14,13 @@ jobs:
uses: actions/cache@v1
with:
path: "VulkanSDK"
key: VulkanSDK-1.2.162.0-Installer
key: VulkanSDK-1.3.239.0-Installer
- name: vulkansdk
if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.2.162.0/windows/VulkanSDK-1.2.162.0-Installer.exe?Human=true -OutFile VulkanSDK-1.2.162.0-Installer.exe
7z x -aoa ./VulkanSDK-1.2.162.0-Installer.exe -oVulkanSDK
Remove-Item .\VulkanSDK\Demos, .\VulkanSDK\Samples, .\VulkanSDK\Third-Party, .\VulkanSDK\Tools, .\VulkanSDK\Tools32, .\VulkanSDK\Bin32, .\VulkanSDK\Lib32 -Recurse
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.3.239.0/windows/VulkanSDK-1.3.239.0-Installer.exe?Human=true -OutFile VulkanSDK-1.3.239.0-Installer.exe
7z x -aoa ./VulkanSDK-1.3.239.0-Installer.exe -oVulkanSDK
Remove-Item .\VulkanSDK\Demos -Recurse
- name: build
run: |
$env:VULKAN_SDK="$(pwd)/VulkanSDK"
Expand All @@ -38,22 +38,22 @@ jobs:
id: cache-vulkansdk
uses: actions/cache@v1
with:
path: "1.2.162.0"
key: vulkansdk-linux-x86_64-1.2.162.0
path: "1.3.239.0"
key: vulkansdk-linux-x86_64-1.3.239.0
- name: vulkansdk
if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
run: |
wget https://sdk.lunarg.com/sdk/download/1.2.162.0/linux/vulkansdk-linux-x86_64-1.2.162.0.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.2.162.0.tar.gz
tar -xf vulkansdk-linux-x86_64-1.2.162.0.tar.gz
rm -rf 1.2.162.0/source 1.2.162.0/samples
find 1.2.162.0 -type f | grep -v -E 'vulkan|glslang' | xargs rm
wget https://sdk.lunarg.com/sdk/download/1.3.239.0/linux/vulkansdk-linux-x86_64-1.3.239.0.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.3.239.0.tar.gz
tar -xf vulkansdk-linux-x86_64-1.3.239.0.tar.gz
rm -rf 1.3.239.0/source 1.3.239.0/samples
find 1.3.239.0 -type f | grep -v -E 'vulkan|glslang' | xargs rm
- name: build
run: |
export VULKAN_SDK=`pwd`/1.2.162.0/x86_64
export VULKAN_SDK=`pwd`/1.3.239.0/x86_64
mkdir build && cd build
cmake ../src
cmake --build . -j 2

macos:
runs-on: macos-latest
steps:
Expand All @@ -64,32 +64,32 @@ jobs:
id: cache-vulkansdk
uses: actions/cache@v1
with:
path: "vulkansdk-macos-1.2.162.0"
key: vulkansdk-macos-1.2.162.0
path: "vulkansdk-macos-1.3.239.0"
key: vulkansdk-macos-1.3.239.0
- name: vulkansdk
if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
run: |
wget https://sdk.lunarg.com/sdk/download/1.2.162.0/mac/vulkansdk-macos-1.2.162.0.dmg?Human=true -O vulkansdk-macos-1.2.162.0.dmg
hdiutil attach vulkansdk-macos-1.2.162.0.dmg
cp -r /Volumes/vulkansdk-macos-1.2.162.0 .
rm -rf vulkansdk-macos-1.2.162.0/Applications
find vulkansdk-macos-1.2.162.0 -type f | grep -v -E 'vulkan|glslang|MoltenVK' | xargs rm
hdiutil detach /Volumes/vulkansdk-macos-1.2.162.0
wget https://sdk.lunarg.com/sdk/download/1.3.239.0/mac/vulkansdk-macos-1.3.239.0.dmg?Human=true -O vulkansdk-macos-1.3.239.0.dmg
hdiutil attach vulkansdk-macos-1.3.239.0.dmg
sudo /Volumes/vulkansdk-macos-1.3.239.0/InstallVulkan.app/Contents/MacOS/InstallVulkan --root $GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0 --accept-licenses --default-answer --confirm-command install
hdiutil detach /Volumes/vulkansdk-macos-1.3.239.0
- name: build-x86_64
run: |
export VULKAN_SDK=`pwd`/vulkansdk-macos-1.2.162.0/macOS
export VULKAN_SDK=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/macOS
mkdir build-x86_64 && cd build-x86_64
cmake -DUSE_STATIC_MOLTENVK=ON -DCMAKE_OSX_ARCHITECTURES="x86_64" \
-DVulkan_INCLUDE_DIR=`pwd`/../vulkansdk-macos-1.2.162.0/MoltenVK/include \
-DVulkan_LIBRARY=`pwd`/../vulkansdk-macos-1.2.162.0/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a \
-DVulkan_INCLUDE_DIR=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/MoltenVK/include \
-DVulkan_LIBRARY=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/MoltenVK/dylib/macOS/libMoltenVK.dylib \
-DNCNN_VULKAN=ON -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF \
../src
cmake --build . -j 3
- name: build-arm64
run: |
export VULKAN_SDK=`pwd`/vulkansdk-macos-1.2.162.0/macOS
export VULKAN_SDK=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/macOS
mkdir build-arm64 && cd build-arm64
cmake -DUSE_STATIC_MOLTENVK=ON -DCMAKE_OSX_ARCHITECTURES="arm64" \
-DVulkan_INCLUDE_DIR=`pwd`/../vulkansdk-macos-1.2.162.0/MoltenVK/include \
-DVulkan_LIBRARY=`pwd`/../vulkansdk-macos-1.2.162.0/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a \
-DVulkan_INCLUDE_DIR=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/MoltenVK/include \
-DVulkan_LIBRARY=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/MoltenVK/dylib/macOS/libMoltenVK.dylib \
-DNCNN_VULKAN=ON -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF \
../src
cmake --build . -j 3
50 changes: 24 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- '*'

env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
APPLICATION_NAME: realsr-ncnn-vulkan

jobs:
Expand Down Expand Up @@ -36,18 +36,18 @@ jobs:
id: cache-vulkansdk
uses: actions/cache@v1
with:
path: "1.2.162.0"
key: vulkansdk-linux-x86_64-1.2.162.0
path: "1.3.239.0"
key: vulkansdk-linux-x86_64-1.3.239.0
- name: vulkansdk
if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
run: |
wget https://sdk.lunarg.com/sdk/download/1.2.162.0/linux/vulkansdk-linux-x86_64-1.2.162.0.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.2.162.0.tar.gz
tar -xf vulkansdk-linux-x86_64-1.2.162.0.tar.gz
rm -rf 1.2.162.0/source 1.2.162.0/samples
find 1.2.162.0 -type f | grep -v -E 'vulkan|glslang' | xargs rm
wget https://sdk.lunarg.com/sdk/download/1.3.239.0/linux/vulkansdk-linux-x86_64-1.3.239.0.tar.gz?Human=true -O vulkansdk-linux-x86_64-1.3.239.0.tar.gz
tar -xf vulkansdk-linux-x86_64-1.3.239.0.tar.gz
rm -rf 1.3.239.0/source 1.3.239.0/samples
find 1.3.239.0 -type f | grep -v -E 'vulkan|glslang' | xargs rm
- name: build
run: |
export VULKAN_SDK=`pwd`/1.2.162.0/x86_64
export VULKAN_SDK=`pwd`/1.3.239.0/x86_64
mkdir build && cd build
cmake ../src
cmake --build . -j 2
Expand Down Expand Up @@ -139,40 +139,38 @@ jobs:
id: cache-vulkansdk
uses: actions/cache@v1
with:
path: "vulkansdk-macos-1.2.162.0"
key: vulkansdk-macos-1.2.162.0
path: "vulkansdk-macos-1.3.239.0"
key: vulkansdk-macos-1.3.239.0
- name: vulkansdk
if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
run: |
wget https://sdk.lunarg.com/sdk/download/1.2.162.0/mac/vulkansdk-macos-1.2.162.0.dmg?Human=true -O vulkansdk-macos-1.2.162.0.dmg
hdiutil attach vulkansdk-macos-1.2.162.0.dmg
cp -r /Volumes/vulkansdk-macos-1.2.162.0 .
rm -rf vulkansdk-macos-1.2.162.0/Applications
find vulkansdk-macos-1.2.162.0 -type f | grep -v -E 'vulkan|glslang|MoltenVK' | xargs rm
hdiutil detach /Volumes/vulkansdk-macos-1.2.162.0
wget https://sdk.lunarg.com/sdk/download/1.3.239.0/mac/vulkansdk-macos-1.3.239.0.dmg?Human=true -O vulkansdk-macos-1.3.239.0.dmg
hdiutil attach vulkansdk-macos-1.3.239.0.dmg
sudo /Volumes/vulkansdk-macos-1.3.239.0/InstallVulkan.app/Contents/MacOS/InstallVulkan --root $GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0 --accept-licenses --default-answer --confirm-command install
hdiutil detach /Volumes/vulkansdk-macos-1.3.239.0
- name: build-x86_64
run: |
export VULKAN_SDK=`pwd`/vulkansdk-macos-1.2.162.0/macOS
export VULKAN_SDK=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.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" \
-DVulkan_INCLUDE_DIR=`pwd`/../vulkansdk-macos-1.2.162.0/MoltenVK/include \
-DVulkan_LIBRARY=`pwd`/../vulkansdk-macos-1.2.162.0/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a \
-DVulkan_INCLUDE_DIR=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/MoltenVK/include \
-DVulkan_LIBRARY=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/MoltenVK/dylib/macOS/libMoltenVK.dylib \
../src
cmake --build . -j 3
- name: build-arm64
run: |
export VULKAN_SDK=`pwd`/vulkansdk-macos-1.2.162.0/macOS
export VULKAN_SDK=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/macOS
mkdir build-arm64 && cd build-arm64
cmake -DUSE_STATIC_MOLTENVK=ON -DCMAKE_OSX_ARCHITECTURES="arm64" \
-DCMAKE_CROSSCOMPILING=ON -DCMAKE_SYSTEM_PROCESSOR=arm64 \
-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" \
-DVulkan_INCLUDE_DIR=`pwd`/../vulkansdk-macos-1.2.162.0/MoltenVK/include \
-DVulkan_LIBRARY=`pwd`/../vulkansdk-macos-1.2.162.0/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64/libMoltenVK.a \
-DVulkan_INCLUDE_DIR=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/MoltenVK/include \
-DVulkan_LIBRARY=$GITHUB_WORKSPACE/vulkansdk-macos-1.3.239.0/MoltenVK/dylib/macOS/libMoltenVK.dylib \
../src
cmake --build . -j 3
- name: package
Expand Down Expand Up @@ -203,13 +201,13 @@ jobs:
uses: actions/cache@v1
with:
path: "VulkanSDK"
key: VulkanSDK-1.2.162.0-Installer
key: VulkanSDK-1.3.239.0-Installer
- name: vulkansdk
if: steps.cache-vulkansdk.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.2.162.0/windows/VulkanSDK-1.2.162.0-Installer.exe?Human=true -OutFile VulkanSDK-1.2.162.0-Installer.exe
7z x -aoa ./VulkanSDK-1.2.162.0-Installer.exe -oVulkanSDK
Remove-Item .\VulkanSDK\Demos, .\VulkanSDK\Samples, .\VulkanSDK\Third-Party, .\VulkanSDK\Tools, .\VulkanSDK\Tools32, .\VulkanSDK\Bin32, .\VulkanSDK\Lib32 -Recurse
Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.3.239.0/windows/VulkanSDK-1.3.239.0-Installer.exe?Human=true -OutFile VulkanSDK-1.3.239.0-Installer.exe
7z x -aoa ./VulkanSDK-1.3.239.0-Installer.exe -oVulkanSDK
Remove-Item .\VulkanSDK\Demos -Recurse
- name: build
run: |
$env:VULKAN_SDK="$(pwd)/VulkanSDK"
Expand Down