CI libajantv2: install in a common script

This commit is contained in:
Martin Pulec
2024-05-31 10:55:10 +02:00
parent 3cbd01a8e6
commit d3e7abf213
4 changed files with 18 additions and 33 deletions

View File

@@ -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

View File

@@ -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 "$@"
}

View File

@@ -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

View File

@@ -14,7 +14,6 @@ fi
# shellcheck source=/dev/null
. "$srcroot/.github/scripts/json-common.sh"
. "$srcroot/.github/scripts/functions.sh"
# Install XIMEA (see <dmg>/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