-
Notifications
You must be signed in to change notification settings - Fork 25
42 lines (41 loc) · 1.28 KB
/
object-detection.yml
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
name: Build object-detection application
on:
workflow_dispatch:
push:
paths:
- 'object-detection/**'
- '!object-detection/README.md'
- '.github/workflows/object-detection.yml'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: armv7hf
chip: cpu
axis-os: 11.5.64
- arch: armv7hf
chip: edgetpu
axis-os: 11.5.64
- arch: aarch64
chip: artpec8
axis-os: 11.5.64
env:
EXREPO: acap-native-examples
EXNAME: object-detection
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- name: Build ${{ env.example }} application
env:
example: ${{ env.EXNAME }}-${{ matrix.chip }}
imagetag: ${{ env.EXREPO }}_${{ env.EXNAME }}-${{ matrix.chip }}:${{ matrix.arch }}
run: |
docker image rm -f $imagetag
cd $EXNAME
cp app/manifest.json.${{ matrix.chip }} app/manifest.json
docker build --no-cache --build-arg CHIP=${{ matrix.chip }} --build-arg ARCH=${{ matrix.arch }} --tag $imagetag .
docker cp $(docker create $imagetag):/opt/app ./build_${{ matrix.chip }}
cd ..
docker image rm -f $imagetag