-
Notifications
You must be signed in to change notification settings - Fork 1
Mlsw 10552 setup ci to build and test machine learning applications repo #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Mlsw 10552 setup ci to build and test machine learning applications repo #5
Conversation
There was a problem hiding this 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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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).
.github/workflows/CI.yml
Outdated
| @@ -0,0 +1,119 @@ | |||
| name: Ubuntu env | |||
| on: [push] | |||
There was a problem hiding this comment.
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:
| 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.
.github/workflows/CI.yml
Outdated
| 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 |
There was a problem hiding this comment.
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.
.github/workflows/CI.yml
Outdated
| contents: read | ||
|
|
||
| jobs: | ||
| prepare-sdk-and-tools: |
There was a problem hiding this comment.
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.
.github/workflows/CI.yml
Outdated
| - name: Upload prepared sources | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: gsdk-and-tools | ||
| path: | | ||
| src/ | ||
| tools/ | ||
| include-hidden-files: true |
There was a problem hiding this comment.
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.
.github/workflows/CI.yml
Outdated
| - name: Download prepared sources | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: gsdk-and-tools | ||
| path: . |
There was a problem hiding this comment.
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/
.github/workflows/CI.yml
Outdated
| run: | | ||
| set -e | ||
| slc configuration --sdk "${{ github.workspace }}/src/gsdk" | ||
| slc signature trust --sdk "${{ github.workspace }}/src/gsdk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove random spacing.
Co-authored-by: Raashid Ansari <raashid.ansari@silabs.com>
…ing and downloading sdk and tools separtely
…YAML upload indentation
…YAML upload indentation
…YAML upload indentation
There was a problem hiding this 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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| name: SDK | |
| name: sisdk-and-extensions |
| - name: Upload Tools | ||
| uses: actions/upload-artifact@v5 | ||
| with: | ||
| name: ARM_GNU-and-slc-toolchain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| name: ARM_GNU-and-slc-toolchain | |
| name: arm-gnu-toolchain-and-slc |
| - name: Download GSDK | ||
| uses: actions/download-artifact@v5 | ||
| with: | ||
| name: SDK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| name: SDK | |
| name: sisdk-and-extensions |
| name: ARM_GNU-and-slc-toolchain | ||
| path: . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| name: ARM_GNU-and-slc-toolchain | |
| path: . | |
| name: arm-gnu-toolchain-and-slc | |
| path: . |
| path: . | ||
| include-hidden-files: true | ||
|
|
||
| build-ml: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| build-ml: | |
| build: |
|
Also, please resolve the conflict that this file, people_flow_counter_mls90460.slcp |
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.
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:
Screenshots
Checklist