ci(fedora): 👷 fedora rpm and lunar sdk vulkan ci and split github actions files #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CI code is based on | |
# https://github.com/nihui/realsr-ncnn-vulkan/blob/master/.github/workflows/release.yml | |
# Modified in here for newer vulkan | |
# https://github.com/onuralpszr/realsr-ncnn-vulkan/blob/vulkan-ci-version/.github/workflows/CI.yml | |
name: Fedora Dev Build (Lunar Vulkan SDK) | |
on: [pull_request] | |
env: | |
APPLICATION_NAME: gfpgan-ncnn-vulkan | |
jobs: | |
dev-build-fedora-lunar-sdk: | |
runs-on: ubuntu-latest | |
container: fedora:latest | |
steps: | |
- name: Install dependencies | |
run: | | |
dnf update -y | |
dnf install wget curl git opencv-devel opencv python3-opencv \ | |
libomp libomp-devel clang cmake gcc gcc-c++ glslang -y | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: cache-vulkansdk | |
id: cache-vulkansdk | |
uses: actions/cache@v3 | |
with: | |
path: "${{ vars.VULKAN_SDK_VERSION }}" | |
key: vulkansdk-linux-x86_64-${{ vars.VULKAN_SDK_VERSION }} | |
- name: setup-vulkansdk | |
if: steps.cache-vulkansdk.outputs.cache-hit != 'true' | |
run: | | |
wget https://sdk.lunarg.com/sdk/download/${{ vars.VULKAN_SDK_VERSION }}/linux/vulkansdk-linux-x86_64-${{ vars.VULKAN_SDK_VERSION }}.tar.xz?Human=true -O vulkansdk-linux-x86_64-${{ vars.VULKAN_SDK_VERSION }}.tar.xz | |
tar -xf vulkansdk-linux-x86_64-${{ vars.VULKAN_SDK_VERSION }}.tar.xz | |
rm -rf ${{ vars.VULKAN_SDK_VERSION }}/source ${{ vars.VULKAN_SDK_VERSION }}/samples | |
find ${{ vars.VULKAN_SDK_VERSION }} -type f | grep -v -E 'vulkan|glslang' | xargs rm | |
- name: Build | |
run: | | |
export VULKAN_SDK=`pwd`/${{ vars.VULKAN_SDK_VERSION }}/x86_64 | |
mkdir build && cd build | |
cmake ../src | |
cmake --build . -j 2 |