CI Linux arm: use common build flags

Some features that are used by x86_64 Linux build are disabled, for the
rest dependencies are installed.

disabled:
- CUDA features (except of NV Jetson usually there is no CUDA)
- lavc vdpau (similar to CUDA, it is primarliy NV-focused API)
- Qt GUI
- Cineform (doesn't compile on ARM)

dependencies installed:
- libsdl2-ttf-dev
- libsdl2-mixer-dev
- libva-dev
This commit is contained in:
Martin Pulec
2024-06-11 11:11:48 +02:00
parent e7014492b7
commit 9eb292252e
3 changed files with 21 additions and 5 deletions

View File

@@ -47,7 +47,9 @@ apt -y install libasound2-dev portaudio19-dev libjack-dev
apt -y install libglew-dev libglfw3-dev libglm-dev
apt -y install libcaca-dev libmagickwand-dev libnatpmp-dev libopencv-core-dev libopencv-imgproc-dev libv4l-dev
apt -y install libavcodec-dev libavformat-dev libswscale-dev libraspberrypi-dev
apt -y install libdrm-dev
apt -y install libdrm-dev\
libsdl2-mixer-dev libsdl2-ttf-dev\
libva-dev\
/.github/scripts/install-common-deps.sh
/.github/scripts/Linux/install_others.sh ndi pipewire ximea

View File

@@ -31,6 +31,12 @@ export CHANNEL TAG VERSION
printf '%b' "CHANNEL=$CHANNEL\nTAG=$TAG\nVERSION=$VERSION\n" >> "$GITHUB_ENV"
## @note `uname -m` is x86_64 for Linux ARM builds, because this script is
## not called from the build chroot, so utilize GITHUB_WORKFLOW
is_arm() {
[ "$(uname -m)" = arm64 ] || [ "$GITHUB_WORKFLOW" = 'ARM builds' ]
}
export FEATURES="\
--enable-option-checking=fatal\
--with-live555=/usr/local\
@@ -74,9 +80,14 @@ export FEATURES="\
CUDA_FEATURES="--enable-cuda_dxt --enable-gpujpeg --enable-ldgm-gpu --enable-uyvy"
case "$RUNNER_OS" in
Linux)
FEATURES="$FEATURES $CUDA_FEATURES --enable-plugins\
--enable-alsa --enable-lavc-hw-accel-vaapi --enable-lavc-hw-accel-vdpau\
--enable-pipewire-audio --enable-v4l2"
FEATURES="$FEATURES --enable-plugins --enable-alsa \
--enable-pipewire-audio --enable-v4l2 --enable-lavc-hw-accel-vaapi"
if is_arm; then
FEATURES="$FEATURES --disable-qt"
else
FEATURES="$FEATURES $CUDA_FEATURES \
--enable-lavc-hw-accel-vdpau"
fi
;;
macOS)
FEATURES="$FEATURES --enable-avfoundation --enable-coreaudio --enable-syphon"
@@ -90,7 +101,7 @@ case "$RUNNER_OS" in
;;
esac
if [ "$(uname -s)" != Darwin ] || [ "$(uname -m)" != arm64 ]; then
if ! is_arm; then
FEATURES="$FEATURES --enable-cineform"
fi

View File

@@ -29,6 +29,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Init environment variables
run: . .github/scripts/environment.sh
- name: Prepare
run: |
sudo apt update
@@ -76,6 +78,7 @@ jobs:
run: |
sudo cp -ar $GITHUB_WORKSPACE ~/chroot/UltraGrid
env | grep -v '^\(HOME\)\|\(USER\)' | sed -e "s/=/='/" -e "s/$/'/" | sudo tee ~/chroot/envvars
echo "FEATURES=\"$FEATURES\"" | sudo tee -a ~/chroot/envvars
sudo chroot ~/chroot /bin/sh -ec "set -a; . /envvars; set +a; cd UltraGrid; .github/scripts/Linux/arm/build.sh"
- name: Upload Release Asset
id: upload-release-asset