diff --git a/.github/scripts/Linux/download_build_ffmpeg.sh b/.github/scripts/Linux/download_build_ffmpeg.sh index ce5459675..ea603dd21 100755 --- a/.github/scripts/Linux/download_build_ffmpeg.sh +++ b/.github/scripts/Linux/download_build_ffmpeg.sh @@ -11,7 +11,6 @@ install_libvpx() { } install_svt() { - sudo apt install yasm ( git clone --depth 1 https://github.com/OpenVisualCloud/SVT-HEVC && cd SVT-HEVC/Build/linux && ./build.sh release && cd Release && make -j $(nproc) && sudo make install || exit 1 ) ( git clone --depth 1 https://github.com/OpenVisualCloud/SVT-AV1 && cd SVT-AV1 && cd Build && cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && make -j $(nproc) && sudo make install || exit 1 ) ( git clone --depth 1 https://github.com/OpenVisualCloud/SVT-VP9.git && cd SVT-VP9/Build && cmake .. -DCMAKE_BUILD_TYPE=Release && make -j $(nproc) && sudo make install || exit 1 ) @@ -38,6 +37,7 @@ for n in $GITHUB_WORKSPACE/.github/scripts/Linux/ffmpeg-patches/*patch; do git apply $n done ./configure --disable-static --enable-shared --enable-gpl --enable-libx264 --enable-libx265 --enable-libopus --enable-nonfree --enable-nvenc --enable-libaom --enable-libvpx --enable-libspeex --enable-libmp3lame --enable-libsvthevc --enable-libsvtav1 \ + --enable-librav1e \ --enable-libsvtvp9 \ make -j $(nproc) diff --git a/.github/scripts/Linux/prepare.sh b/.github/scripts/Linux/prepare.sh index e13cf0f19..cda850abd 100755 --- a/.github/scripts/Linux/prepare.sh +++ b/.github/scripts/Linux/prepare.sh @@ -28,10 +28,20 @@ sudo apt install libspeexdsp-dev sudo apt install libssl-dev sudo apt install libasound-dev libjack-jackd2-dev libnatpmp-dev libv4l-dev portaudio19-dev +# updates nasm 2.13->2.14 in U18.04 (needed for rav1e) +update_nasm() { + if [ -z "$(apt-cache search --names-only '^nasm-mozilla$')" ]; then + return + fi + sudo apt install nasm- nasm-mozilla + sudo ln -s /usr/lib/nasm-mozilla/bin/nasm /usr/bin/nasm +} + # for FFmpeg - libzmq3-dev needs to be ignored (cannot be installed, see run #380) FFMPEG_BUILD_DEP=`apt-cache showsrc ffmpeg | grep Build-Depends: | sed 's/Build-Depends://' | tr ',' '\n' |cut -f 2 -d\ | grep -v libzmq3-dev` sudo apt install $FFMPEG_BUILD_DEP sudo apt-get -y remove 'libavcodec*' 'libavutil*' 'libswscale*' libvpx-dev 'libx264*' nginx +update_nasm sudo apt --no-install-recommends install asciidoc xmlto sudo apt install libopencv-dev diff --git a/.github/scripts/Linux/rav1e.sh b/.github/scripts/Linux/rav1e.sh new file mode 100755 index 000000000..603ae5a96 --- /dev/null +++ b/.github/scripts/Linux/rav1e.sh @@ -0,0 +1,10 @@ +#!/bin/sh -eux +# +# Builds rav1e but doesn't install it + +cargo install cargo-c +git clone --depth 1 https://github.com/xiph/rav1e.git +cd rav1e +cargo build --release +cargo cinstall --release --destdir=install + diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 1b311795d..a0d3f52fb 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -78,6 +78,19 @@ jobs: run: | . .github/scripts/environment.sh .github/scripts/Linux/prepare.sh + - name: Cache rav1e + id: cache-rav1e + uses: actions/cache@v2 + with: + path: rav1e + key: cache-rav1e-${{ runner.os }}-${{ hashFiles('.github/scripts/Linux/rav1e.sh') }} + - name: Build rav1e + if: steps.cache-rav1e.outputs.cache-hit != 'true' + run: .github/scripts/Linux/rav1e.sh + - name: Install rav1e + run: | + sudo cp -r rav1e/install/* / + sudo ldconfig - name: Cache FFmpeg id: cache-ffmpeg uses: actions/cache@v2