Skip to content

CI: Check the dfsg branch. #56

CI: Check the dfsg branch.

CI: Check the dfsg branch. #56

Workflow file for this run

name: Build tests
on:
push:
branches:
- main
- dfsg
pull_request:
jobs:
build:
strategy:
matrix:
version: [ipu6epmtl, ipu6ep, ipu6]
os: ["ubuntu:22.04", "ubuntu:20.04"]
runs-on: ubuntu-latest
container: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Build test for ${{ matrix.version }} on ${{ matrix.os }}
timeout-minutes: 10
run: |
case "${{ matrix.version }}" in
(ipu6)
PLATFORM="ipu_tgl"
;;
(ipu6ep)
PLATFORM="ipu_adl"
;;
(ipu6epmtl)
PLATFORM="ipu_mtl"
;;
(*)
echo "Not support for ${IPU_VER} yet."
exit 1
;;
esac
echo 'APT::Get::Always-Include-Phased-Updates True;' | tee -a /etc/apt/apt.conf
echo 'Acquire::http::User-Agent-Non-Interactive "true";' | tee -a /etc/apt/apt.conf
apt-get update -q -q
export TZ=Asia/Shanghai
echo "" | apt-get install -qy tzdata
echo "" | apt-get install git build-essential cmake libexpat-dev automake libtool libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libunwind-dev --yes
echo "Checkout ipu6-camera-bins ${{ github.ref_name }} ..."
git clone https://github.com/fourdollars/ipu6-camera-bins -b "${{ github.ref_name }}" --depth 1
cp -rv ipu6-camera-bins/lib/"${PLATFORM}"/pkgconfig/* /usr/lib/pkgconfig/
rm -fr ipu6-camera-bins/lib/"${PLATFORM}"/pkgconfig
if [ "${{ github.ref_name }}" = "dfsg" ]; then
cp -rv ipu6-camera-bins/include/"${PLATFORM}"/* /usr/include/
cp -rv ipu6-camera-bins/lib/"${PLATFORM}"/* /usr/lib/x86_64-linux-gnu/
else
cp -rv ipu6-camera-bins/include/"${PLATFORM}" /usr/include/
cp -rv ipu6-camera-bins/lib/"${PLATFORM}" /usr/lib/
fi
rm -fr ipu6-camera-bins
mkdir -p ./build/out/install/usr && cd ./build/
cmake -DCMAKE_BUILD_TYPE=Release \
-DIPU_VER="${{ matrix.version }}" \
-DENABLE_VIRTUAL_IPU_PIPE=OFF \
-DUSE_PG_LITE_PIPE=ON \
-DUSE_STATIC_GRAPH=OFF \
-DCMAKE_INSTALL_PREFIX=/usr ..
make
make install