-
Notifications
You must be signed in to change notification settings - Fork 15
93 lines (90 loc) · 3.15 KB
/
build.yaml
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
88
89
90
91
92
93
# Copyright (c) 2023-2024 Arm Limited and/or its affiliates
# SPDX-License-Identifier: MIT
name: Build
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- closed
branches:
- main
workflow_dispatch:
jobs:
ubuntu:
runs-on: ubuntu-latest
strategy:
matrix:
application: [keyword-detection, speech-recognition, object-detection]
audio: [ROM, VSI]
inference: [ETHOS, SOFTWARE]
exclude:
- application: object-detection
audio: VSI
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
path: ${{ github.workspace }}
submodules: 'recursive'
- name: Install python 3
uses: actions/setup-python@v3
with:
python-version: '3.10'
architecture: x64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install build dependencies
shell: bash
run: |
pip install cmake ninja imgtool cffi intelhex cbor2 cbor jinja2 PyYaml pyelftools pyhsslms
sudo apt-get -y update
sudo apt-get -y install srecord libsndfile1-dev
- name: Install GNU Arm toolchain
shell: bash
run: |
sudo apt-get -y install tar
pushd $HOME
wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
tar -xf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
popd
- name: Generate dummy device credentials
shell: bash
run: |
export IOT_OTA_ENDPOINT="dummy_endpoint"
export IOT_OTA_CLIENT_CERT="dummy_certificate"
export IOT_OTA_CLIENT_PRIV="dummy_priv_key"
export IOT_OTA_CLIENT_PUB="dummy_pub_key"
export APP_UNDERSCORED=$(echo ${{ matrix.application }} | tr '-' '_')
./tools/ci/generate_credentials.sh -f -p applications/${APP_UNDERSCORED}/configs/aws_configs
git config --global user.email "[email protected]"
git config --global user.name "ci"
git config --global core.autocrlf input
- name: Build ${{ matrix.application }} application
shell: bash
run: |
export PATH=$HOME/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin:$PATH
./tools/scripts/build.sh ${{ matrix.application }} \
--inference ${{ matrix.inference }} \
--audio ${{ matrix.audio }} \
--toolchain GNU \
--certificate_path $PWD/certificate.pem \
--private_key_path $PWD/private_key.pem
- name: Copy artifacts
shell: bash
run: |
tar -czf ${{ matrix.application }}_gnu_build.tar.gz \
build/${{ matrix.application }}_merged.elf \
build/${{ matrix.application }}-update_signed.bin \
build/update-signature.txt
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: FRI-build-logs
path: |
${{ github.workspace }}/${{ matrix.application }}_gnu_build.tar.gz
retention-days: 5