forked from open-edge-platform/edge-ai-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdls-build-deb-packages-and-images.yaml
More file actions
87 lines (78 loc) · 3.9 KB
/
dls-build-deb-packages-and-images.yaml
File metadata and controls
87 lines (78 loc) · 3.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: "[DLS] [U22/24] Build .deb pkgs and deb imgs"
run-name: "[DLS] [U22/24] Build .deb pkgs and deb imgs (by ${{ github.actor }})"
on:
workflow_call:
workflow_dispatch:
permissions:
packages: read
contents: read
jobs:
build:
name: Build ${{ matrix.ubuntu_version }} .debs and imgs
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- path_deb: ./edge-ai-libraries-repo/libraries/dl-streamer/docker/onebinary/ubuntu22/dlstreamer_deb_package_ubuntu22.Dockerfile
path_dev: ./edge-ai-libraries-repo/libraries/dl-streamer/docker/devel/ubuntu22/dlstreamer_dev_ubuntu22.Dockerfile
ubuntu_version: ubuntu22
- path_deb: ./edge-ai-libraries-repo/libraries/dl-streamer/docker/onebinary/ubuntu24/dlstreamer_deb_package_ubuntu24.Dockerfile
path_dev: ./edge-ai-libraries-repo/libraries/dl-streamer/docker/devel/ubuntu24/dlstreamer_dev_ubuntu24.Dockerfile
ubuntu_version: ubuntu24
env:
dev-release-img: ghcr.io/${{ github.repository }}/dev-release-img-${{ matrix.ubuntu_version }}:${{ github.sha }}
dev-release-img-cached: ghcr.io/${{ github.repository }}/dev-release-img-${{ matrix.ubuntu_version }}:buildcache
dlstreamer-version: "2025.0.1.3"
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: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 #3.10.0
- name: Log in to GitHub Container Registry
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 #3.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build dev release img with cache from GHCR
run: |
docker buildx build \
--load \
--tag "${{ env.dev-release-img }}" \
--cache-from="${{ env.dev-release-img-cached }}" \
--build-arg BUILD_ARG=Release \
-f ${{ matrix.path_dev }} \
./edge-ai-libraries-repo/libraries/dl-streamer
- name: Build deb pkg img using dev release img
run: |
docker build \
--tag ghcr.io/${{ github.repository }}/dls-deb-pkg-${{ matrix.ubuntu_version }}:${{ github.sha }} \
--build-arg DLSTREAMER_VERSION=${{ env.dlstreamer-version }} \
--build-arg DLSTREAMER_BUILD_NUMBER=deb-pkg-${{ matrix.ubuntu_version }} \
--build-arg BASE_IMAGE="${{ env.dev-release-img }}" \
-f ${{ matrix.path_deb }} \
./edge-ai-libraries-repo/libraries/dl-streamer
- name: Extract .deb packages using script
run: |
chmod +x ./edge-ai-libraries-repo/libraries/dl-streamer/scripts/extract_and_verify_debs.sh
./edge-ai-libraries-repo/libraries/dl-streamer/scripts/extract_and_verify_debs.sh ghcr.io/${{ github.repository }}/dls-deb-pkg-${{ matrix.ubuntu_version }}:${{ github.sha }}
ls
cp -r deb_packages ./edge-ai-libraries-repo/libraries/dl-streamer
- name: Build Docker img from .deb
run: |
docker build \
-t ghcr.io/${{ github.repository }}/dls-deb-${{ matrix.ubuntu_version }}:${{ github.sha }} \
-f ./edge-ai-libraries-repo/libraries/dl-streamer/docker/onebinary/${{ matrix.ubuntu_version }}/dlstreamer_${{ matrix.ubuntu_version }}.Dockerfile \
./edge-ai-libraries-repo/libraries/dl-streamer
- name: Clean up
if: always()
run: |
rm -rf edge-ai-libraries-repo
docker rmi ghcr.io/${{ github.repository }}/dls-deb-${{ matrix.ubuntu_version }}:${{ github.sha }} || true