Skip to content

Commit ca4192c

Browse files
committed
Add support for DRP AI libs
1 parent 6a1015b commit ca4192c

1 file changed

Lines changed: 46 additions & 14 deletions

File tree

.github/workflows/build-app-target-matrix.yml

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,36 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v4
1717

18-
- name: Build and deploy Edge Impulse model
19-
id: build-deploy
18+
- name: Build and deploy Edge Impulse model (FOMO)
19+
id: build-deploy-fomo
2020
uses: edgeimpulse/build-deploy@v2.0.0
2121
with:
2222
project_id: ${{ secrets['EDGE_IMPULSE_PROJECT_ID'] }}
2323
api_key: ${{ secrets['EDGE_IMPULSE_API_KEY'] }}
2424
engine: tflite
25-
deployment_type: zip
25+
deployment_type: zip-linux
2626

27-
- name: Upload deployment artifact
27+
- name: Upload deployment artifact (FOMO)
2828
uses: actions/upload-artifact@v4
2929
with:
30-
name: edge-impulse-deployment
31-
path: ${{ steps.build-deploy.outputs.deployment_file_name }}
30+
name: edge-impulse-deployment-fomo
31+
path: ${{ steps.build-deploy-fomo.outputs.deployment_file_name }}
32+
if-no-files-found: error
33+
34+
- name: Build and deploy Edge Impulse model (DRPAI)
35+
id: build-deploy-drpai
36+
uses: edgeimpulse/build-deploy@v2.0.0
37+
with:
38+
project_id: ${{ secrets['EDGE_IMPULSE_PROJECT_ID'] }}
39+
api_key: ${{ secrets['EDGE_IMPULSE_API_KEY'] }}
40+
engine: tflite
41+
deployment_type: drp-ai-lib
42+
43+
- name: Upload deployment artifact (DRPAI)
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: edge-impulse-deployment-drpai
47+
path: ${{ steps.build-deploy-drpai.outputs.deployment_file_name }}
3248
if-no-files-found: error
3349

3450
build-matrix:
@@ -51,21 +67,25 @@ jobs:
5167
target_flags: TARGET_LINUX_X86=1 USE_FULL_TFLITE=1
5268
cc: gcc
5369
cxx: g++
70+
deployment: zip-linux
5471
- name: TARGET_LINUX_ARMV7
5572
runner: ubuntu-24.04
5673
target_flags: TARGET_LINUX_ARMV7=1 USE_FULL_TFLITE=1
5774
cc: arm-linux-gnueabihf-gcc
5875
cxx: arm-linux-gnueabihf-g++
76+
deployment: zip-linux
5977
- name: TARGET_LINUX_ARMV7_LEGACY
6078
runner: ubuntu-24.04
6179
target_flags: TARGET_LINUX_ARMV7_LEGACY=1 USE_FULL_TFLITE=1
6280
cc: arm-linux-gnueabihf-gcc
6381
cxx: arm-linux-gnueabihf-g++
82+
deployment: zip-linux
6483
- name: TARGET_LINUX_AARCH64
6584
runner: ubuntu-24.04
6685
target_flags: TARGET_LINUX_AARCH64=1 USE_FULL_TFLITE=1
6786
cc: aarch64-linux-gnu-gcc
6887
cxx: aarch64-linux-gnu-g++
88+
deployment: zip-linux
6989
# - name: TARGET_MAC_X86_64
7090
# runner: macos-13
7191
# target_flags: TARGET_MAC_X86_64=1 USE_FULL_TFLITE=1
@@ -81,36 +101,43 @@ jobs:
81101
target_flags: TARGET_JETSON_ORIN=1
82102
cc: aarch64-linux-gnu-gcc
83103
cxx: aarch64-linux-gnu-g++
104+
deployment: zip-linux
84105
- name: TARGET_JETSON
85106
runner: ubuntu-24.04
86107
target_flags: TARGET_JETSON=1
87108
cc: aarch64-linux-gnu-gcc
88109
cxx: aarch64-linux-gnu-g++
110+
deployment: zip-linux
89111
- name: TARGET_RENESAS_RZV2L
90112
runner: ubuntu-24.04
91113
target_flags: TARGET_RENESAS_RZV2L=1
92114
cc: aarch64-linux-gnu-gcc
93115
cxx: aarch64-linux-gnu-g++
116+
deployment: drp-ai-lib
94117
- name: TARGET_RENESAS_RZG2L
95118
runner: ubuntu-24.04
96119
target_flags: TARGET_RENESAS_RZG2L=1
97120
cc: aarch64-linux-gnu-gcc
98121
cxx: aarch64-linux-gnu-g++
122+
deployment: drp-ai-lib
99123
- name: TARGET_TDA4VM
100124
runner: ubuntu-24.04
101125
target_flags: TARGET_TDA4VM=1
102126
cc: aarch64-linux-gnu-gcc
103127
cxx: aarch64-linux-gnu-g++
128+
deployment: zip-linux
104129
- name: TARGET_AM62A
105130
runner: ubuntu-24.04
106131
target_flags: TARGET_AM62A=1
107132
cc: aarch64-linux-gnu-gcc
108133
cxx: aarch64-linux-gnu-g++
134+
deployment: zip-linux
109135
- name: TARGET_AM68A
110136
runner: ubuntu-24.04
111137
target_flags: TARGET_AM68A=1
112138
cc: aarch64-linux-gnu-gcc
113139
cxx: aarch64-linux-gnu-g++
140+
deployment: zip-linux
114141

115142
steps:
116143
- name: Checkout
@@ -207,11 +234,18 @@ jobs:
207234
echo "Skipping ${{ matrix.app }} + ${{ matrix.target.name }}"
208235
echo "Reason: ${{ steps.validate.outputs.reason }}"
209236
210-
- name: Download deployment artifact
211-
if: matrix.app != 'APP_COLLECT' && steps.validate.outputs.supported == 'true'
237+
- name: Download deployment artifact (FOMO)
238+
if: matrix.app != 'APP_COLLECT' && matrix.target.deployment == 'zip-linux' && steps.validate.outputs.supported == 'true'
239+
uses: actions/download-artifact@v4
240+
with:
241+
name: edge-impulse-deployment-fomo
242+
path: .
243+
244+
- name: Download deployment artifact (DRPAI)
245+
if: matrix.app != 'APP_COLLECT' && matrix.target.deployment == 'drp-ai-lib' && steps.validate.outputs.supported == 'true'
212246
uses: actions/download-artifact@v4
213247
with:
214-
name: edge-impulse-deployment
248+
name: edge-impulse-deployment-drpai
215249
path: .
216250

217251
- name: Extract model and SDK
@@ -220,8 +254,8 @@ jobs:
220254
run: |
221255
set -euxo pipefail
222256
223-
rm -rf edge-impulse-sdk model-parameters tflite-model temp
224-
mkdir -p temp
257+
rm -rf edge-impulse-sdk/ model-parameters/ tflite-model/ temp/
258+
mkdir -p temp/
225259
226260
deployment_file="$(find . -maxdepth 1 -type f -name '*.zip' | head -n 1)"
227261
if [[ -z "$deployment_file" ]]; then
@@ -230,9 +264,7 @@ jobs:
230264
fi
231265
232266
unzip -q "$deployment_file" -d temp
233-
mv temp/edge-impulse-sdk .
234-
mv temp/model-parameters .
235-
mv temp/tflite-model .
267+
mv temp/* .
236268
237269
rm -rf "$deployment_file" temp
238270

0 commit comments

Comments
 (0)