Skip to content

Commit 3f8cfc6

Browse files
committed
Add note about docs archivization
1 parent 0245fd0 commit 3f8cfc6

File tree

2,311 files changed

+173144
-248701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,311 files changed

+173144
-248701
lines changed

.clang-format

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Language: Cpp
3+
BasedOnStyle: LLVM
4+
ColumnLimit: 120
5+
IndentWidth: 4
6+
AllowShortFunctionsOnASingleLine: None
7+
AllowShortBlocksOnASingleLine: false
8+
AlwaysBreakTemplateDeclarations: Yes
9+
CompactNamespaces: false
10+
...

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.github/
2+
.git/
3+
.gitignore
4+
build/
5+
_release/
6+
docker/**/*.tgz
7+
docker/**/*.tar.gz
8+
.vscode

.github/pull_request_template.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
<!-- Tag your PR according to types of changes your code introduce (bugfix, feature, enhancement, etc.) -->
4+
5+
### Description
6+
<!--- Describe your changes in detail -->
7+
<!-- If it's a bugfix - describe how it reproduced and why, how PR fixes problem -->
8+
<!-- If it's a feature - describe new functionality, it's capabilities, limitations -->
9+
<!-- In other cases describe motivation of the changes -->
10+
11+
### Checklist
12+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
13+
- [ ] This PR changes existing API.
14+
- [ ] My change requires a change to the documentation.
15+
- [ ] I have updated the documentation accordingly.
16+
- [ ] I have added tests to cover my changes.
17+
- [ ] I have updated samples, models.lst, BOM files according to my changes.
18+
19+
### Additional Links
20+
<!-- Provide issue link if any (JIRA, GitHub, etc.) -->
21+
<!-- Also you can provide links to scan results, tests, docs, related PRs, etc. -->
22+
<!-- [Issue Link](http://link-to-issue) -->
23+
24+
### Reviewers Checklist
25+
Check that code meets SDL requirements:
26+
- [Use safe arithmetic to avoid integer overflow](https://sdp-prod.intel.com/library/tasks/T72/)
27+
- [Implement full error and exception handling](https://sdp-prod.intel.com/library/tasks/CT185/)
28+
- [Check contents within input structures are valid before use](https://sdp-prod.intel.com/library/tasks/CT177/)
29+
- [Prevent compiler from optimizing out security checks](https://sdp-prod.intel.com/library/tasks/CT158/)
30+
- [Avoid checks that rely on undefined C behavior](https://sdp-prod.intel.com/library/tasks/CT155/)
31+
- [Avoid unsafe functions](https://sdp-prod.intel.com/library/tasks/T196/)
32+
- [Prevent buffer overflow/underflow](https://sdp-prod.intel.com/library/tasks/T202/)
33+
- [Avoid uncontrolled format strings](https://sdp-prod.intel.com/library/tasks/T203/)
34+
- [Follow security best practices when dealing with pointers](https://sdp-prod.intel.com/library/tasks/T204/)
35+
- [Release resources when no longer needed](https://sdp-prod.intel.com/library/tasks/T375/)
36+
- [Follow best practices when handling primitive data types](https://sdp-prod.intel.com/library/tasks/T191/)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
# ==============================================================================
3+
# Copyright (C) 2024 Intel Corporation
4+
#
5+
# SPDX-License-Identifier: MIT
6+
# ==============================================================================
7+
set -x
8+
rm -rf /home/dlstreamer/dlstreamer/build
9+
mkdir /home/dlstreamer/dlstreamer/build
10+
cd /home/dlstreamer/dlstreamer/build
11+
cmake \
12+
-DCMAKE_BUILD_TYPE=Release \
13+
-DCMAKE_INSTALL_PREFIX=/opt/intel/dlstreamer \
14+
-DGIT_INFO= \
15+
-DENABLE_PAHO_INSTALLATION=ON \
16+
-DENABLE_RDKAFKA_INSTALLATION=ON \
17+
-DENABLE_VAAPI=ON \
18+
..
19+
20+
cmake --build .
Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
name: "[U22/24] Build multi-stage Docker image"
2+
run-name: "[U22/24] Build multi-stage Docker image (by ${{ github.actor }} via ${{ github.event_name }})"
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ubuntu_version:
7+
description: 'Ubuntu version'
8+
required: true
9+
default: 'ubuntu22'
10+
type: choice
11+
options:
12+
- 'ubuntu22'
13+
- 'ubuntu24'
14+
stage:
15+
description: 'Docker build stage'
16+
required: true
17+
default: 'dlstreamer'
18+
type: choice
19+
options:
20+
- 'deb-builder'
21+
- 'dlstreamer'
22+
docker-registry:
23+
description: "Classic(ger) or backup(gar) docker registry"
24+
required: true
25+
type: choice
26+
options:
27+
- ger-is-registry.caas.intel.com/dlstreamer/
28+
- gar-registry.caas.intel.com/dlstreamer-backup/
29+
branch:
30+
description: Your branch name
31+
required: true
32+
type: string
33+
oep-repo-branch:
34+
description: "Branch in Open Edge Platform (default is main)"
35+
required: false
36+
type: string
37+
default: "main"
38+
workflow_call:
39+
inputs:
40+
ubuntu_version:
41+
description: 'Ubuntu version'
42+
required: true
43+
type: string
44+
stage:
45+
description: 'Docker build stage'
46+
required: true
47+
type: string
48+
docker-registry:
49+
description: "Classic(ger) or backup(gar) docker registry"
50+
required: true
51+
type: string
52+
branch:
53+
description: Your branch name
54+
required: true
55+
type: string
56+
oep-repo-branch:
57+
description: "Branch in Open Edge Platform (default is main)"
58+
required: false
59+
type: string
60+
default: "main"
61+
outputs:
62+
image-release:
63+
description: "Result Docker release image"
64+
value: ${{ jobs.build-img.outputs.image-release }}
65+
image-test:
66+
description: "Result Docker test image"
67+
value: ${{ jobs.build-img.outputs.image-test }}
68+
apt-version-dls:
69+
description: "Version of DLStreamer packages"
70+
value: ${{ jobs.vars.outputs.deb-component }}
71+
apt-distribution:
72+
description: "DLStreamer APT distribution"
73+
value: ${{ jobs.vars.outputs.deb-distribution }}
74+
75+
env:
76+
ARTI_URL: https://af01p-ir.devtools.intel.com/artifactory/dlstreamerci-ir-local
77+
DLSTREAMER_APT_VERSION: 2025.1.2
78+
79+
jobs:
80+
vars:
81+
name: Variables
82+
runs-on: [dlstreamer.pipeline-framework, ubuntu]
83+
outputs:
84+
build-num: ${{ steps.run.outputs.bnum }}
85+
deb-distribution: ${{ steps.run.outputs.debdist }}
86+
deb-component: ${{ steps.run.outputs.debcomp }}
87+
ubuntu_distribution: ${{ steps.run.outputs.ubuntu_distribution }}
88+
steps:
89+
- name: Build variables
90+
id: run
91+
run: |
92+
if [ "${{ inputs.ubuntu_version }}" == "ubuntu22" ]; then
93+
ubuntu_distribution="jammy"
94+
elif [ "${{ inputs.ubuntu_version }}" == "ubuntu24" ]; then
95+
ubuntu_distribution="noble"
96+
else
97+
echo "Unknown Ubuntu version: ${{ inputs.ubuntu_version }}"
98+
exit 1
99+
fi
100+
101+
echo "ubuntu_distribution=$ubuntu_distribution" >> $GITHUB_OUTPUT
102+
bnum=$((${{ github.run_number }} + 300))
103+
echo "bnum=$bnum" >> $GITHUB_OUTPUT
104+
echo "debdist=one-deb-${ubuntu_distribution}/build/${{ inputs.branch }}" >> $GITHUB_OUTPUT
105+
echo "debcomp=$DLSTREAMER_APT_VERSION.$bnum" >> $GITHUB_OUTPUT
106+
107+
build-img:
108+
name: BUILD ${{ inputs.ubuntu_version }}-${{ inputs.stage }} img
109+
runs-on: [dlstreamer.pipeline-framework, ubuntu]
110+
needs: vars
111+
outputs:
112+
image-release: ${{ steps.create-outputs.outputs.image-release }}
113+
image-test: ${{ steps.create-outputs.outputs.image-test }}
114+
apt-ver-dls: ${{ steps.build.outputs.version }}
115+
dlstreamer-apt-version: ${{ env.DLSTREAMER_APT_VERSION }}
116+
env:
117+
ONEDEB_DLS_IMG_TAG: "ger-is-registry.caas.intel.com/dlstreamer/dlstreamer_images/ci/${{ inputs.ubuntu_version }}-${{ inputs.stage }}:${{ github.sha }}"
118+
ONEDEB_DLS_TEST_IMG_TAG: "ger-is-registry.caas.intel.com/dlstreamer/dlstreamer_images/ci/${{ inputs.ubuntu_version }}-${{ inputs.stage }}-test:${{ github.sha }}"
119+
ONEDEB_DLS_IMG_TAG_CACHE: "ger-is-registry.caas.intel.com/dlstreamer/dlstreamer_images/ci/${{ inputs.ubuntu_version }}-${{ inputs.stage }}:buildcache"
120+
steps:
121+
- name: Clean before
122+
run: |
123+
sudo rm -rf dls-pf deb_packages edge-ai-libraries-repo || true
124+
125+
- name: Check out edge-ai-libraries repository
126+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #4.2.2
127+
with:
128+
repository: open-edge-platform/edge-ai-libraries
129+
path: edge-ai-libraries-repo
130+
persist-credentials: false
131+
ref: ${{ inputs.oep-repo-branch }}
132+
133+
- name: Init submodules
134+
run: |
135+
cd edge-ai-libraries-repo
136+
git submodule update --init libraries/dl-streamer/thirdparty/spdlog
137+
git submodule update --init libraries/dl-streamer/thirdparty/googletest
138+
139+
- name: Set up Docker Buildx
140+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 #3.10.0
141+
with:
142+
buildkitd-config-inline: |
143+
[registry."ger-is-registry.caas.intel.com"]
144+
insecure = true
145+
146+
- name: Docker Login to Harbor
147+
uses: docker/login-action@v2
148+
with:
149+
registry: ${{ inputs.docker-registry }}
150+
username: ${{ vars.HARBOR_EDSS_ARTIFAC_USR }}
151+
password: ${{ secrets.HARBOR_EDSS_ARTIFAC_PW }}
152+
153+
- name: Build Docker image
154+
run: |
155+
DOCKERFILE="edge-ai-libraries-repo/libraries/dl-streamer/docker/ubuntu/${{ inputs.ubuntu_version }}.Dockerfile"
156+
docker buildx build \
157+
--load \
158+
--file $DOCKERFILE \
159+
--target ${{ inputs.stage }} \
160+
-t $ONEDEB_DLS_IMG_TAG \
161+
--build-arg DLSTREAMER_VERSION=$DLSTREAMER_APT_VERSION \
162+
--build-arg DLSTREAMER_BUILD_NUMBER=${{ inputs.ubuntu_version }} \
163+
--build-arg DOCKER_REGISTRY=${{ inputs.docker-registry }} \
164+
--cache-from=type=registry,ref=${{ env.ONEDEB_DLS_IMG_TAG_CACHE }} \
165+
edge-ai-libraries-repo/libraries/dl-streamer
166+
167+
- name: Build dlstreamer img with python
168+
id: dlstreamer-with-python
169+
run: |
170+
docker build \
171+
--load \
172+
-f edge-ai-libraries-repo/libraries/dl-streamer/docker/ubuntu/ubuntu-testing.Dockerfile \
173+
-t $ONEDEB_DLS_TEST_IMG_TAG \
174+
--build-arg BASE_IMAGE=$ONEDEB_DLS_IMG_TAG \
175+
edge-ai-libraries-repo/libraries/dl-streamer
176+
177+
- name: Push image to registry
178+
run: |
179+
docker push $ONEDEB_DLS_TEST_IMG_TAG
180+
docker push $ONEDEB_DLS_IMG_TAG
181+
182+
- name: Create variables for af
183+
run: |
184+
if [ "${{ inputs.ubuntu_version }}" == "ubuntu22" ]; then
185+
echo "UBUNTU_AF_VAR=jammy" >> $GITHUB_ENV
186+
elif [ "${{ inputs.ubuntu_version }}" == "ubuntu24" ]; then
187+
echo "UBUNTU_AF_VAR=noble" >> $GITHUB_ENV
188+
fi
189+
190+
- name: Extract .deb pkgs
191+
run: |
192+
chmod +x edge-ai-libraries-repo/libraries/dl-streamer/scripts/extract_and_verify_debs.sh
193+
edge-ai-libraries-repo/libraries/dl-streamer/scripts/extract_and_verify_debs.sh $ONEDEB_DLS_IMG_TAG
194+
ls
195+
cp -r deb_packages edge-ai-libraries-repo
196+
mv edge-ai-libraries-repo/deb_packages/intel-dlstreamer_$DLSTREAMER_APT_VERSION.${{ inputs.ubuntu_version }}_amd64.deb edge-ai-libraries-repo/deb_packages/intel-dlstreamer_$DLSTREAMER_APT_VERSION.${{ needs.vars.outputs.build-num }}_amd64.deb
197+
198+
- name: Check out repository code
199+
uses: actions/checkout@v4.2.0
200+
with:
201+
path: dls-pf
202+
submodules: recursive
203+
204+
- name: Sign and upload pkg
205+
env:
206+
REPO_URL: ${{ env.ARTI_URL }}/one-deb-${{ needs.vars.outputs.ubuntu_distribution }}/pool/main/${{ needs.vars.outputs.deb-component }}
207+
DISTRIBUTION: ${{ needs.vars.outputs.deb-distribution }}
208+
COMPONENT_NAME: ${{ needs.vars.outputs.deb-component }}
209+
REPO_USER: ${{ vars.HARBOR_EDSS_ARTIFAC_USR }}
210+
REPO_PASS: ${{ secrets.HARBOR_EDSS_ARTIFAC_PW }}
211+
EDSS_USERNAME: ${{ vars.HARBOR_EDSS_ARTIFAC_USR }}
212+
EDSS_PASSWORD: ${{ secrets.HARBOR_EDSS_ARTIFAC_PW }}
213+
CA_FILE: /tmp/signfile-lin-x64/intel-ca.crt
214+
run: |
215+
SIGNFILE_DIR="/tmp/signfile-lin-x64"
216+
if [ -d "$SIGNFILE_DIR" ]; then
217+
echo "Signfile already exists in /tmp. Skipping download and extraction."
218+
else
219+
echo "Signfile not found in /tmp. Proceeding with download and extraction."
220+
curl --remote-name --remote-header-name --location \
221+
--header "Accept: application/octet-stream" \
222+
--header "X-GitHub-Api-Version: 2022-11-28" \
223+
https://${{ secrets.GH_PAT }}:@api.github.com/repos/intel-innersource/applications.security.edss.docs.signfile-releases/releases/assets/88109777
224+
tar -xf signfile-lin-x64-*.tar
225+
rm signfile-lin-x64-*.tar
226+
mv signfile-lin-x64-* "$SIGNFILE_DIR"
227+
if [ -L /usr/bin/SignFile ]; then
228+
sudo rm /usr/bin/SignFile
229+
fi
230+
sudo ln -s "$SIGNFILE_DIR/SignFile" /usr/bin/SignFile
231+
sed -i 's/EDSS_SignFile/Signing Operation DLStreamer - GAv2/g' "$SIGNFILE_DIR/SignFile.config.xml"
232+
echo "Signfile setup completed."
233+
fi
234+
chmod +x ./dls-pf/infrastructure/upload_packages.sh
235+
sh -c "./dls-pf/infrastructure/upload_packages.sh ${REPO_USER} ${REPO_PASS} ${REPO_URL} edge-ai-libraries-repo/deb_packages ${DISTRIBUTION} ${COMPONENT_NAME} ${EDSS_USERNAME} ${EDSS_PASSWORD} ${CA_FILE}"
236+
237+
- name: Build DLSTREAMER_APT_REPO variable
238+
if: ${{ inputs.stage }} == deb-builder || ${{ inputs.stage }} == dlstreamer
239+
run: |
240+
DLSTREAMER_APT_REPO="deb [trusted=yes] ${{ env.ARTI_URL }} ${{ needs.vars.outputs.deb-distribution }} ${{ needs.vars.outputs.deb-component }}"
241+
echo "apt_repo=$DLSTREAMER_APT_REPO" >> $GITHUB_ENV
242+
243+
- name: Create wget command line to download dlstreamer packages
244+
if: ${{ inputs.stage }} == deb-builder || ${{ inputs.stage }} == dlstreamer
245+
run: echo "wget_cmd=wget -r -np -nH --cut-dirs=7 -A '*intel-dlstreamer*' $ARTI_URL/one-deb-${{ env.UBUNTU_AF_VAR }}/pool/main/${{ needs.vars.outputs.deb-component }}/" >> $GITHUB_ENV
246+
247+
- name: Create images output
248+
id: create-outputs
249+
run: |
250+
echo "image-release=$ONEDEB_DLS_IMG_TAG" >> "$GITHUB_OUTPUT"
251+
echo "image-test=$ONEDEB_DLS_TEST_IMG_TAG" >> "$GITHUB_OUTPUT"
252+
253+
- name: Create summary
254+
run: |
255+
echo "### ${{ inputs.ubuntu_version }}-${{ inputs.stage }} image :ship:" >> $GITHUB_STEP_SUMMARY
256+
echo "" >> $GITHUB_STEP_SUMMARY
257+
echo '```' >> $GITHUB_STEP_SUMMARY
258+
echo "$ONEDEB_DLS_IMG_TAG" >> $GITHUB_STEP_SUMMARY
259+
echo '```' >> $GITHUB_STEP_SUMMARY
260+
echo "### ${{ inputs.ubuntu_version }}-${{ inputs.stage }} test image :ship:" >> $GITHUB_STEP_SUMMARY
261+
echo "" >> $GITHUB_STEP_SUMMARY
262+
echo '```' >> $GITHUB_STEP_SUMMARY
263+
echo "$ONEDEB_DLS_TEST_IMG_TAG" >> $GITHUB_STEP_SUMMARY
264+
echo '```' >> $GITHUB_STEP_SUMMARY
265+
echo "APT source list:" >> $GITHUB_STEP_SUMMARY
266+
echo '```' >> $GITHUB_STEP_SUMMARY
267+
echo "$apt_repo" >> $GITHUB_STEP_SUMMARY
268+
echo '```' >> $GITHUB_STEP_SUMMARY
269+
echo "wget command line:" >> $GITHUB_STEP_SUMMARY
270+
echo '```' >> $GITHUB_STEP_SUMMARY
271+
echo "$wget_cmd" >> $GITHUB_STEP_SUMMARY
272+
echo '```' >> $GITHUB_STEP_SUMMARY
273+
274+
- name: Clean up
275+
if: always ()
276+
run: rm -rf deb_packages dls-pf edge-ai-libraries-repo

0 commit comments

Comments
 (0)