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

View File

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

View File

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