diff --git a/.github/scripts/Linux/install_others.sh b/.github/scripts/Linux/install_others.sh index 8fc91e551..6d7184c95 100755 --- a/.github/scripts/Linux/install_others.sh +++ b/.github/scripts/Linux/install_others.sh @@ -78,6 +78,21 @@ install_pipewire() {( fi )} +install_rav1e() {( + # TODO: use avx2 later + if expr "${UG_ARCH-}" : '.*avx' >/dev/null; then + avx2=avx2 + fi + fpattern="librav1e.*linux-${avx2-sse4}.tar.gz" + "${GITHUB_WORKSPACE-.}"/.github/scripts/download-gh-asset.sh xiph/rav1e \ + "$fpattern" librav1e.tar.gz + sudo tar xaf librav1e.tar.gz -C /usr/local + sudo rm -rf /usr/local/lib/librav1e.so* + sudo sed -i -e 's-prefix=dist-prefix=/usr/local-' \ + -e 's/-lrav1e/-lrav1e -lm -pthread/' \ + /usr/local/lib/pkgconfig/rav1e.pc +)} + # FFmpeg master needs at least v1.3.238 as for 23th Aug '23 install_vulkan() {( # TOREMOVE: FFmpeg doesn't currently build with main (2024-02-09) @@ -101,7 +116,7 @@ if [ $# -eq 1 ] && { [ "$1" = -h ] || [ "$1" = --help ] || [ "$1" = help ]; }; t fi if [ $# -eq 0 ] || [ $show_help ]; then - set -- aja gpujpeg live555 ndi pipewire vulkan ximea + set -- aja gpujpeg live555 ndi pipewire rav1e vulkan ximea fi if [ $show_help ]; then diff --git a/.github/scripts/Linux/prepare.sh b/.github/scripts/Linux/prepare.sh index bf1d6e192..b44a6d16f 100755 --- a/.github/scripts/Linux/prepare.sh +++ b/.github/scripts/Linux/prepare.sh @@ -1,9 +1,10 @@ #!/bin/bash -eux +export PKG_CONFIG_PATH=/usr/local/qt/lib/pkgconfig:/usr/local/lib/pkgconfig printf "%b" "AJA_DIRECTORY=/var/tmp/ntv2\n\ CPATH=/usr/local/qt/include\n\ LIBRARY_PATH=/usr/local/qt/lib\n\ -PKG_CONFIG_PATH=/usr/local/qt/lib/pkgconfig\n" >> "$GITHUB_ENV" +PKG_CONFIG_PATH=$PKG_CONFIG_PATH\n" >> "$GITHUB_ENV" printf "/usr/local/qt/bin\n" >> "$GITHUB_PATH" git config --global user.name "UltraGrid Builder" diff --git a/.github/scripts/Linux/rav1e.sh b/.github/scripts/Linux/rav1e.sh deleted file mode 100755 index 26e0547a0..000000000 --- a/.github/scripts/Linux/rav1e.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -eux -# -# Builds rav1e but doesn't install it - -rustup update -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 22bd7d4e9..40d1286ee 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -76,19 +76,6 @@ jobs: run: | . .github/scripts/environment.sh .github/scripts/Linux/prepare.sh - - name: Cache rav1e - id: cache-rav1e - uses: actions/cache@main - 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@main