Skip to content

[DLS] [U22/24] Build deb pkgs and deb img (by nszczygl9) #2

[DLS] [U22/24] Build deb pkgs and deb img (by nszczygl9)

[DLS] [U22/24] Build deb pkgs and deb img (by nszczygl9) #2

name: "[DLS] [U22/24] Build deb pkgs and deb img"
run-name: "[DLS] [U22/24] Build deb pkgs and deb img (by ${{ github.actor }})"
on:
push:
branches:
- 'build-deb-packages'
# paths:
# - 'libraries/dl-streamer/**'
# pull_request:
# paths:
# - 'libraries/dl-streamer/**'
permissions: read-all
jobs:
build:
name: Build ${{ matrix.ubuntu_version }} .deb
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ubuntu_version: ubuntu24
- ubuntu_version: ubuntu22
steps:
- name: Check out edge-ai-libraries repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #4.2.2
with:
path: edge-ai-libraries-repo
- name: Init submodules
run: |
cd edge-ai-libraries-repo
git submodule update --init libraries/dl-streamer/thirdparty/spdlog
- name: Build deb packages
run: |
chmod +x edge-ai-libraries-repo/libraries/dl-streamer/scripts/build_deb_packages.sh
cd edge-ai-libraries-repo/libraries/dl-streamer
echo "y" | ./scripts/build_deb_packages.sh --ubuntu_version=${{ matrix.ubuntu_version }}
- name: Check for .deb package
run: |
if ls edge-ai-libraries-repo/libraries/dl-streamer/deb_packages/*.deb 1> /dev/null 2>&1; then
echo "Deb package found."
else
echo "No deb package found."
exit 1
fi
- name: Build Binary image
run: |
docker build -t dls-img/${{ github.repository }}/deb-${{ matrix.ubuntu_version }}:${{ github.sha }} -f ./edge-ai-libraries-repo/libraries/dl-streamer/docker/onebinary/${{ matrix.ubuntu_version }}/dlstreamer_${{ matrix.ubuntu_version }}.Dockerfile .
# - name: Save image info
# id: save-image
# run: echo "image=dls-img/${{ github.repository }}/deb-${{ matrix.ubuntu_version }}:${{ github.sha }} " >> $GITHUB_ENV
# - name: Create summary
# if: always()
# run: |
# echo "### Dls deb Docker ${{ matrix.ubuntu_version }} :ship:" >> $GITHUB_STEP_SUMMARY
# echo '```' >> $GITHUB_STEP_SUMMARY
# echo "${{ env.image }}" >> $GITHUB_STEP_SUMMARY
# echo '```' >> $GITHUB_STEP_SUMMARY
# echo "Built on commit id: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
- name: Clean up
if: always()
run: |
rm -rf edge-ai-libraries-repo
docker rmi dls-img/${{ github.repository }}/deb-${{ matrix.ubuntu_version }}:${{ github.sha }} || true