#!/bin/bash # SPDX-License-Identifier: GPL-2.0-or-later # source ./common.sh logfile=$(log_filename $ID) BUILDDIR="$(builddir $ID)" VIVID_SOURCES=$(srcdir vivid) LIBCAMERA_SOURCES="$(srcdir libcamera)" LIBCAMERA_BRANCH=integration_tests #### Building and compiling if [ ! -d $VIVID_SOURCES ]; then echo "Cloning Vivid tree" git clone git-libcamera-org@ci.git.libcamera.org:libcamera/vivid.git $VIVID_SOURCES git -C $VIVID_SOURCES remote add testing $LIBCAMERA_SOURCES fi function update() { git -C $VIVID_SOURCES checkout vivid || return $? git -C $VIVID_SOURCES reset --hard origin/vivid || return $? git -C $VIVID_SOURCES fetch testing git -C $VIVID_SOURCES rebase testing/$LIBCAMERA_BRANCH || return $? } function build() { echo "Building for Vivid Pipeline Handler" if [ ! -d "$BUILDDIR" ]; then meson "$BUILDDIR" "$VIVID_SOURCES" \ -Dv4l2=true \ -Dandroid=disabled \ -Ddocumentation=disabled \ -Dgstreamer=disabled \ || return $? fi ninja -C "$BUILDDIR" || return $? } function test_vivid() { $BUILDDIR/src/apps/cam/cam -cvivid -C10 } update > $logfile pass_fail $? "Rebase VIVID patches" check_version $VIVID_SOURCES $ID build >> $logfile pass_fail $? "Compile test VIVID patches" test_vivid >> $logfile 2>&1 pass_fail $? "Test capturing from Vivid" git -C $VIVID_SOURCES push -f origin vivid >> $logfile pass_fail $? "Updating VIVID repo" echo $VERSION > $last_build