-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade FFmpeg to 6.0, OpenCV to 4.8.0
Support Full-Static build modified: .github/workflows/build-cpu-static-linux-x64.yml modified: Build/Docker/cpu/base.Dockerfile modified: Build/Docker/cpu/build.Dockerfile modified: Build/Docker/cpu/build.sh modified: Build/Docker/cpu/build_base.sh deleted: Build/Docker/cpu_static/Dockerfile modified: Build/Docker/cpu_static/build.Dockerfile modified: Build/Docker/cpu_static/build.sh modified: Build/Docker/cuda/build_base_cuda.sh modified: Build/Docker/cuda/build_cuda.Dockerfile modified: Build/Docker/cuda/build_cuda.sh modified: Components/FFMPEGVideo/FFMPEGVideo.h
- Loading branch information
Showing
29 changed files
with
330 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
|
||
name: Build CPU Static Linux X64 | ||
|
||
permissions: | ||
contents: write | ||
# Controls when the action will run. | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
# schedule: | ||
# - cron: "0 0 * * */3" | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: 'Log level' | ||
required: true | ||
default: 'warning' | ||
tags: | ||
description: 'Test scenario tags' | ||
|
||
env: | ||
TZ: Asia/Shanghai | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
buildx: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
- | ||
name: Get current date | ||
id: date | ||
run: echo "::set-output name=today::$(date +'%Y%m%d')" | ||
- | ||
name: Assign release version | ||
run: | | ||
cat Interfaces/VideoSubFinderWXW/MyResource.h| grep VSF_VERSION | sed -E 's/.+VSF_VERSION.+"(.+)"/release_version=\1/g' >> $GITHUB_ENV | ||
- | ||
name: Build cpu-static | ||
run: bash ./Build/Docker/cpu_static/build.sh | ||
- | ||
name: Test | ||
run: bash ./Build/Docker/cpu_static/test.sh | ||
- | ||
name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: videosubfinder-cli-cpu-linux-x64.tar.gz | ||
path: | | ||
./Build/Docker/cpu_static/out/videosubfinder-cli-cpu-static-linux-x64.tar.gz | ||
- | ||
name: Release draft | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
name: "${{ env.release_version }}" | ||
tag_name: "${{ env.release_version }}-ci" | ||
files: | | ||
./Build/Docker/cpu_static/out/videosubfinder-cli-cpu-static-linux-x64.tar.gz | ||
body: "[Github Action](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
cd ${0%/*} | ||
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/lib:/lib64 | ||
cd "${0%/*}" | ||
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$PWD/lib:/lib64" | ||
chmod +x ./VideoSubFinderCli | ||
./VideoSubFinderCli "$@" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/bin/bash | ||
set -e | ||
cd ${0%/*} | ||
./build.sh | ||
./build_cuda.sh | ||
./cpu/build.sh | ||
./cpu_static/build.sh | ||
./cuda/build_cuda.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
cd ${0%/*} | ||
if [[ "$GITHUB_ACTION" ]]; then | ||
docker buildx build --cache-from type=gha --cache-to type=gha,mode=max \ | ||
-t videosubfinder-build:cpu -f build.Dockerfile ../../.. | ||
else | ||
docker build -t videosubfinder-build:cpu -f build.Dockerfile ../../.. | ||
fi | ||
mkdir -p out | ||
docker run --rm -v $PWD/out:$PWD/out videosubfinder-build:cpu \ | ||
bash -c "cd /tmp/work/ && tar cvzf $PWD/out/videosubfinder-cli-cpu-linux-x64.tar.gz *" |
0
Build/Docker/build_base.sh → Build/Docker/cpu/build_base.sh
100644 → 100755
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
FROM ubuntu:20.04 as builder | ||
# Allow ubuntu to cache package downloads | ||
RUN rm -f /etc/apt/apt.conf.d/docker-clean | ||
ARG USE_GUI=0 | ||
RUN --mount=type=cache,target=/var/cache/apt \ | ||
apt update | ||
RUN --mount=type=cache,target=/var/cache/apt \ | ||
DEBIAN_FRONTEND=noninteractive apt install -y ccache build-essential curl git | ||
ENV PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tmp/work/ffmpeg-build-script/workspace/bin" | ||
RUN mkdir -p /tmp/work | ||
RUN --mount=type=cache,target=/root/.ccache \ | ||
cd /tmp/work/ \ | ||
&& git clone https://github.com/markus-perl/ffmpeg-build-script.git -b master --depth=1 \ | ||
&& cd ffmpeg-build-script \ | ||
&& AUTOINSTALL="yes" ./build-ffmpeg --enable-gpl-and-non-free --build --full-static \ | ||
&& true | ||
RUN --mount=type=cache,target=/root/.ccache \ | ||
cd /tmp/work \ | ||
&& git clone https://github.com/wxWidgets/wxWidgets.git -b v3.2.2.1 --depth=1 --recurse-submodules -j8 \ | ||
&& cd wxWidgets/ \ | ||
&& mkdir buildgtk \ | ||
&& cd buildgtk/ \ | ||
&& ../configure --disable-gui --disable-shared --disable-sys-libs \ | ||
&& make -j$(nproc) \ | ||
&& make install \ | ||
&& rm -rf /tmp/work/wxWidgets \ | ||
&& true | ||
RUN --mount=type=cache,target=/root/.ccache \ | ||
cd /tmp/work \ | ||
&& git clone https://github.com/opencv/opencv.git -b 4.8.0 --depth=1 \ | ||
&& cd opencv \ | ||
&& mkdir -p build \ | ||
&& cd build \ | ||
&& cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GTK=OFF -DWITH_FFMPEG=ON -D CMAKE_BUILD_TYPE=RELEASE \ | ||
-D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_OPENGL=ON \ | ||
-D WITH_CUBLAS=ON -DWITH_QT=OFF -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES" -DBUILD_SHARED_LIBS=OFF .. \ | ||
&& cmake --build . --config Release -j $(nproc) \ | ||
&& make install \ | ||
&& rm -rf /tmp/work/opencv \ | ||
&& true | ||
# OpenCV full staitc library | ||
RUN grep -R -l "\.so" /usr/local/lib/cmake/opencv4/*.cmake | xargs -I{} sed -i 's/\.so/.a/g' {} | ||
|
||
RUN --mount=type=cache,target=/root/.ccache \ | ||
cd /tmp/work \ | ||
&& git clone https://github.com/oneapi-src/oneTBB.git -b v2020.3.3 --depth=1 \ | ||
&& cd oneTBB \ | ||
&& make tbb_build_prefix=BUILDPREFIX extra_inc=big_iron.inc \ | ||
&& cp -f ./build/BUILDPREFIX_release/libtbb.a /usr/local/lib/ \ | ||
&& cp -f ./build/BUILDPREFIX_release/libtbbmalloc.a /usr/local/lib \ | ||
&& cp -rf ./include/tbb /usr/local/include/ \ | ||
&& rm -rf /tmp/work/oneTBB \ | ||
&& true |
Oops, something went wrong.