Skip to content

Commit

Permalink
Merge pull request #292 from xmos/release/v2.0.0
Browse files Browse the repository at this point in the history
Release/v2.0.0
  • Loading branch information
keithm-xmos authored Jul 11, 2023
2 parents 00b961d + 6007d35 commit fbc1e7e
Show file tree
Hide file tree
Showing 431 changed files with 485,602 additions and 7,802 deletions.
61 changes: 31 additions & 30 deletions .github/workflows/apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ jobs:
with:
submodules: recursive

- name: Pull SDK builder
- name: Pull XCORE builder
run: |
docker pull ${XCORE_BUILDER}
- name: Build
run: |
docker run --rm -w /sln_voice -v ${{github.workspace}}:/sln_voice ${XCORE_BUILDER} bash -l tools/ci/build_host_apps.sh
docker run --rm -u $(id -u):$(id -g) -w /sln_voice -v ${{github.workspace}}:/sln_voice ${XCORE_BUILDER} bash -l tools/ci/build_host_apps.sh
- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:

- name: Build
run: |
docker run --user $(id -u) --rm -w /sln_voice -v ${{github.workspace}}:/sln_voice ${XCORE_BUILDER} bash -l tools/ci/build_examples.sh tools/ci/main_examples.txt
docker run --rm -u $(id -u):$(id -g) -w /sln_voice -v ${{github.workspace}}:/sln_voice ${XCORE_BUILDER} bash -l tools/ci/build_examples.sh tools/ci/main_examples.txt
- name: Save metadata
run: |
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:

- name: Build
run: |
docker run --user $(id -u) --rm -w /sln_voice -v ${{github.workspace}}:/sln_voice ${XCORE_BUILDER} bash -l tools/ci/build_examples.sh tools/ci/misc_examples.txt
docker run --rm -u $(id -u):$(id -g) -w /sln_voice -v ${{github.workspace}}:/sln_voice ${XCORE_BUILDER} bash -l tools/ci/build_examples.sh tools/ci/misc_examples.txt
build_dev_examples:
if: inputs.is_release == 'false'
Expand All @@ -147,29 +147,30 @@ jobs:

- name: Build
run: |
docker run --user $(id -u) --rm -w /sln_voice -v ${{github.workspace}}:/sln_voice ${XCORE_BUILDER} bash -l tools/ci/build_examples.sh tools/ci/dev_examples.txt
build_tests:
if: inputs.is_release == 'false'
name: Build tests and test applications
runs-on: ubuntu-latest
needs: build_host_apps
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Pull Docker builder
run: |
docker pull ${XCORE_BUILDER}
- name: Download host build artifacts
uses: actions/download-artifact@v3
with:
name: ${{ env.HOST_APPS_ARTIFACT_NAME }}
path: ./dist_host

- name: Build
run: |
docker run --user $(id -u) --rm -w /sln_voice -v ${{github.workspace}}:/sln_voice ${XCORE_BUILDER} bash -l tools/ci/build_tests.sh
docker run --rm -u $(id -u):$(id -g) -w /sln_voice -v ${{github.workspace}}:/sln_voice ${XCORE_BUILDER} bash -l tools/ci/build_examples.sh tools/ci/dev_examples.txt
# NOTE: Tests are now built by internal Jenkins CI
# build_tests:
# if: inputs.is_release == 'false'
# name: Build tests and test applications
# runs-on: ubuntu-latest
# needs: build_host_apps
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# submodules: recursive

# - name: Pull Docker builder
# run: |
# docker pull ${XCORE_BUILDER}

# - name: Download host build artifacts
# uses: actions/download-artifact@v3
# with:
# name: ${{ env.HOST_APPS_ARTIFACT_NAME }}
# path: ./dist_host

# - name: Build
# run: |
# docker run --rm -u $(id -u):$(id -g) -w /sln_voice -v ${{github.workspace}}:/sln_voice ${XCORE_BUILDER} bash -l tools/ci/build_tests.sh
5 changes: 3 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ on:
type: string

env:
DOC_BUILDER_IMAGE: "ghcr.io/xmos/doc_builder:v2.0.0"
DOCS_ARTIFACT_NAME: "xcore_voice_docs"
DOC_BUILDER_IMAGE: "ghcr.io/xmos/doc_builder:v3.0.0"
HTML_DOCS_ARTIFACT_NAME: "xcore_voice_html_docs"
PDF_DOCS_ARTIFACT_NAME: "xcore_voice_pdf_docs"

jobs:
build_documentation:
Expand Down
10 changes: 7 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
[submodule "modules/core"]
path = modules/core
url = [email protected]:xmos/fwk_core.git
branch = feature/cmake_rename
[submodule "modules/io"]
path = modules/io
url = [email protected]:xmos/fwk_io.git
branch = feature/restructure_remove_sdk
[submodule "modules/rtos"]
path = modules/rtos
url = [email protected]:xmos/fwk_rtos.git
branch = feature/restructure_remove_sdk
[submodule "modules/sample_rate_conversion/lib_src"]
path = modules/sample_rate_conversion/lib_src
url = [email protected]:xmos/lib_src.git
Expand All @@ -25,3 +22,10 @@
[submodule "modules/inferencing/lib_nn"]
path = modules/inferencing/lib_nn
url = [email protected]:xmos/lib_nn.git
[submodule "modules/lib_qspi_fast_read"]
path = modules/lib_qspi_fast_read
url = [email protected]:xmos/lib_qspi_fast_read.git
[submodule "modules/inferencing/lib_tflite_micro"]
path = modules/inferencing/lib_tflite_micro
url = [email protected]:xmos/lib_tflite_micro.git
ignore = dirty
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
XCORE-VOICE change log
======================

2.0.0
-----

* ADDED: All speech recognition example deigns now use Sensory TrulyHandsfree speech recognition library.
* ADDED: Low-power far-field dictionary (low-power FFD) example design using wakeword to exit standby mode.
* ADDED: Mandarin model to far-field dictionary (low-power FFD) example design demonstration.
* ADDED: Support for fast flash library which increases flash reading throughput by as much as 70%.
* MOVED: Audio pipelines relocated to modules to allow easier re-use.
* FIXED: Example designs now indicate when evaluation period has expired.
* FIXED: Numerous minor bug fixes.

1.0.0
-----

Expand Down
160 changes: 111 additions & 49 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,47 @@ pipeline {
defaultValue: '15.2.1',
description: 'The XTC tools version'
)
booleanParam(name: 'NIGHTLY_TEST_ONLY',
defaultValue: false,
description: 'Tests that only run during nightly builds.')
}
environment {
PYTHON_VERSION = "3.8.11"
VENV_DIRNAME = ".venv"
BUILD_DIRNAME = "dist"
VRD_TEST_RIG_TARGET = "xcore_voice_test_rig"
PIPELINE_TEST_VECTORS = "pipeline_test_vectors"
ASR_TEST_VECTORS = "asr_test_vectors"
}
stages {
stage('Checkout') {
steps {
checkout scm
sh 'git submodule update --init --recursive --depth 1 --jobs \$(nproc)'
}
}
stage('Build artifacts') {
}
stage('Build tests') {
steps {
script {
uid = sh(returnStdout: true, script: 'id -u').trim()
gid = sh(returnStdout: true, script: 'id -g').trim()
}
// pull docker images
sh "docker pull ghcr.io/xmos/xcore_builder:latest"
sh "docker pull ghcr.io/xmos/xcore_voice_tester:develop"
// host apps
sh "docker run --rm -w /xcore_sdk -v $WORKSPACE:/xcore_sdk ghcr.io/xmos/xcore_builder:latest bash -l tools/ci/build_host_apps.sh"
// test apps
sh "docker run --rm -w /sln_voice -v $WORKSPACE:/sln_voice ghcr.io/xmos/xcore_builder:latest bash -l tools/ci/build_tests.sh"
sh "docker run --rm -u $uid:$gid -w /sln_voice -v $WORKSPACE:/sln_voice ghcr.io/xmos/xcore_builder:latest bash -l tools/ci/build_host_apps.sh"
// test firmware and filesystems
sh "docker run --rm -u $uid:$gid -w /sln_voice -v $WORKSPACE:/sln_voice ghcr.io/xmos/xcore_builder:latest bash -l tools/ci/build_tests.sh"
// List built files for log
sh "ls -la dist_host/"
sh "ls -la dist/"
}
}
stage('Create virtual environment') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
// Create venv
sh "pyenv install -s $PYTHON_VERSION"
Expand All @@ -61,6 +75,9 @@ pipeline {
}
}
stage('Cleanup xtagctl') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
// Cleanup any xtagctl cruft from previous failed runs
withTools(params.TOOLS_VERSION) {
Expand All @@ -71,13 +88,16 @@ pipeline {
sh "rm -f ~/.xtag/status.lock ~/.xtag/acquired"
}
}
stage('Run Sample_Rate_Conversion test') {
stage('Run Sample Rate Conversion test') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
withTools(params.TOOLS_VERSION) {
withVenv {
script {
withXTAG(["$VRD_TEST_RIG_TARGET"]) { adapterIDs ->
sh "test/sample_rate_conversion/check_sample_rate_conversion.sh $BUILD_DIRNAME/example_ffva_sample_rate_conv_test.xe test/sample_rate_conversion/test_output " + adapterIDs[0]
sh "test/sample_rate_conversion/check_sample_rate_conversion.sh " + adapterIDs[0]
}
sh "pytest test/sample_rate_conversion/test_sample_rate_conversion.py --wav_file test/sample_rate_conversion/test_output/sample_rate_conversion_output.wav --wav_duration 10"
}
Expand All @@ -86,6 +106,9 @@ pipeline {
}
}
stage('Run GPIO test') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
withTools(params.TOOLS_VERSION) {
withVenv {
Expand All @@ -98,6 +121,9 @@ pipeline {
}
}
stage('Run FFD Low Power Audio Buffer test') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
withTools(params.TOOLS_VERSION) {
withVenv {
Expand All @@ -109,59 +135,95 @@ pipeline {
}
}
}
stage('Run Device_Firmware_Update test') {
stage('Run Device Firmware Update test') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
withTools(params.TOOLS_VERSION) {
withVenv {
script {
uid = sh(returnStdout: true, script: 'id -u').trim()
gid = sh(returnStdout: true, script: 'id -g').trim()
withXTAG(["$VRD_TEST_RIG_TARGET"]) { adapterIDs ->
sh "docker run --rm -u $uid:$gid --privileged -v /dev/bus/usb:/dev/bus/usb -w /sln_voice -v $WORKSPACE:/sln_voice ghcr.io/xmos/xcore_voice_tester:develop bash -l test/device_firmware_update/check_dfu.sh " + adapterIDs[0]
}
sh "pytest test/device_firmware_update/test_dfu.py --readback_image test/device_firmware_update/test_output/readback_upgrade.bin --upgrade_image test/device_firmware_update/test_output/test_ffva_dfu_upgrade.bin"
}
}
}
}
}
stage('Checkout Amazon WWE') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
sh 'git clone [email protected]:xmos/amazon_wwe.git'
}
}
stage('Setup test vectors') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
sh "cp -r /projects_us/hydra_audio/xcore-voice_xvf3510_no_processing_xmos_test_suite_subset $PIPELINE_TEST_VECTORS"
sh "ls -la $PIPELINE_TEST_VECTORS"
sh "cp -r /projects_us/hydra_audio/xcore-voice_no_processing_ffd_test_suite $ASR_TEST_VECTORS"
sh "ls -la $ASR_TEST_VECTORS"
}
}
stage('Run FFVA Pipeline test') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
withTools(params.TOOLS_VERSION) {
withVenv {
script {
withXTAG(["$VRD_TEST_RIG_TARGET"]) { adapterIDs ->
sh "test/pipeline/check_pipeline.sh $BUILD_DIRNAME/test_pipeline_ffva_adec_altarch.xe $PIPELINE_TEST_VECTORS test/pipeline/ffva_quick.txt test/pipeline/ffva_test_output $WORKSPACE/amazon_wwe " + adapterIDs[0]
}
sh "pytest test/pipeline/test_pipeline.py --log test/pipeline/ffva_test_output/results.csv"
}
}
}
}
}
stage('Run FFD Pipeline test') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
withTools(params.TOOLS_VERSION) {
withVenv {
script {
withXTAG(["$VRD_TEST_RIG_TARGET"]) { adapterIDs ->
sh "test/pipeline/check_pipeline.sh $BUILD_DIRNAME/test_pipeline_ffd.xe $PIPELINE_TEST_VECTORS test/pipeline/ffd_quick.txt test/pipeline/ffd_test_output $WORKSPACE/amazon_wwe " + adapterIDs[0]
}
sh "pytest test/pipeline/test_pipeline.py --log test/pipeline/ffd_test_output/results.csv"
}
}
}
}
}
stage('Run ASR test') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
withTools(params.TOOLS_VERSION) {
withVenv {
script {
sh "docker pull ghcr.io/xmos/xcore_voice_tester:develop"
withXTAG(["$VRD_TEST_RIG_TARGET"]) { adapterIDs ->
sh "docker run --rm --privileged -v /dev/bus/usb:/dev/bus/usb -w /sln_voice -v $WORKSPACE:/sln_voice ghcr.io/xmos/xcore_voice_tester:develop bash -l test/device_firmware_update/check_dfu.sh $BUILD_DIRNAME/example_ffva_ua_adec_test.xe test/device_firmware_update/test_output " + adapterIDs[0]
sh "test/asr/check_asr.sh Sensory $ASR_TEST_VECTORS test/asr/ffd_quick.txt test/asr/sensory_output " + adapterIDs[0]
}
sh "pytest test/device_firmware_update/test_dfu.py --readback_image test/device_firmware_update/test_output/readback_upgrade.bin --upgrade_image test/device_firmware_update/test_output/example_ffva_ua_adec_test_upgrade.bin"
sh "pytest test/asr/test_asr.py --log test/asr/sensory_output/results.csv"
}
}
}
}
}
// TODO the commands and pipeline tests require the testing suite sample files
// stage('Run Commands test') {
// steps {
// withTools(params.TOOLS_VERSION) {
// withVenv {
// script {
// sh "test/commands/check_commands.sh $BUILD_DIRNAME/example_ffd_usb_audio_test.xe $BUILD_DIRNAME/samples test/commands/ffd.txt test/commands/test_output " + adapterIDs[0]
// sh "pytest test/commands/test_commands.py --log test/commands/test_output/results.csv"
// }
// }
// }
// }
// }
// TODO both pipeline tests require the amazon wakeword engine repo. They can maybe be combined into one test stage.
// stage('Run Pipeline FFD test') {
// steps {
// withTools(params.TOOLS_VERSION) {
// withVenv {
// script {
// sh "test/pipeline/check_pipeline.sh $BUILD_DIRNAME/example_ffd_usb_audio_test.xe <path-to-input-dir> <path-to-input-list> <path-to-output-dir> <path-to-amazon-wwe> " + adapterIDs[0]
// sh "pytest test/pipeline/test_pipeline.py --log test/pipeline/test_output/results.csv"
// }
// }
// }
// }
// }
// stage('Run Pipeline FFVA test') {
// steps {
// withTools(params.TOOLS_VERSION) {
// withVenv {
// script {
// sh "test/pipeline/check_pipeline.sh $BUILD_DIRNAME/example_ffva_ua_adec_test.xe <path-to-input-dir> <path-to-input-list> <path-to-output-dir> <path-to-amazon-wwe> " + adapterIDs[0]
// sh "pytest test/pipeline/test_pipeline.py --log test/pipeline/test_output/results.csv"
// }
// }
// }
// }
// }
}
post {
cleanup {
Expand Down
Loading

0 comments on commit fbc1e7e

Please sign in to comment.