Skip to content

Conversation

@silabs-JeevanRH
Copy link
Contributor

@silabs-JeevanRH silabs-JeevanRH commented Oct 25, 2025

Description

This PR is to setup CI to build and test machine_learning_applications repo apps

Fixes # MLSW-10552

Type of change

Please select all the options that apply. Ideally only one should be selected.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

The goal of this task was to verify that all machine learning applications in the repository build successfully whenever any push is made. Since the CI pipeline was newly created, it was tested by pushing the updated workflow code to the repository, triggering the GitHub Actions job, and confirming that all matrix builds executed successfully end-to-end without errors, ensuring the pipeline correctly generates and compiles every ML application automatically.

Test Configuration:

  • Firmware version: N/A
  • Hardware: BRD2601B
  • Toolchain: ARM GNU GCC 12.2.rel1
  • SDKs: Simplicity sdk v2025.6.2, AI/ML extension v2.1.2

Screenshots

GITHUB_ACTION_RESULT

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Contributor

@silabs-raashid silabs-raashid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some work is needed on the CI job, please address those comments and we should be good to go. Marking this as "Request Changes" for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change the file name to lowercase ci.yml

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file name is still in uppercase (CI.yml). Please make it lowercase (ci.yml).

@@ -0,0 +1,119 @@
name: Ubuntu env
on: [push]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good until you're testing the pipeline. After which we should make the condition more stringent. My suggestion is to have the following:

Suggested change
on: [push]
on:
push:
branches:
- main
- feature/*
tags:
- v*
pull_request:
branches:
- main
- feature/*
workflow_dispatch:

This should nail down this workflow to run only when some pushes code to main or a feature/* branch. Also, this workflow will only run when a PR is created against main or a feature/* branch. Lastly, the workflow_dispatch will allow us to run this job on-demand from the UI.

Comment on lines 62 to 68
board: [brd2601b]
app:
- imu/ble_magic_wand/ble_magic_wand
- imu/imu_anomaly_detection/imu_anomaly_detection
- vision/people_flow_counter_mlx90640/people_flow_counter_mlx90640
- voice/sensory_wakeupword/app/sensory_wakeupword_series_1
- voice/sensory_wakeupword/app/sensory_wakeupword_series_2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution is a good first pass. However, we need to have a more robust solution later on. This implementation assumes that every app in the app array work on every board in the board array. However, this is certainly not going to be the case. I can see that templates.xml file has the "sensory_wakeupword" project that is only compatible with "brd4166a" and we completely missing that here.

My suggestion would be to extract the path to the .slcp files from the projectFilePaths key and the supported boards from the boardCompatibility key in the templates.xml file.

contents: read

jobs:
prepare-sdk-and-tools:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try splitting the checkout in to a separate job and tools download in another since they are not dependent on each other and can run in parallel in that case.

Comment on lines 47 to 54
- name: Upload prepared sources
uses: actions/upload-artifact@v5
with:
name: gsdk-and-tools
path: |
src/
tools/
include-hidden-files: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you split the checkout and tools download jobs, you can upload the artifacts separately. Just make sure to give them different names.

Comment on lines 71 to 75
- name: Download prepared sources
uses: actions/download-artifact@v4
with:
name: gsdk-and-tools
path: .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After splitting the jobs, you'll need to download them in two separate steps. For one download the path will be src/ and for the other it will be tools/

run: |
set -e
slc configuration --sdk "${{ github.workspace }}/src/gsdk"
slc signature trust --sdk "${{ github.workspace }}/src/gsdk"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove random spacing.

Copy link
Contributor

@silabs-raashid silabs-raashid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor changes needed again. But we're close to the finish line.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file name is still in uppercase (CI.yml). Please make it lowercase (ci.yml).

- name: Upload SDK
uses: actions/upload-artifact@v5
with:
name: SDK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: SDK
name: sisdk-and-extensions

- name: Upload Tools
uses: actions/upload-artifact@v5
with:
name: ARM_GNU-and-slc-toolchain
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: ARM_GNU-and-slc-toolchain
name: arm-gnu-toolchain-and-slc

- name: Download GSDK
uses: actions/download-artifact@v5
with:
name: SDK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: SDK
name: sisdk-and-extensions

Comment on lines +104 to +105
name: ARM_GNU-and-slc-toolchain
path: .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: ARM_GNU-and-slc-toolchain
path: .
name: arm-gnu-toolchain-and-slc
path: .

path: .
include-hidden-files: true

build-ml:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
build-ml:
build:

@silabs-raashid
Copy link
Contributor

Also, please resolve the conflict that this file, people_flow_counter_mls90460.slcp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants