Skip to content

Commit

Permalink
CI Linux arm: use common build flags
Browse files Browse the repository at this point in the history
Some features that are used by x86_64 Linux build are disabled, for the
rest dependencies are installed.

disabled:
- CUDA features
- lavc vdpau
- lavc vaapi
- Qt GUI
- Cineform

dependencies installed:
- libsdl2-ttf
- libsdl2-mixer
  • Loading branch information
MartinPulec committed Jun 12, 2024
1 parent e701449 commit 211f90f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/scripts/Linux/arm/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ 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\

/.github/scripts/install-common-deps.sh
/.github/scripts/Linux/install_others.sh ndi pipewire ximea
Expand Down
17 changes: 13 additions & 4 deletions .github/scripts/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export CHANNEL TAG VERSION

printf '%b' "CHANNEL=$CHANNEL\nTAG=$TAG\nVERSION=$VERSION\n" >> "$GITHUB_ENV"

is_arm() {
[ "$(uname -m)" = arm64 ] || [ "$GITHUB_WORKFLOW" = 'ARM builds' ]
}

export FEATURES="\
--enable-option-checking=fatal\
--with-live555=/usr/local\
Expand Down Expand Up @@ -74,9 +78,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"
if is_arm; then
FEATURES="$FEATURES --disable-qt"
else
FEATURES="$FEATURES $CUDA_FEATURES \
--enable-lavc-hw-accel-vaapi --enable-lavc-hw-accel-vdpau"
fi
;;
macOS)
FEATURES="$FEATURES --enable-avfoundation --enable-coreaudio --enable-syphon"
Expand All @@ -90,7 +99,7 @@ case "$RUNNER_OS" in
;;
esac

if [ "$(uname -s)" != Darwin ] || [ "$(uname -m)" != arm64 ]; then
if ! is_arm; then
FEATURES="$FEATURES --enable-cineform"
fi

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/arm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 211f90f

Please sign in to comment.