ci(*): formatted CI pipeline files

Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
k4yt3x 2024-11-22 00:00:00 +00:00
parent 149cf1ca4a
commit b20f065fe0
No known key found for this signature in database
3 changed files with 25 additions and 2 deletions

View File

@ -1,4 +1,5 @@
name: Build
on:
push:
paths:
@ -16,7 +17,7 @@ on:
- "tools/**"
- "third_party/**"
- "CMakeLists.txt"
workflow_dispatch: {}
workflow_dispatch:
jobs:
ubuntu:
@ -28,6 +29,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
git submodule update --init --recursive
@ -43,6 +45,7 @@ jobs:
glslang-tools \
libomp-dev \
libboost-program-options-dev
- name: Build Video2X
run: |
mkdir -p /tmp/build /tmp/install
@ -52,6 +55,7 @@ jobs:
-DINSTALL_BIN_DESTINATION=. -DINSTALL_INCLUDE_DESTINATION=include \
-DINSTALL_LIB_DESTINATION=. -DINSTALL_MODEL_DESTINATION=.
cmake --build /tmp/build --config Debug --target install --parallel
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
@ -65,12 +69,14 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools, SPIRV-Headers
vulkan-use-cache: true
- name: Install dependencies
shell: pwsh
run: |
@ -86,6 +92,7 @@ jobs:
curl -Lo ncnn-shared.zip "https://github.com/Tencent/ncnn/releases/download/$ncnnVersion/ncnn-$ncnnVersion-windows-vs2022-shared.zip"
Expand-Archive -Path ncnn-shared.zip -DestinationPath third_party
Rename-Item -Path "third_party/ncnn-$ncnnVersion-windows-vs2022-shared" -NewName ncnn-shared
- name: Build Video2X
shell: pwsh
run: |
@ -93,6 +100,7 @@ jobs:
-DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DUSE_SYSTEM_BOOST=OFF `
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=build/video2x_install
cmake --build build --config Debug --parallel --target install
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
@ -104,6 +112,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: mr-smithers-excellent/docker-build-push@v5
name: Build the Docker image
with:

View File

@ -2,7 +2,10 @@ name: Docs
on:
push:
branches: ["master"]
branches:
- master
paths:
- "docs/book/**"
workflow_dispatch:
permissions:

View File

@ -1,4 +1,5 @@
name: Release
on:
push:
tags:
@ -33,6 +34,7 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
git submodule update --init --recursive
@ -48,6 +50,7 @@ jobs:
glslang-tools \
libomp-dev \
libboost-program-options-dev
- name: Build Video2X
run: |
cmake -B build -S . -DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DSPDLOG_NO_EXCEPTIONS=ON \
@ -57,6 +60,7 @@ jobs:
mkdir -p build/video2x-linux-ubuntu-2404-amd64/DEBIAN
cp packaging/debian/control build/video2x-linux-ubuntu-2404-amd64/DEBIAN/control
dpkg-deb --build build/video2x-linux-ubuntu-2404-amd64
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
@ -73,12 +77,14 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools, SPIRV-Headers
vulkan-use-cache: true
- name: Install dependencies
shell: pwsh
run: |
@ -94,6 +100,7 @@ jobs:
curl -Lo ncnn-shared.zip "https://github.com/Tencent/ncnn/releases/download/$ncnnVersion/ncnn-$ncnnVersion-windows-vs2022-shared.zip"
Expand-Archive -Path ncnn-shared.zip -DestinationPath third_party
Rename-Item -Path "third_party/ncnn-$ncnnVersion-windows-vs2022-shared" -NewName ncnn-shared
- name: Build Video2X
shell: pwsh
run: |
@ -101,9 +108,11 @@ jobs:
-DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DUSE_SYSTEM_BOOST=OFF `
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/video2x_install
cmake --build build --config Release --parallel --target install
- name: Compress artifacts
run: |
Compress-Archive -Path build/video2x_install/* -DestinationPath build/video2x-windows-amd64.zip
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
@ -118,6 +127,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: mr-smithers-excellent/docker-build-push@v5
name: Build & push the Docker image
with:
@ -141,6 +151,7 @@ jobs:
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Create release
id: create_release
uses: softprops/action-gh-release@v2