From d3e7abf213c2969bb7fc5cb4b2e7d3ceda011275 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 31 May 2024 10:55:10 +0200 Subject: [PATCH] CI libajantv2: install in a common script --- .github/scripts/Linux/install_others.sh | 16 +--------------- .github/scripts/functions.sh | 7 ------- .github/scripts/install-common-deps.sh | 16 ++++++++++++++++ .github/scripts/macOS/install_others.sh | 12 +----------- 4 files changed, 18 insertions(+), 33 deletions(-) delete mode 100644 .github/scripts/functions.sh diff --git a/.github/scripts/Linux/install_others.sh b/.github/scripts/Linux/install_others.sh index f1379ff40..226d049a8 100755 --- a/.github/scripts/Linux/install_others.sh +++ b/.github/scripts/Linux/install_others.sh @@ -1,10 +1,6 @@ #!/bin/sh -eux -srcroot=${GITHUB_WORKSPACE-$PWD} -readonly srcroot - . /etc/os-release -. "$srcroot/.github/scripts/functions.sh" if [ "$(id -u)" -eq 0 ]; then alias sudo= @@ -23,16 +19,6 @@ install_ximea() { sudo ./install -noudev } -# Install AJA -install_aja() {( - git clone --depth 1 https://github.com/aja-video/libajantv2.git - cd libajantv2 - cmake_aja -Bbuild -S. - cmake --build build -j "$(nproc)" - sudo cmake --install build -)} - - install_gpujpeg() {( cd "$GITHUB_WORKSPACE" ./ext-deps/bootstrap_gpujpeg.sh -d @@ -121,7 +107,7 @@ if [ $# -eq 1 ] && { [ "$1" = -h ] || [ "$1" = --help ] || [ "$1" = help ]; }; t fi if [ $# -eq 0 ] || [ $show_help ]; then - set -- aja gpujpeg live555 ndi pipewire rav1e vulkan ximea + set -- gpujpeg live555 ndi pipewire rav1e vulkan ximea fi if [ $show_help ]; then diff --git a/.github/scripts/functions.sh b/.github/scripts/functions.sh deleted file mode 100644 index 11991b0d3..000000000 --- a/.github/scripts/functions.sh +++ /dev/null @@ -1,7 +0,0 @@ -cmake_aja() { - cmake -DAJANTV2_DISABLE_DEMOS=ON -DAJANTV2_DISABLE_DRIVER=ON \ - -DAJANTV2_DISABLE_TOOLS=ON -DAJANTV2_DISABLE_TESTS=ON \ - -DAJANTV2_DISABLE_PLUGINS=ON -DAJANTV2_BUILD_SHARED=ON \ - -DCMAKE_BUILD_TYPE=Release "$@" -} - diff --git a/.github/scripts/install-common-deps.sh b/.github/scripts/install-common-deps.sh index 62ccc05f0..7e29b4902 100755 --- a/.github/scripts/install-common-deps.sh +++ b/.github/scripts/install-common-deps.sh @@ -35,6 +35,21 @@ download_install_cineform() {( sudo cmake --install . )} +install_aja() {( + if is_win; then + return + fi + git clone --depth 1 https://github.com/aja-video/libajantv2.git + cd libajantv2 + export MACOSX_DEPLOYMENT_TARGET=10.13 # needed for arm64 mac + cmake -DAJANTV2_DISABLE_DEMOS=ON -DAJANTV2_DISABLE_DRIVER=ON \ + -DAJANTV2_DISABLE_TOOLS=ON -DAJANTV2_DISABLE_TESTS=ON \ + -DAJANTV2_DISABLE_PLUGINS=ON -DAJANTV2_BUILD_SHARED=ON \ + -DCMAKE_BUILD_TYPE=Release -Bbuild -S. + cmake --build build -j "$(nproc)" + sudo cmake --install build +)} + install_ews() { sudo mkdir -p /usr/local/include sudo curl -LS https://raw.githubusercontent.com/hellerf/\ @@ -74,6 +89,7 @@ install_zfec() {( if ! is_arm && ! is_win; then download_install_cineform fi +install_aja install_ews install_juice install_pcp diff --git a/.github/scripts/macOS/install_others.sh b/.github/scripts/macOS/install_others.sh index 553ffdb98..0bd2e3992 100755 --- a/.github/scripts/macOS/install_others.sh +++ b/.github/scripts/macOS/install_others.sh @@ -14,7 +14,6 @@ fi # shellcheck source=/dev/null . "$srcroot/.github/scripts/json-common.sh" -. "$srcroot/.github/scripts/functions.sh" # Install XIMEA (see /install.app/Contents/MacOS/install.sh) install_ximea() {( @@ -31,15 +30,6 @@ install_ximea() {( umount /Volumes/XIMEA )} -install_aja() {( - git clone --depth 1 https://github.com/aja-video/libajantv2.git - cd libajantv2 - export MACOSX_DEPLOYMENT_TARGET=10.13 # neededd for arm64 - cmake_aja -Bbuild -S. - cmake --build build -j "$(sysctl -n hw.ncpu)" - sudo cmake --install build -)} - install_deltacast() { filename=videomaster-macos-dev.zip if [ ! -f "$SDK_NONFREE_PATH/$filename" ]; then @@ -122,7 +112,7 @@ if [ $# -eq 1 ] && { [ "$1" = -h ] || [ "$1" = --help ] || [ "$1" = help ]; }; t fi if [ $# -eq 0 ] || [ $show_help ]; then - set -- aja deltacast glfw live555 ndi soundfont syphon ximea + set -- deltacast glfw live555 ndi soundfont syphon ximea fi if [ $show_help ]; then