From b20f065fe0eb9460e71ec53900965832ddc37e13 Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Fri, 22 Nov 2024 00:00:00 +0000 Subject: [PATCH] ci(*): formatted CI pipeline files Signed-off-by: k4yt3x --- .github/workflows/build.yml | 11 ++++++++++- .github/workflows/docs.yml | 5 ++++- .github/workflows/release.yml | 11 +++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 134a7ac..05b4fc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index df7a03a..57934d2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,7 +2,10 @@ name: Docs on: push: - branches: ["master"] + branches: + - master + paths: + - "docs/book/**" workflow_dispatch: permissions: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25673a0..68fb589 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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