-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (36 loc) · 1.5 KB
/
build_dev_ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# 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: Ubuntu Dev Build
on: [pull_request]
env:
APPLICATION_NAME: gfpgan-ncnn-vulkan
jobs:
dev-build-ubuntu:
runs-on: ubuntu-latest
steps:
- 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: |
sudo apt update
sudo apt install libopencv-dev python3-opencv -y
export VULKAN_SDK=`pwd`/${{ vars.VULKAN_SDK_VERSION }}/x86_64
mkdir build && cd build
cmake ../src
cmake --build . -j 2