-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
261 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+\.[0-9]+\.[0-9]+' | ||
|
||
jobs: | ||
build-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Update apt-get database | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get upgrade -y | ||
- name: Install build dependencies | ||
run: sudo apt-get install -y clang ninja-build git cmake llvm pkg-config | ||
|
||
- name: Install vulkan | ||
run: | | ||
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc | ||
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list | ||
sudo apt update | ||
sudo apt -y install vulkan-sdk | ||
- name: Install project dependencies | ||
run: | | ||
sudo apt-get install -y libboost-all-dev libspdlog-dev | ||
sudo apt-get install -y '^libxcb.*-dev' build-essential libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libpulse-dev libqt5x11extras5 libssl-dev libssl1.0 libwayland-dev libwayland-egl1-mesa libwayland-server0 libx11-xcb-dev libxi-dev libxkbcommon-dev libxkbcommon-dev libxkbcommon-x11-dev libxrender-dev openssl ffmpeg | ||
- name: Install ffmpeg | ||
run: | | ||
./scripts/install-ffmpeg | ||
- name: Download Qt source | ||
env: | ||
QT_INSTALLER_JWT_TOKEN: ${{ secrets.QT_INSTALLER_JWT_TOKEN }} | ||
run: | | ||
mkdir /tmp/Qt | ||
./scripts/install-qt --root /tmp/Qt qt.qt6.661.src | ||
- name: Build Qt from source with static linking | ||
env: | ||
CC: gcc | ||
CXX: g++ | ||
CXXFLAGS: -Wall | ||
run: | | ||
src=/tmp/Qt/6.6.1/Src | ||
$src/configure -release -static -prefix $PWD/3rdparty/Qt/ -submodules qtbase,qtmultimedia,qtwayland -no-pch -no-gstreamer -- -S $src -B $src/build -Wdev -DPC_FFMPEG_LIBRARY_DIRS=$HOME/ffmpeg_build/lib -DPC_FFMPEG_INCLUDE_DIRS=$HOME/ffmpeg_build/include | ||
cmake --build $src/build | ||
cmake --install $src/build | ||
- name: Build project | ||
run: | | ||
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF | ||
cmake --build ./build --target package | ||
- name: Publish | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
draft: true | ||
files: ./build/*.tar.gz |
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,95 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
source_dir="$HOME/ffmpeg_sources" | ||
build_dir="$HOME/ffmpeg_build" | ||
bin_dir="$build_dir/bin" | ||
|
||
install_dependencies() { | ||
echo "Updating apt-get" | ||
sudo apt-get update -qq | ||
echo "Installing build tools and dependencies" | ||
sudo apt-get -y install autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev meson ninja-build pkg-config texinfo wget yasm zlib1g-dev gnutls-bin libunistring-dev libaom-dev libdav1d-dev tar | ||
|
||
echo "Installing ffmpeg dependencies" | ||
sudo apt-get -y install nasm libx264-dev libx265-dev libvpx-dev libfdk-aac-dev libopus-dev libdav1d-dev libnuma-dev | ||
} | ||
|
||
compile_libaom() { | ||
echo "Compiling libaom" | ||
cd ~/ffmpeg_sources && | ||
git -C aom pull 2>/dev/null || git clone --depth 1 https://aomedia.googlesource.com/aom && | ||
mkdir -p aom_build && | ||
cd aom_build && | ||
PATH="$bin_dir:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$build_dir" -DENABLE_TESTS=OFF -DENABLE_NASM=on ../aom && | ||
PATH="$bin_dir:$PATH" make && | ||
make install | ||
} | ||
|
||
compile_libsvtav1() { | ||
echo "Compiling libsvtav1" | ||
cd ~/ffmpeg_sources && | ||
git -C SVT-AV1 pull 2>/dev/null || git clone https://gitlab.com/AOMediaCodec/SVT-AV1.git && | ||
mkdir -p SVT-AV1/build && | ||
cd SVT-AV1/build && | ||
PATH="$bin_dir:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$build_dir" -DCMAKE_BUILD_TYPE=Release -DBUILD_DEC=OFF -DBUILD_SHARED_LIBS=OFF .. && | ||
PATH="$bin_dir:$PATH" make && | ||
make install | ||
} | ||
|
||
compile_libvmaf() { | ||
echo "Compiling libvmaf" | ||
cd ~/ffmpeg_sources && | ||
wget https://github.com/Netflix/vmaf/archive/v2.3.1.tar.gz && tar xvf v2.3.1.tar.gz && | ||
mkdir -p vmaf-2.3.1/libvmaf/build && | ||
cd vmaf-2.3.1/libvmaf/build && | ||
meson setup -Denable_tests=false -Denable_docs=false --buildtype=release --default-library=static .. --prefix "$build_dir" --bindir="$bin_dir" --libdir="$build_dir/lib" && | ||
ninja && | ||
ninja install | ||
} | ||
|
||
compile_ffmpeg() { | ||
echo "Compiling ffmpeg" | ||
cd ~/ffmpeg_sources && | ||
wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && | ||
tar xjvf ffmpeg-snapshot.tar.bz2 && | ||
cd ffmpeg && | ||
PATH="$bin_dir:$PATH" PKG_CONFIG_PATH="$build_dir/lib/pkgconfig" ./configure \ | ||
--prefix="$build_dir" \ | ||
--extra-cflags="-I$build_dir/include" \ | ||
--extra-ldflags="-L$build_dir/lib" \ | ||
--extra-libs="-lpthread -lm" \ | ||
--ld="g++" \ | ||
--bindir="$bin_dir" \ | ||
--enable-shared \ | ||
--disable-static \ | ||
--enable-gpl \ | ||
--enable-gnutls \ | ||
--enable-libaom \ | ||
--enable-libass \ | ||
--enable-libfdk-aac \ | ||
--enable-libfreetype \ | ||
--enable-libmp3lame \ | ||
--enable-libopus \ | ||
--enable-libsvtav1 \ | ||
--enable-libdav1d \ | ||
--enable-libvorbis \ | ||
--enable-libvpx \ | ||
--enable-libx264 \ | ||
--enable-libx265 \ | ||
--enable-nonfree && | ||
PATH="$bin_dir:$PATH" make && | ||
make install && | ||
hash -r | ||
} | ||
|
||
dir=$(pwd) | ||
|
||
mkdir -p "$source_dir" "$bin_dir" | ||
install_dependencies | ||
compile_libaom | ||
compile_libsvtav1 | ||
compile_libvmaf | ||
compile_ffmpeg | ||
|
||
cd $dir |
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