-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ml-apps: Add CI support for Corstone-300 and Corstone-310
Add keyword-detection and speech-recognition testing with the available configuration (ETHOS/SOFTWARE) to the CI. Increase the timeout to accommodate the applications execution time as it takes longer. Signed-off-by: Ahmed Ismail <[email protected]>
- Loading branch information
1 parent
7df8c24
commit 0d10f6c
Showing
3 changed files
with
84 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,14 @@ variables: | |
|
||
# Those fragments contain base variables required by pipelines for applications. | ||
# They can be used to set matrix parameters and extended using << : .anchor syntax | ||
.pipeline_config_applications: &pipeline_config_applications | ||
TARGET: [corstone300, corstone310] | ||
.pipeline_config_applications_ethos: &pipeline_config_applications_ethos | ||
TARGET: [corstone310, corstone300] | ||
TOOLCHAIN: [ARMCLANG, GNU] | ||
INFERENCE: [ETHOS] | ||
.pipeline_config_applications_sw: &pipeline_config_applications_sw | ||
TARGET: [corstone310, corstone300] | ||
TOOLCHAIN: [ARMCLANG, GNU] | ||
INFERENCE: [SOFTWARE] | ||
|
||
stages: | ||
- quality-check | ||
|
@@ -54,7 +59,8 @@ workflow: | |
fi | ||
parallel: | ||
matrix: | ||
- *pipeline_config_applications | ||
- *pipeline_config_applications_ethos | ||
- *pipeline_config_applications_sw | ||
variables: | ||
PYTHONUNBUFFERED: 1 | ||
|
||
|
@@ -76,51 +82,70 @@ build-applications: | |
- ./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" | ||
- ./tools/scripts/build.sh ${APP} --target $TARGET --toolchain $TOOLCHAIN --certificate_path $PWD/certificate.pem --private_key_path $PWD/private_key.pem | ||
- | | ||
if [ $APP == "aws-iot-example" ];then | ||
tar -czf ${TARGET}_${APP}_${TOOLCHAIN}_build.tar.gz \ | ||
./tools/scripts/build.sh ${APP} \ | ||
--target $TARGET \ | ||
--inference $INFERENCE \ | ||
--toolchain $TOOLCHAIN \ | ||
--certificate_path $PWD/certificate.pem \ | ||
--private_key_path $PWD/private_key.pem | ||
- | | ||
if [ $APP == "blinky" ];then | ||
tar -czf ${TARGET}_${APP}_${TOOLCHAIN}_${INFERENCE}_build.tar.gz \ | ||
build/${APP}_merged.elf | ||
else | ||
tar -czf ${TARGET}_${APP}_${TOOLCHAIN}_${INFERENCE}_build.tar.gz \ | ||
build/${APP}_merged.elf \ | ||
build/${APP}-update_signed.bin \ | ||
build/update-signature.txt \ | ||
applications/${APP_UNDERSCORED}/configs/aws_configs | ||
else | ||
tar -czf ${TARGET}_${APP}_${TOOLCHAIN}_build.tar.gz \ | ||
build/${APP}_merged.elf | ||
fi | ||
parallel: | ||
matrix: | ||
- | ||
<< : *pipeline_config_applications | ||
APP: [blinky, aws-iot-example] | ||
<< : *pipeline_config_applications_ethos | ||
APP: [blinky, aws-iot-example, keyword-detection, speech-recognition] | ||
- | ||
<< : *pipeline_config_applications_sw | ||
APP: [keyword-detection] | ||
|
||
artifacts: | ||
paths: | ||
- ${TARGET}_${APP}_${TOOLCHAIN}_build.tar.gz | ||
- ${TARGET}_${APP}_${TOOLCHAIN}_${INFERENCE}_build.tar.gz | ||
expire_in: 1 week | ||
|
||
test-applications-output: | ||
extends: .test_job | ||
script: | ||
- tar xf ${TARGET}_${APP}_${TOOLCHAIN}_build.tar.gz | ||
- tar xf ${TARGET}_${APP}_${TOOLCHAIN}_${INFERENCE}_build.tar.gz | ||
- export APP_UNDERSCORED=$(echo ${APP} | tr '-' '_') | ||
- | | ||
pytest -s tools/tests/test_application_output.py \ | ||
--build-artefacts-path "build" \ | ||
--fvp $FVP_BIN \ | ||
--merged-elf-name "${APP}_merged.elf" \ | ||
--timeout-seconds 600 \ | ||
--timeout-seconds 900 \ | ||
--pass-output-file "applications/${APP_UNDERSCORED}/tests/pass_output.log" \ | ||
--fail-output-file "applications/${APP_UNDERSCORED}/tests/fail_output.log" | ||
parallel: | ||
matrix: | ||
- | ||
<< : *pipeline_config_applications | ||
APP: [blinky] | ||
<< : *pipeline_config_applications_ethos | ||
APP: [blinky, keyword-detection, speech-recognition] | ||
|
||
# The test-ota job should wait for build-applications job to finish as | ||
# test-ota job uses the output build artifacts from build-applications job. | ||
# The test-ota job should also wait for test-applications-output job to finish | ||
# to prevent conflicts when doing both jobs at the same time as they both | ||
# use the same credentials for the same target platform and application. | ||
test-ota: | ||
extends: .test_job | ||
needs: | ||
- job: build-applications | ||
artifacts: true | ||
- job: test-applications-output | ||
script: | ||
- tar xf ${TARGET}_${APP}_${TOOLCHAIN}_build.tar.gz | ||
- tar xf ${TARGET}_${APP}_${TOOLCHAIN}_${INFERENCE}_build.tar.gz | ||
- export APP_UNDERSCORED=$(echo ${APP} | tr '-' '_') | ||
- | | ||
pytest -s tools/tests/test_ota.py \ | ||
|
@@ -129,15 +154,17 @@ test-ota: | |
--credentials-path "applications/${APP_UNDERSCORED}/configs/aws_configs" \ | ||
--merged-elf-name "${APP}_merged.elf" \ | ||
--signed-update-bin-name "${APP}-update_signed.bin" \ | ||
--timeout-seconds 900 \ | ||
--timeout-seconds 1800 \ | ||
--pass-ota-output-file "applications/${APP_UNDERSCORED}/tests/pass_ota_output.log" \ | ||
--fail-ota-output-file "applications/${APP_UNDERSCORED}/tests/fail_ota_output.log" | ||
parallel: | ||
matrix: | ||
- | ||
<< : *pipeline_config_applications | ||
APP: [aws-iot-example] | ||
|
||
<< : *pipeline_config_applications_ethos | ||
APP: [aws-iot-example, keyword-detection, speech-recognition] | ||
- | ||
<< : *pipeline_config_applications_sw | ||
APP: [keyword-detection] | ||
|
||
integration-tests: | ||
stage: test | ||
|
@@ -164,7 +191,7 @@ integration-tests: | |
parallel: | ||
matrix: | ||
- | ||
<< : *pipeline_config_applications | ||
<< : *pipeline_config_applications_ethos | ||
APP: [aws-iot-example] | ||
|
||
# The clean up only happens once daily when the `Daily OTA cleanup` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters