mirror of
https://github.com/k4yt3x/video2x.git
synced 2026-02-04 03:22:07 +08:00
feat(*): switched to spdlog for logging and organized headers (#1183)
* feat: updated PKGBUILD description * feat: updated workflow syntax and dependencies * feat: switched logging to spdlog * chore: adjusted library defaults * ci: fixed spdlog format string issues * docs: fixed docs for libvideo2x functions * feat: organized header files * fix: fixed header installation directory * feat: link spdlog statically if compiled from source * feat: adjusted libvideo2x log level enum names * feat: added version.h header Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -6,6 +6,7 @@ on:
|
||||
- dev
|
||||
pull_request: {}
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
ubuntu:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -33,7 +34,7 @@ jobs:
|
||||
- name: Build Video2X
|
||||
run: |
|
||||
mkdir -p /tmp/build /tmp/install
|
||||
cmake -B /tmp/build -S . -DUSE_SYSTEM_NCNN=OFF \
|
||||
cmake -B /tmp/build -S . -DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF \
|
||||
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/tmp/install \
|
||||
-DINSTALL_BIN_DESTINATION=. -DINSTALL_INCLUDE_DESTINATION=include \
|
||||
@@ -44,6 +45,7 @@ jobs:
|
||||
with:
|
||||
name: video2x-nightly-linux-amd64
|
||||
path: /tmp/install
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
@@ -73,7 +75,7 @@ jobs:
|
||||
Rename-Item -Path "third_party/ncnn-$ncnnVersion-windows-vs2022-shared" -NewName ncnn-shared
|
||||
- name: Build Video2X
|
||||
run: |
|
||||
cmake -S . -B build -DUSE_SYSTEM_NCNN=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=build/video2x_install
|
||||
cmake -S . -B build -DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=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
|
||||
|
||||
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
@@ -4,17 +4,20 @@ on:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
if: github.event.base_ref == 'refs/heads/master'
|
||||
name: Setup
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tag: ${{ steps.get_tag.outputs.tag }}
|
||||
version: ${{ steps.get_version.outputs.version }}
|
||||
steps:
|
||||
- name: Get tag
|
||||
id: get_tag
|
||||
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: echo version=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
|
||||
|
||||
container:
|
||||
name: Build and upload container
|
||||
@@ -32,7 +35,7 @@ jobs:
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
dockerfile: Dockerfile
|
||||
image: video2x
|
||||
tags: latest, ${{ needs.setup.outputs.tag }}
|
||||
tags: latest, ${{ needs.setup.outputs.version }}
|
||||
|
||||
create-release:
|
||||
name: Create release
|
||||
@@ -45,11 +48,10 @@ jobs:
|
||||
steps:
|
||||
- name: Create release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ needs.setup.outputs.tag }}
|
||||
release_name: Video2X ${{ needs.setup.outputs.tag }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag_name: ${{ needs.setup.outputs.version }}
|
||||
release_name: Video2X ${{ needs.setup.outputs.version }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
|
||||
Reference in New Issue
Block a user