From ee018edc2082513138660ce43da2ed5e7cedca5c Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Tue, 21 Oct 2025 12:26:04 +0530 Subject: [PATCH 001/101] Add CI workflow --- .github/workflows/CI.yml | 91 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/workflows/CI.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..36ea871 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,91 @@ +name: Create and publish machine_learning package +on: [push] + +permissions: + id-token: write + contents: read + +jobs: + checkout: + runs-on: silabs-internal + steps: + - name: Setup GitHub app token for SiliconLabsInternal + uses: actions/create-github-app-token@v2 + id: app-token + with: + app-id: ${{ vars.SILABS_SVC_DEVOPS_GITHUB_APP_ID }} + private-key: ${{ secrets.SILABS_SVC_DEVOPS_GITHUB_PRIVATE_KEY }} + owner: SiliconLabsInternal + repositories: | + machine_learning + cmake + tflite-micro + + - name: Checkout Repository + uses: actions/checkout@v5 + with: + submodules: recursive + token: ${{ steps.app-token.outputs.token }} + + - name: Upload repo as artifact + uses: actions/upload-artifact@v4 + with: + name: machine_learning-source-repo + path: . + include-hidden-files: true + + build: + needs: checkout + strategy: + matrix: + target: [cortex-m33, cortex-m4] + runs-on: silabs-internal + container: + image: artifactory-local.silabs.net/gsdk-docker-production/gsdk_nomad_containers/slt_build_env + options: --user root + env: + CONAN_HOME: ~/.silabs/slt/installs/conan + steps: + - name: Download source + uses: actions/download-artifact@v4 + with: + name: machine_learning-source-repo + path: . + + - name: Setup Conan and SLT + shell: bash + run: | + conan config install -t dir .github/conan-config + slt update --self + + - name: Install tools using SLT + shell: bash + run: | + slt install gcc-arm-none-eabi cmake ninja slc-cli -e conan + + - name: Setup tool paths + shell: bash + run: | + ARM_GCC_DIR="$(slt where gcc-arm-none-eabi)" + echo "ARM_GCC_DIR=$ARM_GCC_DIR" >> "$GITHUB_ENV" + echo "$(slt where ninja)" >> "$GITHUB_PATH" + echo "$(slt where cmake)/bin" >> "$GITHUB_PATH" + echo "$ARM_GCC_DIR/bin" >> "$GITHUB_PATH" + + - name: Install uv + uses: astral-sh/setup-uv@v7 + + - name: Setup Python virtual environment + shell: bash + run: uv venv + + - name: Install SLED + shell: bash + run: | + uv pip install \ + --no-cache \ + --allow-insecure-host artifactory.silabs.net \ + --index https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple \ + --no-python-downloads \ + --no-managed-python \ + silabs-sled From 45b6806c5e4bdbb798220ead3ead9f64d350c148 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Tue, 21 Oct 2025 14:13:38 +0530 Subject: [PATCH 002/101] update CI --- .github/workflows/CI.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 36ea871..64b8d88 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,6 +6,11 @@ permissions: contents: read jobs: + smoke: + runs-on: ubuntu-latest + steps: + - run: echo "Actions wiring is good βœ…" + checkout: runs-on: silabs-internal steps: From 5fdce29238ca25115679b4361c8897eed90a85a8 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 09:46:13 +0530 Subject: [PATCH 003/101] update CI OS --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 64b8d88..05f5c49 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,7 +12,7 @@ jobs: - run: echo "Actions wiring is good βœ…" checkout: - runs-on: silabs-internal + runs-on: ubuntu-latest steps: - name: Setup GitHub app token for SiliconLabsInternal uses: actions/create-github-app-token@v2 From 9b3db7ab7ac03c4353846ba818bb943b3c859b99 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:00:11 +0530 Subject: [PATCH 004/101] update CI new --- .github/workflows/CI.yml | 270 +++++++++++++++++++++++++++++---------- 1 file changed, 201 insertions(+), 69 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 05f5c49..abea4ab 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,96 +1,228 @@ -name: Create and publish machine_learning package -on: [push] +name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) + +on: + workflow_dispatch: + push: + branches: [ main ] permissions: - id-token: write contents: read +env: + # If not provided as a secret/variable, we’ll use this default URL + ARTIFACTORY_PYPI_URL: ${{ vars.ARTIFACTORY_PYPI_URL || 'https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple' }} + jobs: - smoke: + setup-to-slc: runs-on: ubuntu-latest - steps: - - run: echo "Actions wiring is good βœ…" - checkout: - runs-on: ubuntu-latest steps: - - name: Setup GitHub app token for SiliconLabsInternal - uses: actions/create-github-app-token@v2 - id: app-token - with: - app-id: ${{ vars.SILABS_SVC_DEVOPS_GITHUB_APP_ID }} - private-key: ${{ secrets.SILABS_SVC_DEVOPS_GITHUB_PRIVATE_KEY }} - owner: SiliconLabsInternal - repositories: | - machine_learning - cmake - tflite-micro - - - name: Checkout Repository + - name: 🧾 Start + shell: bash + run: | + echo "==> Workflow: Ubuntu env -> SLC setup (through step 16)" + echo "==> Repo: $GITHUB_REPOSITORY | Ref: $GITHUB_REF | SHA: $GITHUB_SHA" + + - name: πŸ“₯ Checkout (public) uses: actions/checkout@v5 with: submodules: recursive - token: ${{ steps.app-token.outputs.token }} - - name: Upload repo as artifact - uses: actions/upload-artifact@v4 - with: - name: machine_learning-source-repo - path: . - include-hidden-files: true - - build: - needs: checkout - strategy: - matrix: - target: [cortex-m33, cortex-m4] - runs-on: silabs-internal - container: - image: artifactory-local.silabs.net/gsdk-docker-production/gsdk_nomad_containers/slt_build_env - options: --user root - env: - CONAN_HOME: ~/.silabs/slt/installs/conan - steps: - - name: Download source - uses: actions/download-artifact@v4 - with: - name: machine_learning-source-repo - path: . + - name: πŸ”‘ SSH key setup (for internal git over SSH) + shell: bash + run: | + set -e + if [ -n "${{ secrets.SSH_PRIVATE_KEY }}" ]; then + echo "==> SSH key provided: configuring ~/.ssh" + mkdir -p ~/.ssh + printf '%s\n' "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + touch ~/.ssh/known_hosts + echo "==> Preloading known_hosts for stash-mirror.silabs.com & github.com" + ssh-keyscan -T 5 stash-mirror.silabs.com 2>/dev/null >> ~/.ssh/known_hosts || true + ssh-keyscan -T 5 github.com 2>/dev/null >> ~/.ssh/known_hosts || true + echo "==> SSH ready." + else + echo "!! No SSH_PRIVATE_KEY secret found. Internal SSH clones will be skipped." + fi + + - name: πŸ–₯️ System info + shell: bash + run: | + echo "==> uname -a"; uname -a + echo "==> /etc/os-release"; cat /etc/os-release + echo "==> whoami: $(whoami) | home: $HOME | workdir: $(pwd)" + echo "==> Disk usage:"; df -h . - - name: Setup Conan and SLT + - name: πŸ“‚ Create ~/src ~/venvs ~/tools shell: bash run: | - conan config install -t dir .github/conan-config - slt update --self + set -e + echo "==> Creating developer directories..." + mkdir -p "$HOME/src" "$HOME/venvs" "$HOME/tools" + ls -la "$HOME" | sed -n '1,120p' - - name: Install tools using SLT + - name: πŸ“¦ Apt update & essentials shell: bash run: | - slt install gcc-arm-none-eabi cmake ninja slc-cli -e conan + set -e + echo "==> apt update"; sudo apt update -y + echo "==> install essentials"; sudo apt install -y git curl wget unzip build-essential cmake make python3 python3-pip python3-venv telnet netcat-openbsd pkg-config libssl-dev libffi-dev python3-dev ninja-build - - name: Setup tool paths + - name: β˜• Install OpenJDK 17 + set JAVA_HOME shell: bash run: | - ARM_GCC_DIR="$(slt where gcc-arm-none-eabi)" - echo "ARM_GCC_DIR=$ARM_GCC_DIR" >> "$GITHUB_ENV" - echo "$(slt where ninja)" >> "$GITHUB_PATH" - echo "$(slt where cmake)/bin" >> "$GITHUB_PATH" - echo "$ARM_GCC_DIR/bin" >> "$GITHUB_PATH" + set -e + echo "==> Installing OpenJDK 17"; sudo apt install -y openjdk-17-jdk + echo "==> java -version"; java -version + echo "==> Setting JAVA_HOME" + echo 'export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64' >> "$HOME/.bashrc" + source "$HOME/.bashrc" || true + echo "JAVA_HOME=$JAVA_HOME" - - name: Install uv - uses: astral-sh/setup-uv@v7 + - name: πŸ› οΈ ARM GCC toolchain (12.2.rel1) + shell: bash + run: | + set -e + cd "$HOME/tools" + echo "==> Download ARM toolchain 12.2.rel1" + wget -q https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz + echo "==> Extract" + tar xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz + rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz + echo "==> GCC version" + "$HOME/tools/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc" --version | head -n 1 + + - name: 🧱 CMake & πŸͺ„ Ninja versions + shell: bash + run: | + echo "==> CMake version"; cmake --version || true + echo "==> Ninja version"; ninja --version || true - - name: Setup Python virtual environment + - name: πŸ“¦ Git LFS install & init shell: bash - run: uv venv + run: | + set -e + echo "==> Install Git LFS" + curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash + sudo apt install -y git-lfs + echo "==> git lfs install" + git lfs install + + - name: πŸ“š Clone GSDK (public) + shell: bash + run: | + set -e + cd "$HOME/src" + echo "==> Cloning public GSDK" + git clone https://github.com/SiliconLabs/simplicity_sdk.git gsdk + cd "$HOME/src/gsdk" + echo "==> Init core submodules" + git submodule update --init --recursive util/third_party/cmsis + git submodule update --init --recursive util/third_party/unity + git submodule update --init --recursive util/third_party/printf + echo "==> LFS pull (best effort)" + git lfs pull || true + + - name: 🌱 Create Python venv (sisdk) + shell: bash + run: | + set -e + python3 -m venv "$HOME/venvs/sisdk" + source "$HOME/venvs/sisdk/bin/activate" + python -V; pip -V + echo "==> Upgrading pip" + pip install --upgrade pip + + # ---------- SLC (Step 16) ---------- + - name: 🧩 Clone SLC CLI over SSH (internal) + shell: bash + run: | + set -e + if [ -n "${{ secrets.SSH_PRIVATE_KEY }}" ]; then + echo "==> Attempting SSH clone of slc_cli from stash-mirror.silabs.com" + cd "$HOME/tools" + # If the project path differs, adjust below: + git clone ssh://git@stash-mirror.silabs.com/simplicity_studio/slc_cli.git + echo "==> slc_cli cloned." + else + echo "!! SSH key not provided; cannot clone slc_cli over SSH. Failing here would block progress, so we stop SLC clone and continue." + exit 0 + fi + + - name: πŸ“œ Install SLC CLI Python deps (via Artifactory creds if provided) + shell: bash + run: | + set -e + if [ ! -d "$HOME/tools/slc_cli" ]; then + echo "!! slc_cli directory not found (clone likely skipped). Skipping deps install." + exit 0 + fi + + source "$HOME/venvs/sisdk/bin/activate" + echo "==> Using Artifactory URL: $ARTIFACTORY_PYPI_URL" + if [ -n "${{ secrets.ARTIFACTORY_USERNAME }}" ] && [ -n "${{ secrets.ARTIFACTORY_API_KEY }}" ]; then + echo "==> Artifactory creds present; installing via authenticated index (credentials are masked)" + PIP_INDEX_URL="https://${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_API_KEY }}@${{ env.ARTIFACTORY_PYPI_URL#https:// }}" + python -m pip install --upgrade setuptools + if [ -f "$HOME/tools/slc_cli/requirements.txt" ]; then + PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" -r "$HOME/tools/slc_cli/requirements.txt" + else + echo "requirements.txt not found; attempting bare install (may be no-op)" + fi + else + echo "!! No Artifactory creds provided. Trying public/pip default (may fail if deps are internal)" + python -m pip install --upgrade setuptools || true + if [ -f "$HOME/tools/slc_cli/requirements.txt" ]; then + pip install -r "$HOME/tools/slc_cli/requirements.txt" || true + fi + fi + echo "==> SLC deps install step complete." + + - name: πŸ”§ Export SLC env & PATH + shell: bash + run: | + set -e + if [ -d "$HOME/tools/slc_cli" ]; then + echo "==> Exporting env vars for SLC" + { + echo 'export UC_CLI_DIR="$HOME/tools/slc_cli"' + echo 'export SLC_JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"' + echo 'export PATH="$PATH:$UC_CLI_DIR"' + } >> "$HOME/.bashrc" + source "$HOME/.bashrc" || true + echo "UC_CLI_DIR=$UC_CLI_DIR" + echo "SLC_JAVA_HOME=$SLC_JAVA_HOME" + which slc || true + else + echo "!! slc_cli not present; skipping env PATH export." + fi + + - name: πŸš€ Initialize SLC & configure SDK + shell: bash + run: | + set -e + if [ -d "$HOME/tools/slc_cli" ]; then + source "$HOME/venvs/sisdk/bin/activate" + echo "==> slc -h" + slc -h || true + echo "==> slc configuration --sdk" + slc configuration --sdk "$HOME/src/gsdk" || true + echo "==> slc signature trust --sdk" + slc signature trust --sdk "$HOME/src/gsdk" || true + if [ -d "$HOME/src/gsdk/extension/aiml-extension" ]; then + echo "==> slc signature trust --extension-path (aiml-extension)" + slc signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" || true + else + echo "==> aiml-extension not present; skipping extension trust." + fi + else + echo "!! slc_cli not present; skipping SLC init/config." + fi - - name: Install SLED + - name: 🏁 Done (stop after SLC setup) shell: bash run: | - uv pip install \ - --no-cache \ - --allow-insecure-host artifactory.silabs.net \ - --index https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple \ - --no-python-downloads \ - --no-managed-python \ - silabs-sled + echo "==> Finished through step 16 (SLC setup)." + echo "==> If SLC clone failed, confirm SSH_PRIVATE_KEY is added as a secret." + echo "==> If deps failed, confirm ARTIFACTORY_USERNAME/API_KEY and (optionally) ARTIFACTORY_PYPI_URL." From 4f6f715a3eda07584e64ee089f249fcf7017d28b Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:09:47 +0530 Subject: [PATCH 005/101] update CI OSs --- .github/workflows/CI.yml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index abea4ab..7060fa1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,11 +1,9 @@ name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) -on: - workflow_dispatch: - push: - branches: [ main ] +on: [push] permissions: + id-token: write contents: read env: @@ -160,23 +158,28 @@ jobs: fi source "$HOME/venvs/sisdk/bin/activate" - echo "==> Using Artifactory URL: $ARTIFACTORY_PYPI_URL" - if [ -n "${{ secrets.ARTIFACTORY_USERNAME }}" ] && [ -n "${{ secrets.ARTIFACTORY_API_KEY }}" ]; then - echo "==> Artifactory creds present; installing via authenticated index (credentials are masked)" - PIP_INDEX_URL="https://${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_API_KEY }}@${{ env.ARTIFACTORY_PYPI_URL#https:// }}" - python -m pip install --upgrade setuptools - if [ -f "$HOME/tools/slc_cli/requirements.txt" ]; then + + # Fallback the URL in bash (NOT in ${{ }}) + ARTI_URL="${ARTIFACTORY_PYPI_URL:-https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple}" + echo "==> Using Artifactory URL: $ARTI_URL" + + python -m pip install --upgrade setuptools + + if [ -f "$HOME/tools/slc_cli/requirements.txt" ]; then + if [ -n "${{ secrets.ARTIFACTORY_USERNAME }}" ] && [ -n "${{ secrets.ARTIFACTORY_API_KEY }}" ]; then + echo "==> Artifactory creds present; using authenticated index (credentials masked)" + # Build https://user:pass@host/path by stripping scheme in BASH, not in ${{ }} + hostpath="${ARTI_URL#https://}" + PIP_INDEX_URL="https://${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_API_KEY }}@${hostpath}" PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" -r "$HOME/tools/slc_cli/requirements.txt" else - echo "requirements.txt not found; attempting bare install (may be no-op)" - fi - else - echo "!! No Artifactory creds provided. Trying public/pip default (may fail if deps are internal)" - python -m pip install --upgrade setuptools || true - if [ -f "$HOME/tools/slc_cli/requirements.txt" ]; then + echo "!! No Artifactory creds provided; trying default pip index (may fail if deps are internal)" pip install -r "$HOME/tools/slc_cli/requirements.txt" || true fi + else + echo "requirements.txt not found; skipping SLC deps install." fi + echo "==> SLC deps install step complete." - name: πŸ”§ Export SLC env & PATH From 3677655df51e4632ba2594e53c9f35bee4528ffb Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:16:23 +0530 Subject: [PATCH 006/101] update CI newm --- .github/workflows/CI.yml | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7060fa1..ea4e560 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,19 +1,20 @@ name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) -on: [push] +on: + push: + branches: [ main ] + workflow_dispatch: permissions: - id-token: write contents: read env: - # If not provided as a secret/variable, we’ll use this default URL - ARTIFACTORY_PYPI_URL: ${{ vars.ARTIFACTORY_PYPI_URL || 'https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple' }} + # May be empty; we’ll fall back in bash if not set + ARTIFACTORY_PYPI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} jobs: setup-to-slc: runs-on: ubuntu-latest - steps: - name: 🧾 Start shell: bash @@ -65,7 +66,16 @@ jobs: run: | set -e echo "==> apt update"; sudo apt update -y - echo "==> install essentials"; sudo apt install -y git curl wget unzip build-essential cmake make python3 python3-pip python3-venv telnet netcat-openbsd pkg-config libssl-dev libffi-dev python3-dev ninja-build + echo "==> install essentials" + sudo apt install -y git curl wget unzip build-essential cmake make \ + python3 python3-pip python3-venv pkg-config \ + libssl-dev libffi-dev python3-dev ninja-build \ + telnet netcat-openbsd + echo "==> Versions:" + python3 --version || true + pip3 --version || true + cmake --version || true + ninja --version || true - name: β˜• Install OpenJDK 17 + set JAVA_HOME shell: bash @@ -140,11 +150,10 @@ jobs: if [ -n "${{ secrets.SSH_PRIVATE_KEY }}" ]; then echo "==> Attempting SSH clone of slc_cli from stash-mirror.silabs.com" cd "$HOME/tools" - # If the project path differs, adjust below: - git clone ssh://git@stash-mirror.silabs.com/simplicity_studio/slc_cli.git + git clone ssh://git@stash-mirror.silabs.com/simplicity_studio/slc_cli.git || { echo "!! slc_cli clone failed"; exit 1; } echo "==> slc_cli cloned." else - echo "!! SSH key not provided; cannot clone slc_cli over SSH. Failing here would block progress, so we stop SLC clone and continue." + echo "!! SSH key not provided; cannot clone slc_cli over SSH. Skipping SLC clone." exit 0 fi @@ -168,7 +177,7 @@ jobs: if [ -f "$HOME/tools/slc_cli/requirements.txt" ]; then if [ -n "${{ secrets.ARTIFACTORY_USERNAME }}" ] && [ -n "${{ secrets.ARTIFACTORY_API_KEY }}" ]; then echo "==> Artifactory creds present; using authenticated index (credentials masked)" - # Build https://user:pass@host/path by stripping scheme in BASH, not in ${{ }} + # Build https://user:pass@host/path using bash (no ${{ ... }} tricks) hostpath="${ARTI_URL#https://}" PIP_INDEX_URL="https://${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_API_KEY }}@${hostpath}" PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" -r "$HOME/tools/slc_cli/requirements.txt" @@ -207,12 +216,9 @@ jobs: set -e if [ -d "$HOME/tools/slc_cli" ]; then source "$HOME/venvs/sisdk/bin/activate" - echo "==> slc -h" - slc -h || true - echo "==> slc configuration --sdk" - slc configuration --sdk "$HOME/src/gsdk" || true - echo "==> slc signature trust --sdk" - slc signature trust --sdk "$HOME/src/gsdk" || true + echo "==> slc -h"; slc -h || true + echo "==> slc configuration --sdk"; slc configuration --sdk "$HOME/src/gsdk" || true + echo "==> slc signature trust --sdk"; slc signature trust --sdk "$HOME/src/gsdk" || true if [ -d "$HOME/src/gsdk/extension/aiml-extension" ]; then echo "==> slc signature trust --extension-path (aiml-extension)" slc signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" || true From 78ba1c8191d8d552a02ceeaa2941ae3be64f8196 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:19:05 +0530 Subject: [PATCH 007/101] update CI neww --- .github/workflows/CI.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ea4e560..0b47dfe 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -8,10 +8,6 @@ on: permissions: contents: read -env: - # May be empty; we’ll fall back in bash if not set - ARTIFACTORY_PYPI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} - jobs: setup-to-slc: runs-on: ubuntu-latest @@ -27,14 +23,17 @@ jobs: with: submodules: recursive + # ------- SSH KEY SETUP (no expressions inside the script) ------- - name: πŸ”‘ SSH key setup (for internal git over SSH) shell: bash + env: + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} # may be empty run: | set -e - if [ -n "${{ secrets.SSH_PRIVATE_KEY }}" ]; then + if [ -n "$SSH_PRIVATE_KEY" ]; then echo "==> SSH key provided: configuring ~/.ssh" mkdir -p ~/.ssh - printf '%s\n' "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + printf '%s\n' "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa touch ~/.ssh/known_hosts echo "==> Preloading known_hosts for stash-mirror.silabs.com & github.com" @@ -145,9 +144,11 @@ jobs: # ---------- SLC (Step 16) ---------- - name: 🧩 Clone SLC CLI over SSH (internal) shell: bash + env: + HAVE_SSH: ${{ secrets.SSH_PRIVATE_KEY }} run: | set -e - if [ -n "${{ secrets.SSH_PRIVATE_KEY }}" ]; then + if [ -n "$HAVE_SSH" ]; then echo "==> Attempting SSH clone of slc_cli from stash-mirror.silabs.com" cd "$HOME/tools" git clone ssh://git@stash-mirror.silabs.com/simplicity_studio/slc_cli.git || { echo "!! slc_cli clone failed"; exit 1; } @@ -159,6 +160,10 @@ jobs: - name: πŸ“œ Install SLC CLI Python deps (via Artifactory creds if provided) shell: bash + env: + ARTI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} # may be empty + ARTI_USER: ${{ secrets.ARTIFACTORY_USERNAME }} # may be empty + ARTI_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} # may be empty run: | set -e if [ ! -d "$HOME/tools/slc_cli" ]; then @@ -168,18 +173,19 @@ jobs: source "$HOME/venvs/sisdk/bin/activate" - # Fallback the URL in bash (NOT in ${{ }}) - ARTI_URL="${ARTIFACTORY_PYPI_URL:-https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple}" + # bash-side fallback for URL (no expressions) + if [ -z "$ARTI_URL" ]; then + ARTI_URL="https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple" + fi echo "==> Using Artifactory URL: $ARTI_URL" python -m pip install --upgrade setuptools if [ -f "$HOME/tools/slc_cli/requirements.txt" ]; then - if [ -n "${{ secrets.ARTIFACTORY_USERNAME }}" ] && [ -n "${{ secrets.ARTIFACTORY_API_KEY }}" ]; then + if [ -n "$ARTI_USER" ] && [ -n "$ARTI_KEY" ]; then echo "==> Artifactory creds present; using authenticated index (credentials masked)" - # Build https://user:pass@host/path using bash (no ${{ ... }} tricks) hostpath="${ARTI_URL#https://}" - PIP_INDEX_URL="https://${{ secrets.ARTIFACTORY_USERNAME }}:${{ secrets.ARTIFACTORY_API_KEY }}@${hostpath}" + PIP_INDEX_URL="https://${ARTI_USER}:${ARTI_KEY}@${hostpath}" PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" -r "$HOME/tools/slc_cli/requirements.txt" else echo "!! No Artifactory creds provided; trying default pip index (may fail if deps are internal)" From c69ae0aa16fd661c7d6981e0e4945bbeef578c87 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:21:04 +0530 Subject: [PATCH 008/101] update CI neww --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0b47dfe..286be8f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) +name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) latest on: push: From 8d76039a3b6c99d101c8ad947fb5afa62afbec11 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:21:42 +0530 Subject: [PATCH 009/101] update CI newupadtes --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 286be8f..5419827 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) latest +name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) latestrere on: push: From 44fbc1c25a525ac8b69c5f21d3f0bf54251adbea Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:23:06 +0530 Subject: [PATCH 010/101] update CI newwww --- .github/workflows/CI.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5419827..e476571 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,11 +1,8 @@ name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) latestrere - -on: - push: - branches: [ main ] - workflow_dispatch: +on: [push] permissions: + id-token: write contents: read jobs: From 3e2b7761d84a8f9b7afb7aa30a719c671b6acecd Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:23:59 +0530 Subject: [PATCH 011/101] update CI newweded --- .github/workflows/CI.yml | 108 +++++---------------------------------- 1 file changed, 13 insertions(+), 95 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e476571..d0abba6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,10 +1,17 @@ -name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) latestrere -on: [push] +name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) + +on: + push: + branches: [ main ] + workflow_dispatch: permissions: - id-token: write contents: read +env: + # May be empty; we’ll fall back in bash if not set + ARTIFACTORY_PYPI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} + jobs: setup-to-slc: runs-on: ubuntu-latest @@ -20,17 +27,14 @@ jobs: with: submodules: recursive - # ------- SSH KEY SETUP (no expressions inside the script) ------- - name: πŸ”‘ SSH key setup (for internal git over SSH) shell: bash - env: - SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} # may be empty run: | set -e - if [ -n "$SSH_PRIVATE_KEY" ]; then + if [ -n "${{ secrets.SSH_PRIVATE_KEY }}" ]; then echo "==> SSH key provided: configuring ~/.ssh" mkdir -p ~/.ssh - printf '%s\n' "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa + printf '%s\n' "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa touch ~/.ssh/known_hosts echo "==> Preloading known_hosts for stash-mirror.silabs.com & github.com" @@ -141,11 +145,9 @@ jobs: # ---------- SLC (Step 16) ---------- - name: 🧩 Clone SLC CLI over SSH (internal) shell: bash - env: - HAVE_SSH: ${{ secrets.SSH_PRIVATE_KEY }} run: | set -e - if [ -n "$HAVE_SSH" ]; then + if [ -n "${{ secrets.SSH_PRIVATE_KEY }}" ]; then echo "==> Attempting SSH clone of slc_cli from stash-mirror.silabs.com" cd "$HOME/tools" git clone ssh://git@stash-mirror.silabs.com/simplicity_studio/slc_cli.git || { echo "!! slc_cli clone failed"; exit 1; } @@ -154,87 +156,3 @@ jobs: echo "!! SSH key not provided; cannot clone slc_cli over SSH. Skipping SLC clone." exit 0 fi - - - name: πŸ“œ Install SLC CLI Python deps (via Artifactory creds if provided) - shell: bash - env: - ARTI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} # may be empty - ARTI_USER: ${{ secrets.ARTIFACTORY_USERNAME }} # may be empty - ARTI_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} # may be empty - run: | - set -e - if [ ! -d "$HOME/tools/slc_cli" ]; then - echo "!! slc_cli directory not found (clone likely skipped). Skipping deps install." - exit 0 - fi - - source "$HOME/venvs/sisdk/bin/activate" - - # bash-side fallback for URL (no expressions) - if [ -z "$ARTI_URL" ]; then - ARTI_URL="https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple" - fi - echo "==> Using Artifactory URL: $ARTI_URL" - - python -m pip install --upgrade setuptools - - if [ -f "$HOME/tools/slc_cli/requirements.txt" ]; then - if [ -n "$ARTI_USER" ] && [ -n "$ARTI_KEY" ]; then - echo "==> Artifactory creds present; using authenticated index (credentials masked)" - hostpath="${ARTI_URL#https://}" - PIP_INDEX_URL="https://${ARTI_USER}:${ARTI_KEY}@${hostpath}" - PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" -r "$HOME/tools/slc_cli/requirements.txt" - else - echo "!! No Artifactory creds provided; trying default pip index (may fail if deps are internal)" - pip install -r "$HOME/tools/slc_cli/requirements.txt" || true - fi - else - echo "requirements.txt not found; skipping SLC deps install." - fi - - echo "==> SLC deps install step complete." - - - name: πŸ”§ Export SLC env & PATH - shell: bash - run: | - set -e - if [ -d "$HOME/tools/slc_cli" ]; then - echo "==> Exporting env vars for SLC" - { - echo 'export UC_CLI_DIR="$HOME/tools/slc_cli"' - echo 'export SLC_JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"' - echo 'export PATH="$PATH:$UC_CLI_DIR"' - } >> "$HOME/.bashrc" - source "$HOME/.bashrc" || true - echo "UC_CLI_DIR=$UC_CLI_DIR" - echo "SLC_JAVA_HOME=$SLC_JAVA_HOME" - which slc || true - else - echo "!! slc_cli not present; skipping env PATH export." - fi - - - name: πŸš€ Initialize SLC & configure SDK - shell: bash - run: | - set -e - if [ -d "$HOME/tools/slc_cli" ]; then - source "$HOME/venvs/sisdk/bin/activate" - echo "==> slc -h"; slc -h || true - echo "==> slc configuration --sdk"; slc configuration --sdk "$HOME/src/gsdk" || true - echo "==> slc signature trust --sdk"; slc signature trust --sdk "$HOME/src/gsdk" || true - if [ -d "$HOME/src/gsdk/extension/aiml-extension" ]; then - echo "==> slc signature trust --extension-path (aiml-extension)" - slc signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" || true - else - echo "==> aiml-extension not present; skipping extension trust." - fi - else - echo "!! slc_cli not present; skipping SLC init/config." - fi - - - name: 🏁 Done (stop after SLC setup) - shell: bash - run: | - echo "==> Finished through step 16 (SLC setup)." - echo "==> If SLC clone failed, confirm SSH_PRIVATE_KEY is added as a secret." - echo "==> If deps failed, confirm ARTIFACTORY_USERNAME/API_KEY and (optionally) ARTIFACTORY_PYPI_URL." From 352b5395dee16a958d57a4f6dfc66b5930036c93 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:37:21 +0530 Subject: [PATCH 012/101] update CI latest1137 --- .github/workflows/CI.yml | 112 +++++++++++++++++++++++++++++++++------ 1 file changed, 96 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d0abba6..97aa0f8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,17 +1,10 @@ -name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) - -on: - push: - branches: [ main ] - workflow_dispatch: +name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) latestrere +on: [push] permissions: + id-token: write contents: read -env: - # May be empty; we’ll fall back in bash if not set - ARTIFACTORY_PYPI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} - jobs: setup-to-slc: runs-on: ubuntu-latest @@ -27,14 +20,17 @@ jobs: with: submodules: recursive + # ------- SSH KEY SETUP (no expressions inside the script) ------- - name: πŸ”‘ SSH key setup (for internal git over SSH) shell: bash + env: + SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} # may be empty run: | set -e - if [ -n "${{ secrets.SSH_PRIVATE_KEY }}" ]; then + if [ -n "$SSH_PRIVATE_KEY" ]; then echo "==> SSH key provided: configuring ~/.ssh" mkdir -p ~/.ssh - printf '%s\n' "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa + printf '%s\n' "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa touch ~/.ssh/known_hosts echo "==> Preloading known_hosts for stash-mirror.silabs.com & github.com" @@ -126,9 +122,7 @@ jobs: git clone https://github.com/SiliconLabs/simplicity_sdk.git gsdk cd "$HOME/src/gsdk" echo "==> Init core submodules" - git submodule update --init --recursive util/third_party/cmsis - git submodule update --init --recursive util/third_party/unity - git submodule update --init --recursive util/third_party/printf + git checkout v2025.6.2 echo "==> LFS pull (best effort)" git lfs pull || true @@ -145,9 +139,11 @@ jobs: # ---------- SLC (Step 16) ---------- - name: 🧩 Clone SLC CLI over SSH (internal) shell: bash + env: + HAVE_SSH: ${{ secrets.SSH_PRIVATE_KEY }} run: | set -e - if [ -n "${{ secrets.SSH_PRIVATE_KEY }}" ]; then + if [ -n "$HAVE_SSH" ]; then echo "==> Attempting SSH clone of slc_cli from stash-mirror.silabs.com" cd "$HOME/tools" git clone ssh://git@stash-mirror.silabs.com/simplicity_studio/slc_cli.git || { echo "!! slc_cli clone failed"; exit 1; } @@ -156,3 +152,87 @@ jobs: echo "!! SSH key not provided; cannot clone slc_cli over SSH. Skipping SLC clone." exit 0 fi + + - name: πŸ“œ Install SLC CLI Python deps (via Artifactory creds if provided) + shell: bash + env: + ARTI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} # may be empty + ARTI_USER: ${{ secrets.ARTIFACTORY_USERNAME }} # may be empty + ARTI_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} # may be empty + run: | + set -e + if [ ! -d "$HOME/tools/slc_cli" ]; then + echo "!! slc_cli directory not found (clone likely skipped). Skipping deps install." + exit 0 + fi + + source "$HOME/venvs/sisdk/bin/activate" + + # bash-side fallback for URL (no expressions) + if [ -z "$ARTI_URL" ]; then + ARTI_URL="https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple" + fi + echo "==> Using Artifactory URL: $ARTI_URL" + + python -m pip install --upgrade setuptools + + if [ -f "$HOME/tools/slc_cli/requirements.txt" ]; then + if [ -n "$ARTI_USER" ] && [ -n "$ARTI_KEY" ]; then + echo "==> Artifactory creds present; using authenticated index (credentials masked)" + hostpath="${ARTI_URL#https://}" + PIP_INDEX_URL="https://${ARTI_USER}:${ARTI_KEY}@${hostpath}" + PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" -r "$HOME/tools/slc_cli/requirements.txt" + else + echo "!! No Artifactory creds provided; trying default pip index (may fail if deps are internal)" + pip install -r "$HOME/tools/slc_cli/requirements.txt" || true + fi + else + echo "requirements.txt not found; skipping SLC deps install." + fi + + echo "==> SLC deps install step complete." + + - name: πŸ”§ Export SLC env & PATH + shell: bash + run: | + set -e + if [ -d "$HOME/tools/slc_cli" ]; then + echo "==> Exporting env vars for SLC" + { + echo 'export UC_CLI_DIR="$HOME/tools/slc_cli"' + echo 'export SLC_JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"' + echo 'export PATH="$PATH:$UC_CLI_DIR"' + } >> "$HOME/.bashrc" + source "$HOME/.bashrc" || true + echo "UC_CLI_DIR=$UC_CLI_DIR" + echo "SLC_JAVA_HOME=$SLC_JAVA_HOME" + which slc || true + else + echo "!! slc_cli not present; skipping env PATH export." + fi + + - name: πŸš€ Initialize SLC & configure SDK + shell: bash + run: | + set -e + if [ -d "$HOME/tools/slc_cli" ]; then + source "$HOME/venvs/sisdk/bin/activate" + echo "==> slc -h"; slc -h || true + echo "==> slc configuration --sdk"; slc configuration --sdk "$HOME/src/gsdk" || true + echo "==> slc signature trust --sdk"; slc signature trust --sdk "$HOME/src/gsdk" || true + if [ -d "$HOME/src/gsdk/extension/aiml-extension" ]; then + echo "==> slc signature trust --extension-path (aiml-extension)" + slc signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" || true + else + echo "==> aiml-extension not present; skipping extension trust." + fi + else + echo "!! slc_cli not present; skipping SLC init/config." + fi + + - name: 🏁 Done (stop after SLC setup) + shell: bash + run: | + echo "==> Finished through step 16 (SLC setup)." + echo "==> If SLC clone failed, confirm SSH_PRIVATE_KEY is added as a secret." + echo "==> If deps failed, confirm ARTIFACTORY_USERNAME/API_KEY and (optionally) ARTIFACTORY_PYPI_URL." \ No newline at end of file From 67b432d2bfa304121b39dae7097d5a050a69c849 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 12:03:16 +0530 Subject: [PATCH 013/101] update CI latest1205 --- .github/workflows/CI.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 97aa0f8..f73aa6a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -137,21 +137,19 @@ jobs: pip install --upgrade pip # ---------- SLC (Step 16) ---------- - - name: 🧩 Clone SLC CLI over SSH (internal) + - name: 🧩 Download and extract SLC CLI (public zip) shell: bash - env: - HAVE_SSH: ${{ secrets.SSH_PRIVATE_KEY }} run: | set -e - if [ -n "$HAVE_SSH" ]; then - echo "==> Attempting SSH clone of slc_cli from stash-mirror.silabs.com" - cd "$HOME/tools" - git clone ssh://git@stash-mirror.silabs.com/simplicity_studio/slc_cli.git || { echo "!! slc_cli clone failed"; exit 1; } - echo "==> slc_cli cloned." - else - echo "!! SSH key not provided; cannot clone slc_cli over SSH. Skipping SLC clone." - exit 0 - fi + cd "$HOME/tools" + echo "==> Downloading SLC CLI public release zip" + wget -q https://www.silabs.com/documents/public/software/slc_cli_linux.zip -O slc_cli_linux.zip + echo "==> Extracting slc_cli" + unzip -q slc_cli_linux.zip -d slc_cli + rm slc_cli_linux.zip + echo "==> Listing contents" + ls -la slc_cli + echo "==> SLC CLI downloaded & extracted successfully." - name: πŸ“œ Install SLC CLI Python deps (via Artifactory creds if provided) shell: bash From 1d78b651c0d6c539d1d3e0513cdb3e31d85e6300 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 12:26:48 +0530 Subject: [PATCH 014/101] update CI latest1226 --- .github/workflows/CI.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f73aa6a..7a45b57 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -151,6 +151,18 @@ jobs: ls -la slc_cli echo "==> SLC CLI downloaded & extracted successfully." + - name: 🧩 Make SLC CLI executable and update PATH + shell: bash + run: | + set -e + echo "==> Making SLC CLI executable and adding to PATH" + chmod +x "$HOME/tools/slc_cli/slc" || true + echo 'export UC_CLI_DIR="$HOME/tools/slc_cli"' >> "$HOME/.bashrc" + echo 'export PATH="$PATH:$UC_CLI_DIR"' >> "$HOME/.bashrc" + source "$HOME/.bashrc" || true + echo "UC_CLI_DIR=$UC_CLI_DIR" + which slc || echo "!! slc not yet in PATH; will retry at env export step" + - name: πŸ“œ Install SLC CLI Python deps (via Artifactory creds if provided) shell: bash env: From cd3033e978d290477e7543a064968eae21205727 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 12:43:04 +0530 Subject: [PATCH 015/101] update CI latest1243 --- .github/workflows/CI.yml | 81 ++++++++++++++++++++++++++++++++-------- 1 file changed, 65 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7a45b57..483996d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -123,6 +123,10 @@ jobs: cd "$HOME/src/gsdk" echo "==> Init core submodules" git checkout v2025.6.2 + cd "$HOME/src/gsdk" + mkdir extension + cd "$HOME/src/gsdk/extension" + git clone https://github.com/SiliconLabsSoftware/aiml-extension.git aiml-extension echo "==> LFS pull (best effort)" git lfs pull || true @@ -155,13 +159,38 @@ jobs: shell: bash run: | set -e - echo "==> Making SLC CLI executable and adding to PATH" - chmod +x "$HOME/tools/slc_cli/slc" || true - echo 'export UC_CLI_DIR="$HOME/tools/slc_cli"' >> "$HOME/.bashrc" - echo 'export PATH="$PATH:$UC_CLI_DIR"' >> "$HOME/.bashrc" + echo "==> Searching for SLC executable..." + SLC_BIN=$(find "$HOME/tools/slc_cli" -type f \( -name slc -o -name slc-cli \) -print -quit || true) + + if [ -z "$SLC_BIN" ]; then + echo "!! Could not find 'slc' or 'slc-cli' under $HOME/tools/slc_cli" + echo "Directory tree for debugging:" + ls -R "$HOME/tools/slc_cli" || true + exit 1 + fi + + echo "==> Found SLC binary at: $SLC_BIN" + chmod +x "$SLC_BIN" + + # dir that contains the executable + SLC_DIR="$(dirname "$SLC_BIN")" + echo "==> SLC_DIR: $SLC_DIR" + + # If binary is 'slc-cli', create a convenience alias named 'slc' + if [ "$(basename "$SLC_BIN")" = "slc-cli" ]; then + echo "==> Creating 'slc' shim pointing to slc-cli" + ln -sf "$SLC_BIN" "$SLC_DIR/slc" + fi + + # Persist env and PATH + echo "export UC_CLI_DIR=\"$SLC_DIR\"" >> "$HOME/.bashrc" + echo "export PATH=\"\$PATH:\$UC_CLI_DIR\"" >> "$HOME/.bashrc" + # Load it for this job step and print source "$HOME/.bashrc" || true echo "UC_CLI_DIR=$UC_CLI_DIR" - which slc || echo "!! slc not yet in PATH; will retry at env export step" + echo "==> which slc"; which slc || true + echo "==> Test: slc -h (non-fatal)" + slc -h || true - name: πŸ“œ Install SLC CLI Python deps (via Artifactory creds if provided) shell: bash @@ -225,19 +254,39 @@ jobs: shell: bash run: | set -e - if [ -d "$HOME/tools/slc_cli" ]; then + source "$HOME/.bashrc" || true + + if [ -z "$UC_CLI_DIR" ]; then + echo "!! UC_CLI_DIR not set; cannot run SLC." + exit 1 + fi + + SLC_BIN="$UC_CLI_DIR/slc" + if [ ! -x "$SLC_BIN" ]; then + echo "!! $SLC_BIN not found or not executable." + ls -la "$UC_CLI_DIR" || true + exit 1 + fi + + # venv is optional for running slc; activate if you’re using Python deps elsewhere + if [ -d "$HOME/venvs/sisdk" ]; then source "$HOME/venvs/sisdk/bin/activate" - echo "==> slc -h"; slc -h || true - echo "==> slc configuration --sdk"; slc configuration --sdk "$HOME/src/gsdk" || true - echo "==> slc signature trust --sdk"; slc signature trust --sdk "$HOME/src/gsdk" || true - if [ -d "$HOME/src/gsdk/extension/aiml-extension" ]; then - echo "==> slc signature trust --extension-path (aiml-extension)" - slc signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" || true - else - echo "==> aiml-extension not present; skipping extension trust." - fi + fi + + echo "==> $SLC_BIN -h" + "$SLC_BIN" -h || true + + echo "==> Configure SDK" + "$SLC_BIN" configuration --sdk "$HOME/src/gsdk" || true + + echo "==> Trust SDK signatures" + "$SLC_BIN" signature trust --sdk "$HOME/src/gsdk" || true + + if [ -d "$HOME/src/gsdk/extension/aiml-extension" ]; then + echo "==> Trust AIML extension" + "$SLC_BIN" signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" || true else - echo "!! slc_cli not present; skipping SLC init/config." + echo "==> aiml-extension not present; skipping extension trust." fi - name: 🏁 Done (stop after SLC setup) From 81af8b337e27a7394543a28f0956414e61455528 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 13:09:11 +0530 Subject: [PATCH 016/101] update CI latest0109 --- .github/workflows/CI.yml | 41 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 483996d..3678cc2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -164,7 +164,6 @@ jobs: if [ -z "$SLC_BIN" ]; then echo "!! Could not find 'slc' or 'slc-cli' under $HOME/tools/slc_cli" - echo "Directory tree for debugging:" ls -R "$HOME/tools/slc_cli" || true exit 1 fi @@ -172,25 +171,27 @@ jobs: echo "==> Found SLC binary at: $SLC_BIN" chmod +x "$SLC_BIN" - # dir that contains the executable + # Directory containing the executable SLC_DIR="$(dirname "$SLC_BIN")" echo "==> SLC_DIR: $SLC_DIR" - # If binary is 'slc-cli', create a convenience alias named 'slc' + # If binary is 'slc-cli', create a 'slc' shim for consistency if [ "$(basename "$SLC_BIN")" = "slc-cli" ]; then echo "==> Creating 'slc' shim pointing to slc-cli" ln -sf "$SLC_BIN" "$SLC_DIR/slc" fi - # Persist env and PATH - echo "export UC_CLI_DIR=\"$SLC_DIR\"" >> "$HOME/.bashrc" - echo "export PATH=\"\$PATH:\$UC_CLI_DIR\"" >> "$HOME/.bashrc" - # Load it for this job step and print - source "$HOME/.bashrc" || true + # Persist to next steps + echo "UC_CLI_DIR=$SLC_DIR" >> "$GITHUB_ENV" + echo "$SLC_DIR" >> "$GITHUB_PATH" + + # Also export for THIS step so we can test + export UC_CLI_DIR="$SLC_DIR" + export PATH="$PATH:$UC_CLI_DIR" + echo "UC_CLI_DIR=$UC_CLI_DIR" echo "==> which slc"; which slc || true - echo "==> Test: slc -h (non-fatal)" - slc -h || true + echo "==> Test: slc -h (non-fatal)"; slc -h || true - name: πŸ“œ Install SLC CLI Python deps (via Artifactory creds if provided) shell: bash @@ -231,24 +232,14 @@ jobs: echo "==> SLC deps install step complete." - - name: πŸ”§ Export SLC env & PATH + - name: 🐚 Export SLC env & PATH shell: bash run: | set -e - if [ -d "$HOME/tools/slc_cli" ]; then - echo "==> Exporting env vars for SLC" - { - echo 'export UC_CLI_DIR="$HOME/tools/slc_cli"' - echo 'export SLC_JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"' - echo 'export PATH="$PATH:$UC_CLI_DIR"' - } >> "$HOME/.bashrc" - source "$HOME/.bashrc" || true - echo "UC_CLI_DIR=$UC_CLI_DIR" - echo "SLC_JAVA_HOME=$SLC_JAVA_HOME" - which slc || true - else - echo "!! slc_cli not present; skipping env PATH export." - fi + echo "==> Exporting env vars for SLC" + echo "UC_CLI_DIR=${UC_CLI_DIR:-}" + echo "SLC_JAVA_HOME=${SLC_JAVA_HOME:-}" + echo "==> which slc"; which slc || echo "!! slc not on PATH yet" - name: πŸš€ Initialize SLC & configure SDK shell: bash From 2ea60f62d67f9785a5a972255aa2e285e960135a Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 13:32:10 +0530 Subject: [PATCH 017/101] update CI latest0132 --- .github/workflows/CI.yml | 80 ++++++++++++++++++++++++++++++++++------ 1 file changed, 69 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3678cc2..20bb4e7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -84,6 +84,29 @@ jobs: source "$HOME/.bashrc" || true echo "JAVA_HOME=$JAVA_HOME" + - name: β˜• Ensure Java env (auto-detect JAVA_HOME for SLC) + shell: bash + run: | + set -e + echo "==> java -version" + java -version + + # Derive JAVA_HOME from the java binary symlink chain + JAVA_BIN="$(readlink -f "$(command -v java)")" + JAVA_HOME="$(dirname "$(dirname "$JAVA_BIN")")" + + echo "==> Detected JAVA_BIN: $JAVA_BIN" + echo "==> Detected JAVA_HOME: $JAVA_HOME" + + # Persist for later steps + echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" + echo "SLC_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" + echo "$JAVA_HOME/bin" >> "$GITHUB_PATH" + + # Also export here so we can use it immediately in this job + export JAVA_HOME SLC_JAVA_HOME + echo "==> Effective JAVA_HOME: $JAVA_HOME" + - name: πŸ› οΈ ARM GCC toolchain (12.2.rel1) shell: bash run: | @@ -241,13 +264,18 @@ jobs: echo "SLC_JAVA_HOME=${SLC_JAVA_HOME:-}" echo "==> which slc"; which slc || echo "!! slc not on PATH yet" - - name: πŸš€ Initialize SLC & configure SDK + - name: πŸš€ Initialize SLC & configure SDK (use detected JVM, dump logs on error) shell: bash run: | set -e - source "$HOME/.bashrc" || true - if [ -z "$UC_CLI_DIR" ]; then + echo "==> JAVA_HOME: ${JAVA_HOME:-}" + echo "==> SLC_JAVA_HOME: ${SLC_JAVA_HOME:-}" + echo "==> UC_CLI_DIR: ${UC_CLI_DIR:-}" + which java || true + which slc || true + + if [ -z "${UC_CLI_DIR:-}" ]; then echo "!! UC_CLI_DIR not set; cannot run SLC." exit 1 fi @@ -259,27 +287,57 @@ jobs: exit 1 fi - # venv is optional for running slc; activate if you’re using Python deps elsewhere - if [ -d "$HOME/venvs/sisdk" ]; then - source "$HOME/venvs/sisdk/bin/activate" + # Helper to show the latest Eclipse/OSGi log near the SLC install + dump_latest_log() { + # Walk up from UC_CLI_DIR to find a nearby "configuration/*.log" + CONF_DIR="$(dirname "$UC_CLI_DIR")/configuration" + if [ ! -d "$CONF_DIR" ]; then + # Some zips place configuration deeper. Search a couple levels around UC_CLI_DIR. + CONF_DIR="$(find "$(dirname "$UC_CLI_DIR")" -maxdepth 3 -type d -name configuration -print -quit 2>/dev/null || true)" + fi + echo "==> Checking logs under: ${CONF_DIR:-}" + if [ -n "$CONF_DIR" ] && [ -d "$CONF_DIR" ]; then + LOG_FILE="$(ls -1t "$CONF_DIR"/*.log 2>/dev/null | head -n1 || true)" + if [ -n "$LOG_FILE" ]; then + echo "==> ---- Begin SLC log: $LOG_FILE ----" + sed -n '1,300p' "$LOG_FILE" || true + echo "==> ---- End SLC log ----" + else + echo "==> No .log files found." + fi + fi + } + + # Always pass the JVM explicitly + VM_ARG=() + if [ -n "${JAVA_HOME:-}" ] && [ -x "${JAVA_HOME}/bin/java" ]; then + VM_ARG=( -vm "${JAVA_HOME}/bin/java" ) fi - echo "==> $SLC_BIN -h" - "$SLC_BIN" -h || true + set +e + echo "==> $SLC_BIN ${VM_ARG[*]} -h" + "$SLC_BIN" "${VM_ARG[@]}" -h + rc=$?; if [ $rc -ne 0 ]; then echo "!! slc -h failed ($rc)"; dump_latest_log; fi echo "==> Configure SDK" - "$SLC_BIN" configuration --sdk "$HOME/src/gsdk" || true + "$SLC_BIN" "${VM_ARG[@]}" configuration --sdk "$HOME/src/gsdk" + rc=$?; if [ $rc -ne 0 ]; then echo "!! slc configuration failed ($rc)"; dump_latest_log; fi echo "==> Trust SDK signatures" - "$SLC_BIN" signature trust --sdk "$HOME/src/gsdk" || true + "$SLC_BIN" "${VM_ARG[@]}" signature trust --sdk "$HOME/src/gsdk" + rc=$?; if [ $rc -ne 0 ]; then echo "!! slc signature trust failed ($rc)"; dump_latest_log; fi if [ -d "$HOME/src/gsdk/extension/aiml-extension" ]; then echo "==> Trust AIML extension" - "$SLC_BIN" signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" || true + "$SLC_BIN" "${VM_ARG[@]}" signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" + rc=$?; if [ $rc -ne 0 ]; then echo "!! slc signature trust (aiml-extension) failed ($rc)"; dump_latest_log; fi else echo "==> aiml-extension not present; skipping extension trust." fi + # Do not fail the job on non-zero; logs above will capture the root cause + exit 0 + - name: 🏁 Done (stop after SLC setup) shell: bash run: | From 25d72dbd8a0eb2938bb60d53eb2ab30a044da8aa Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 14:02:04 +0530 Subject: [PATCH 018/101] update CI latest0202 --- .github/workflows/CI.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 20bb4e7..348935b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -73,40 +73,41 @@ jobs: cmake --version || true ninja --version || true - - name: β˜• Install OpenJDK 17 + set JAVA_HOME + - name: β˜• Install OpenJDK 21 + set JAVA_HOME shell: bash run: | set -e - echo "==> Installing OpenJDK 17"; sudo apt install -y openjdk-17-jdk + echo "==> Installing OpenJDK 21"; sudo apt install -y openjdk-21-jdk echo "==> java -version"; java -version echo "==> Setting JAVA_HOME" - echo 'export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64' >> "$HOME/.bashrc" + echo 'export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64' >> "$HOME/.bashrc" source "$HOME/.bashrc" || true echo "JAVA_HOME=$JAVA_HOME" - - - name: β˜• Ensure Java env (auto-detect JAVA_HOME for SLC) + + - name: β˜• Ensure Java env (prefer JDK 21 for SLC) shell: bash run: | set -e - echo "==> java -version" - java -version - # Derive JAVA_HOME from the java binary symlink chain - JAVA_BIN="$(readlink -f "$(command -v java)")" - JAVA_HOME="$(dirname "$(dirname "$JAVA_BIN")")" + # Prefer OpenJDK 21 if present; else Temurin 21; else fall back to whatever `java` points to. + if [ -d /usr/lib/jvm/java-21-openjdk-amd64 ]; then + JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 + elif [ -d /usr/lib/jvm/temurin-21-jdk-amd64 ]; then + JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-amd64 + else + # Fallback to whatever java is on PATH (may still be 17) + JAVA_BIN="$(readlink -f "$(command -v java)")" + JAVA_HOME="$(dirname "$(dirname "$JAVA_BIN")")" + fi - echo "==> Detected JAVA_BIN: $JAVA_BIN" - echo "==> Detected JAVA_HOME: $JAVA_HOME" + echo "==> Using JAVA_HOME: $JAVA_HOME" + "$JAVA_HOME/bin/java" -version # Persist for later steps echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" echo "SLC_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" echo "$JAVA_HOME/bin" >> "$GITHUB_PATH" - # Also export here so we can use it immediately in this job - export JAVA_HOME SLC_JAVA_HOME - echo "==> Effective JAVA_HOME: $JAVA_HOME" - - name: πŸ› οΈ ARM GCC toolchain (12.2.rel1) shell: bash run: | From 8373c7af90cfc71b1308ccc6ae51595d69e8eb3d Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 14:28:20 +0530 Subject: [PATCH 019/101] update CI latest0232 --- .github/workflows/CI.yml | 106 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 348935b..ff54543 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -83,7 +83,7 @@ jobs: echo 'export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64' >> "$HOME/.bashrc" source "$HOME/.bashrc" || true echo "JAVA_HOME=$JAVA_HOME" - + - name: β˜• Ensure Java env (prefer JDK 21 for SLC) shell: bash run: | @@ -338,6 +338,110 @@ jobs: # Do not fail the job on non-zero; logs above will capture the root cause exit 0 + + # --- Install SLED (tries Artifactory first, falls back to PyPI) --- + - name: πŸ“¦ Install SLED Build System + shell: bash + env: + ARTI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} + ARTI_USER: ${{ secrets.ARTIFACTORY_USERNAME }} + ARTI_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} + run: | + set -e + source "$HOME/venvs/sisdk/bin/activate" + + if [ -z "$ARTI_URL" ]; then + ARTI_URL="https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple" + fi + echo "==> Using PIP index (preferred): $ARTI_URL" + + if [ -n "$ARTI_USER" ] && [ -n "$ARTI_KEY" ]; then + hostpath="${ARTI_URL#https://}" + PIP_INDEX_URL="https://${ARTI_USER}:${ARTI_KEY}@${hostpath}" + python -m pip install --upgrade pip + PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" "silabs-sled[full]" + else + echo "!! No Artifactory creds provided; trying public PyPI (may fail if internal)" + python -m pip install --upgrade pip + pip install "silabs-sled[full]" || true + fi + + echo "==> sled -h" + sled -h || { echo "!! sled failed to run"; exit 1; } + + echo "==> sled version" + sled --version + + # --- Generate the ml_blink example for brd2601b --- + - name: 🧩 Generate ml_blink (brd2601b) + shell: bash + run: | + set -e + EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" + TGT_DIR="$EX_DIR/target/brd2601b" + + echo "==> Example dir: $EX_DIR" + test -d "$EX_DIR" || { echo "!! Example dir not found"; exit 1; } + + SLC_BIN="${UC_CLI_DIR}/slc" + test -x "$SLC_BIN" || { echo "!! slc not found at $SLC_BIN"; exit 1; } + + VM_ARG=() + if [ -n "${JAVA_HOME:-}" ] && [ -x "${JAVA_HOME}/bin/java" ]; then + VM_ARG=( -vm "${JAVA_HOME}/bin/java" ) + fi + + echo "==> slc ${VM_ARG[*]} generate" + cd "$EX_DIR" + "$SLC_BIN" "${VM_ARG[@]}" generate -d "$TGT_DIR" -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" + + echo "==> Generation complete." + ls -la "$TGT_DIR" || true + + # --- Build with SLED --- + - name: πŸ› οΈ Build ml_blink with SLED + shell: bash + run: | + set -e + source "$HOME/venvs/sisdk/bin/activate" + EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" + TGT_DIR="$EX_DIR/target/brd2601b" + + echo "==> sled slc build $TGT_DIR" + sled slc build "$TGT_DIR" + + echo "==> Build tree:" + find "$TGT_DIR" -maxdepth 4 -type d -name build -print -exec ls -la {} \; || true + + # --- Verify expected outputs exist --- + - name: βœ… Verify output files + shell: bash + run: | + set -e + OUT_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink/target/brd2601b/cmake_gcc/build/base" + echo "==> Checking outputs in: $OUT_DIR" + ls -la "$OUT_DIR" || { echo "!! Output dir missing"; exit 1; } + + required=("ml_blink.out" "ml_blink.bin" "ml_blink.hex" "ml_blink.s37" "ml_blink.map") + missing=0 + for f in "${required[@]}"; do + if [ ! -f "$OUT_DIR/$f" ]; then + echo "!! Missing: $f"; missing=1 + else + echo "βœ” Found: $f ($(stat -c %s "$OUT_DIR/$f") bytes)" + fi + done + [ $missing -eq 0 ] || { echo "!! One or more build outputs are missing"; exit 1; } + + # --- Upload artifacts so you can download from the run page --- + - name: πŸ“€ Upload ml_blink artifacts + uses: actions/upload-artifact@v4 + with: + name: ml_blink-brd2601b-artifacts + path: | + ${{ env.HOME }}/src/gsdk/extension/aiml-extension/examples/ml_blink/target/brd2601b/cmake_gcc/build/base/ml_blink.* + if-no-files-found: error + retention-days: 7 - name: 🏁 Done (stop after SLC setup) shell: bash From 6d597c99db2823e8d550766a5369cedee1c96cf7 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 14:39:18 +0530 Subject: [PATCH 020/101] update CI latest0240 --- .github/workflows/CI.yml | 52 ++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ff54543..a2022fd 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -340,37 +340,49 @@ jobs: exit 0 # --- Install SLED (tries Artifactory first, falls back to PyPI) --- - - name: πŸ“¦ Install SLED Build System + - name: πŸ“¦ Install SLED Build System (PyPI first, Artifactory fallback) shell: bash env: - ARTI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} - ARTI_USER: ${{ secrets.ARTIFACTORY_USERNAME }} - ARTI_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} + ARTI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} # optional + ARTI_USER: ${{ secrets.ARTIFACTORY_USERNAME }} # optional + ARTI_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} # optional run: | set -e source "$HOME/venvs/sisdk/bin/activate" + python -m pip install --upgrade pip wheel - if [ -z "$ARTI_URL" ]; then - ARTI_URL="https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple" + echo "==> Attempting PyPI install: silabs-sled[full]" + if pip install "silabs-sled[full]"; then + echo "SLED_AVAILABLE=1" >> "$GITHUB_ENV" + sled --version + exit 0 fi - echo "==> Using PIP index (preferred): $ARTI_URL" - if [ -n "$ARTI_USER" ] && [ -n "$ARTI_KEY" ]; then - hostpath="${ARTI_URL#https://}" - PIP_INDEX_URL="https://${ARTI_USER}:${ARTI_KEY}@${hostpath}" - python -m pip install --upgrade pip - PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" "silabs-sled[full]" - else - echo "!! No Artifactory creds provided; trying public PyPI (may fail if internal)" - python -m pip install --upgrade pip - pip install "silabs-sled[full]" || true + echo "!! PyPI install failed (package may be private)." + # Try Artifactory only if URL + creds are present AND reachable + if [ -z "$ARTI_URL" ] || [ -z "$ARTI_USER" ] || [ -z "$ARTI_KEY" ]; then + echo "!! Artifactory URL/creds not fully configured; cannot use internal index." + echo "SLED_AVAILABLE=0" >> "$GITHUB_ENV" + exit 0 fi - echo "==> sled -h" - sled -h || { echo "!! sled failed to run"; exit 1; } + echo "==> Checking Artifactory reachability: $ARTI_URL" + if ! curl -fsSIL --connect-timeout 8 "$ARTI_URL" > /dev/null; then + echo "!! Artifactory not reachable from GitHub-hosted runner (network/firewall)." + echo "SLED_AVAILABLE=0" >> "$GITHUB_ENV" + exit 0 + fi - echo "==> sled version" - sled --version + echo "==> Installing from Artifactory with auth" + hostpath="${ARTI_URL#https://}" + PIP_INDEX_URL="https://${ARTI_USER}:${ARTI_KEY}@${hostpath}" + if PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" "silabs-sled[full]"; then + echo "SLED_AVAILABLE=1" >> "$GITHUB_ENV" + sled --version + else + echo "!! Artifactory install failed. Likely network ACLs from GitHub to artifactory.silabs.net." + echo "SLED_AVAILABLE=0" >> "$GITHUB_ENV" + fi # --- Generate the ml_blink example for brd2601b --- - name: 🧩 Generate ml_blink (brd2601b) From 0dcb76793dc251fcea9d60c4f1a0d77a46bc9066 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 16:56:34 +0530 Subject: [PATCH 021/101] update CI latest0456 --- .github/workflows/CI.yml | 336 +++------------------------------------ 1 file changed, 22 insertions(+), 314 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a2022fd..99db69e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -name: Ubuntu env -> SLC setup (uses SSH & Artifactory secrets) latestrere +name: Ubuntu env on: [push] permissions: @@ -9,47 +9,18 @@ jobs: setup-to-slc: runs-on: ubuntu-latest steps: - - name: 🧾 Start + - name: Start shell: bash run: | echo "==> Workflow: Ubuntu env -> SLC setup (through step 16)" echo "==> Repo: $GITHUB_REPOSITORY | Ref: $GITHUB_REF | SHA: $GITHUB_SHA" - - name: πŸ“₯ Checkout (public) + - name: Checkout (public) uses: actions/checkout@v5 with: submodules: recursive - # ------- SSH KEY SETUP (no expressions inside the script) ------- - - name: πŸ”‘ SSH key setup (for internal git over SSH) - shell: bash - env: - SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} # may be empty - run: | - set -e - if [ -n "$SSH_PRIVATE_KEY" ]; then - echo "==> SSH key provided: configuring ~/.ssh" - mkdir -p ~/.ssh - printf '%s\n' "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - touch ~/.ssh/known_hosts - echo "==> Preloading known_hosts for stash-mirror.silabs.com & github.com" - ssh-keyscan -T 5 stash-mirror.silabs.com 2>/dev/null >> ~/.ssh/known_hosts || true - ssh-keyscan -T 5 github.com 2>/dev/null >> ~/.ssh/known_hosts || true - echo "==> SSH ready." - else - echo "!! No SSH_PRIVATE_KEY secret found. Internal SSH clones will be skipped." - fi - - - name: πŸ–₯️ System info - shell: bash - run: | - echo "==> uname -a"; uname -a - echo "==> /etc/os-release"; cat /etc/os-release - echo "==> whoami: $(whoami) | home: $HOME | workdir: $(pwd)" - echo "==> Disk usage:"; df -h . - - - name: πŸ“‚ Create ~/src ~/venvs ~/tools + - name: Create ~/src ~/venvs ~/tools shell: bash run: | set -e @@ -57,87 +28,41 @@ jobs: mkdir -p "$HOME/src" "$HOME/venvs" "$HOME/tools" ls -la "$HOME" | sed -n '1,120p' - - name: πŸ“¦ Apt update & essentials + - name: Apt update & essentials shell: bash run: | set -e - echo "==> apt update"; sudo apt update -y - echo "==> install essentials" + sudo apt update -y sudo apt install -y git curl wget unzip build-essential cmake make \ python3 python3-pip python3-venv pkg-config \ libssl-dev libffi-dev python3-dev ninja-build \ telnet netcat-openbsd - echo "==> Versions:" - python3 --version || true - pip3 --version || true - cmake --version || true - ninja --version || true - - name: β˜• Install OpenJDK 21 + set JAVA_HOME + - name: Install OpenJDK 21 + set JAVA_HOME shell: bash run: | set -e echo "==> Installing OpenJDK 21"; sudo apt install -y openjdk-21-jdk echo "==> java -version"; java -version - echo "==> Setting JAVA_HOME" echo 'export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64' >> "$HOME/.bashrc" source "$HOME/.bashrc" || true - echo "JAVA_HOME=$JAVA_HOME" - - - name: β˜• Ensure Java env (prefer JDK 21 for SLC) - shell: bash - run: | - set -e - - # Prefer OpenJDK 21 if present; else Temurin 21; else fall back to whatever `java` points to. - if [ -d /usr/lib/jvm/java-21-openjdk-amd64 ]; then - JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 - elif [ -d /usr/lib/jvm/temurin-21-jdk-amd64 ]; then - JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-amd64 - else - # Fallback to whatever java is on PATH (may still be 17) - JAVA_BIN="$(readlink -f "$(command -v java)")" - JAVA_HOME="$(dirname "$(dirname "$JAVA_BIN")")" - fi - - echo "==> Using JAVA_HOME: $JAVA_HOME" - "$JAVA_HOME/bin/java" -version - - # Persist for later steps echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" echo "SLC_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" echo "$JAVA_HOME/bin" >> "$GITHUB_PATH" - - name: πŸ› οΈ ARM GCC toolchain (12.2.rel1) + - name: ARM GCC toolchain (12.2.rel1) shell: bash run: | set -e cd "$HOME/tools" echo "==> Download ARM toolchain 12.2.rel1" wget -q https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz - echo "==> Extract" tar xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz echo "==> GCC version" "$HOME/tools/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc" --version | head -n 1 - - name: 🧱 CMake & πŸͺ„ Ninja versions - shell: bash - run: | - echo "==> CMake version"; cmake --version || true - echo "==> Ninja version"; ninja --version || true - - - name: πŸ“¦ Git LFS install & init - shell: bash - run: | - set -e - echo "==> Install Git LFS" - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash - sudo apt install -y git-lfs - echo "==> git lfs install" - git lfs install - - - name: πŸ“š Clone GSDK (public) + - name: Clone GSDK and ai-ml app shell: bash run: | set -e @@ -145,16 +70,14 @@ jobs: echo "==> Cloning public GSDK" git clone https://github.com/SiliconLabs/simplicity_sdk.git gsdk cd "$HOME/src/gsdk" - echo "==> Init core submodules" git checkout v2025.6.2 cd "$HOME/src/gsdk" mkdir extension cd "$HOME/src/gsdk/extension" git clone https://github.com/SiliconLabsSoftware/aiml-extension.git aiml-extension - echo "==> LFS pull (best effort)" git lfs pull || true - - name: 🌱 Create Python venv (sisdk) + - name: Create Python venv (sisdk) shell: bash run: | set -e @@ -165,227 +88,24 @@ jobs: pip install --upgrade pip # ---------- SLC (Step 16) ---------- - - name: 🧩 Download and extract SLC CLI (public zip) + - name: SLC setup shell: bash run: | set -e + mkdir -p "$HOME/tools" cd "$HOME/tools" - echo "==> Downloading SLC CLI public release zip" - wget -q https://www.silabs.com/documents/public/software/slc_cli_linux.zip -O slc_cli_linux.zip - echo "==> Extracting slc_cli" + curl -fsSL -o slc_cli_linux.zip https://www.silabs.com/documents/public/software/slc_cli_linux.zip + rm -rf slc_cli unzip -q slc_cli_linux.zip -d slc_cli rm slc_cli_linux.zip - echo "==> Listing contents" - ls -la slc_cli - echo "==> SLC CLI downloaded & extracted successfully." - - - name: 🧩 Make SLC CLI executable and update PATH - shell: bash - run: | - set -e - echo "==> Searching for SLC executable..." - SLC_BIN=$(find "$HOME/tools/slc_cli" -type f \( -name slc -o -name slc-cli \) -print -quit || true) - - if [ -z "$SLC_BIN" ]; then - echo "!! Could not find 'slc' or 'slc-cli' under $HOME/tools/slc_cli" - ls -R "$HOME/tools/slc_cli" || true - exit 1 - fi - - echo "==> Found SLC binary at: $SLC_BIN" - chmod +x "$SLC_BIN" - - # Directory containing the executable - SLC_DIR="$(dirname "$SLC_BIN")" - echo "==> SLC_DIR: $SLC_DIR" - - # If binary is 'slc-cli', create a 'slc' shim for consistency - if [ "$(basename "$SLC_BIN")" = "slc-cli" ]; then - echo "==> Creating 'slc' shim pointing to slc-cli" - ln -sf "$SLC_BIN" "$SLC_DIR/slc" - fi - - # Persist to next steps + SLC_DIR="$HOME/tools/slc_cli/slc_cli/bin/slc-cli" + chmod +x "$SLC_DIR/slc-cli" + ln -sf "$SLC_DIR/slc-cli" "$SLC_DIR/slc" echo "UC_CLI_DIR=$SLC_DIR" >> "$GITHUB_ENV" echo "$SLC_DIR" >> "$GITHUB_PATH" - # Also export for THIS step so we can test - export UC_CLI_DIR="$SLC_DIR" - export PATH="$PATH:$UC_CLI_DIR" - - echo "UC_CLI_DIR=$UC_CLI_DIR" - echo "==> which slc"; which slc || true - echo "==> Test: slc -h (non-fatal)"; slc -h || true - - - name: πŸ“œ Install SLC CLI Python deps (via Artifactory creds if provided) - shell: bash - env: - ARTI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} # may be empty - ARTI_USER: ${{ secrets.ARTIFACTORY_USERNAME }} # may be empty - ARTI_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} # may be empty - run: | - set -e - if [ ! -d "$HOME/tools/slc_cli" ]; then - echo "!! slc_cli directory not found (clone likely skipped). Skipping deps install." - exit 0 - fi - - source "$HOME/venvs/sisdk/bin/activate" - - # bash-side fallback for URL (no expressions) - if [ -z "$ARTI_URL" ]; then - ARTI_URL="https://artifactory.silabs.net/artifactory/api/pypi/gsdk-pypi/simple" - fi - echo "==> Using Artifactory URL: $ARTI_URL" - - python -m pip install --upgrade setuptools - - if [ -f "$HOME/tools/slc_cli/requirements.txt" ]; then - if [ -n "$ARTI_USER" ] && [ -n "$ARTI_KEY" ]; then - echo "==> Artifactory creds present; using authenticated index (credentials masked)" - hostpath="${ARTI_URL#https://}" - PIP_INDEX_URL="https://${ARTI_USER}:${ARTI_KEY}@${hostpath}" - PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" -r "$HOME/tools/slc_cli/requirements.txt" - else - echo "!! No Artifactory creds provided; trying default pip index (may fail if deps are internal)" - pip install -r "$HOME/tools/slc_cli/requirements.txt" || true - fi - else - echo "requirements.txt not found; skipping SLC deps install." - fi - - echo "==> SLC deps install step complete." - - - name: 🐚 Export SLC env & PATH - shell: bash - run: | - set -e - echo "==> Exporting env vars for SLC" - echo "UC_CLI_DIR=${UC_CLI_DIR:-}" - echo "SLC_JAVA_HOME=${SLC_JAVA_HOME:-}" - echo "==> which slc"; which slc || echo "!! slc not on PATH yet" - - - name: πŸš€ Initialize SLC & configure SDK (use detected JVM, dump logs on error) - shell: bash - run: | - set -e - - echo "==> JAVA_HOME: ${JAVA_HOME:-}" - echo "==> SLC_JAVA_HOME: ${SLC_JAVA_HOME:-}" - echo "==> UC_CLI_DIR: ${UC_CLI_DIR:-}" - which java || true - which slc || true - - if [ -z "${UC_CLI_DIR:-}" ]; then - echo "!! UC_CLI_DIR not set; cannot run SLC." - exit 1 - fi - - SLC_BIN="$UC_CLI_DIR/slc" - if [ ! -x "$SLC_BIN" ]; then - echo "!! $SLC_BIN not found or not executable." - ls -la "$UC_CLI_DIR" || true - exit 1 - fi - - # Helper to show the latest Eclipse/OSGi log near the SLC install - dump_latest_log() { - # Walk up from UC_CLI_DIR to find a nearby "configuration/*.log" - CONF_DIR="$(dirname "$UC_CLI_DIR")/configuration" - if [ ! -d "$CONF_DIR" ]; then - # Some zips place configuration deeper. Search a couple levels around UC_CLI_DIR. - CONF_DIR="$(find "$(dirname "$UC_CLI_DIR")" -maxdepth 3 -type d -name configuration -print -quit 2>/dev/null || true)" - fi - echo "==> Checking logs under: ${CONF_DIR:-}" - if [ -n "$CONF_DIR" ] && [ -d "$CONF_DIR" ]; then - LOG_FILE="$(ls -1t "$CONF_DIR"/*.log 2>/dev/null | head -n1 || true)" - if [ -n "$LOG_FILE" ]; then - echo "==> ---- Begin SLC log: $LOG_FILE ----" - sed -n '1,300p' "$LOG_FILE" || true - echo "==> ---- End SLC log ----" - else - echo "==> No .log files found." - fi - fi - } - - # Always pass the JVM explicitly - VM_ARG=() - if [ -n "${JAVA_HOME:-}" ] && [ -x "${JAVA_HOME}/bin/java" ]; then - VM_ARG=( -vm "${JAVA_HOME}/bin/java" ) - fi - - set +e - echo "==> $SLC_BIN ${VM_ARG[*]} -h" - "$SLC_BIN" "${VM_ARG[@]}" -h - rc=$?; if [ $rc -ne 0 ]; then echo "!! slc -h failed ($rc)"; dump_latest_log; fi - - echo "==> Configure SDK" - "$SLC_BIN" "${VM_ARG[@]}" configuration --sdk "$HOME/src/gsdk" - rc=$?; if [ $rc -ne 0 ]; then echo "!! slc configuration failed ($rc)"; dump_latest_log; fi - - echo "==> Trust SDK signatures" - "$SLC_BIN" "${VM_ARG[@]}" signature trust --sdk "$HOME/src/gsdk" - rc=$?; if [ $rc -ne 0 ]; then echo "!! slc signature trust failed ($rc)"; dump_latest_log; fi - - if [ -d "$HOME/src/gsdk/extension/aiml-extension" ]; then - echo "==> Trust AIML extension" - "$SLC_BIN" "${VM_ARG[@]}" signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" - rc=$?; if [ $rc -ne 0 ]; then echo "!! slc signature trust (aiml-extension) failed ($rc)"; dump_latest_log; fi - else - echo "==> aiml-extension not present; skipping extension trust." - fi - - # Do not fail the job on non-zero; logs above will capture the root cause - exit 0 - - # --- Install SLED (tries Artifactory first, falls back to PyPI) --- - - name: πŸ“¦ Install SLED Build System (PyPI first, Artifactory fallback) - shell: bash - env: - ARTI_URL: ${{ vars.ARTIFACTORY_PYPI_URL }} # optional - ARTI_USER: ${{ secrets.ARTIFACTORY_USERNAME }} # optional - ARTI_KEY: ${{ secrets.ARTIFACTORY_API_KEY }} # optional - run: | - set -e - source "$HOME/venvs/sisdk/bin/activate" - python -m pip install --upgrade pip wheel - - echo "==> Attempting PyPI install: silabs-sled[full]" - if pip install "silabs-sled[full]"; then - echo "SLED_AVAILABLE=1" >> "$GITHUB_ENV" - sled --version - exit 0 - fi - - echo "!! PyPI install failed (package may be private)." - # Try Artifactory only if URL + creds are present AND reachable - if [ -z "$ARTI_URL" ] || [ -z "$ARTI_USER" ] || [ -z "$ARTI_KEY" ]; then - echo "!! Artifactory URL/creds not fully configured; cannot use internal index." - echo "SLED_AVAILABLE=0" >> "$GITHUB_ENV" - exit 0 - fi - - echo "==> Checking Artifactory reachability: $ARTI_URL" - if ! curl -fsSIL --connect-timeout 8 "$ARTI_URL" > /dev/null; then - echo "!! Artifactory not reachable from GitHub-hosted runner (network/firewall)." - echo "SLED_AVAILABLE=0" >> "$GITHUB_ENV" - exit 0 - fi - - echo "==> Installing from Artifactory with auth" - hostpath="${ARTI_URL#https://}" - PIP_INDEX_URL="https://${ARTI_USER}:${ARTI_KEY}@${hostpath}" - if PIP_INDEX_URL="$PIP_INDEX_URL" pip install --index-url "$PIP_INDEX_URL" "silabs-sled[full]"; then - echo "SLED_AVAILABLE=1" >> "$GITHUB_ENV" - sled --version - else - echo "!! Artifactory install failed. Likely network ACLs from GitHub to artifactory.silabs.net." - echo "SLED_AVAILABLE=0" >> "$GITHUB_ENV" - fi - # --- Generate the ml_blink example for brd2601b --- - - name: 🧩 Generate ml_blink (brd2601b) + - name: Generate ml_blink (brd2601b) shell: bash run: | set -e @@ -411,7 +131,7 @@ jobs: ls -la "$TGT_DIR" || true # --- Build with SLED --- - - name: πŸ› οΈ Build ml_blink with SLED + - name: Build ml_blink with SLED shell: bash run: | set -e @@ -426,7 +146,7 @@ jobs: find "$TGT_DIR" -maxdepth 4 -type d -name build -print -exec ls -la {} \; || true # --- Verify expected outputs exist --- - - name: βœ… Verify output files + - name: Verify output files shell: bash run: | set -e @@ -445,19 +165,7 @@ jobs: done [ $missing -eq 0 ] || { echo "!! One or more build outputs are missing"; exit 1; } - # --- Upload artifacts so you can download from the run page --- - - name: πŸ“€ Upload ml_blink artifacts - uses: actions/upload-artifact@v4 - with: - name: ml_blink-brd2601b-artifacts - path: | - ${{ env.HOME }}/src/gsdk/extension/aiml-extension/examples/ml_blink/target/brd2601b/cmake_gcc/build/base/ml_blink.* - if-no-files-found: error - retention-days: 7 - - - name: 🏁 Done (stop after SLC setup) + - name: Done (stop after SLC setup) shell: bash run: | - echo "==> Finished through step 16 (SLC setup)." - echo "==> If SLC clone failed, confirm SSH_PRIVATE_KEY is added as a secret." - echo "==> If deps failed, confirm ARTIFACTORY_USERNAME/API_KEY and (optionally) ARTIFACTORY_PYPI_URL." \ No newline at end of file + echo "==> Finished through step 16 (SLC setup)." \ No newline at end of file From 288155d419e495a5a8e510af601370ca66e2bb18 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 17:12:26 +0530 Subject: [PATCH 022/101] update CI latest512 --- .github/workflows/CI.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 99db69e..2ba07e0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -37,18 +37,12 @@ jobs: python3 python3-pip python3-venv pkg-config \ libssl-dev libffi-dev python3-dev ninja-build \ telnet netcat-openbsd - - - name: Install OpenJDK 21 + set JAVA_HOME - shell: bash - run: | - set -e - echo "==> Installing OpenJDK 21"; sudo apt install -y openjdk-21-jdk - echo "==> java -version"; java -version - echo 'export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64' >> "$HOME/.bashrc" - source "$HOME/.bashrc" || true - echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" - echo "SLC_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" - echo "$JAVA_HOME/bin" >> "$GITHUB_PATH" + - name: Use Java 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + check-latest: true - name: ARM GCC toolchain (12.2.rel1) shell: bash @@ -92,6 +86,7 @@ jobs: shell: bash run: | set -e + echo "SLC_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" mkdir -p "$HOME/tools" cd "$HOME/tools" curl -fsSL -o slc_cli_linux.zip https://www.silabs.com/documents/public/software/slc_cli_linux.zip From 395baa1e29224ca769f69dbf7dfbef76ac81e50a Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 17:20:14 +0530 Subject: [PATCH 023/101] update CI latest0520 --- .github/workflows/CI.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2ba07e0..7d4c007 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -98,6 +98,10 @@ jobs: ln -sf "$SLC_DIR/slc-cli" "$SLC_DIR/slc" echo "UC_CLI_DIR=$SLC_DIR" >> "$GITHUB_ENV" echo "$SLC_DIR" >> "$GITHUB_PATH" + + slc configuration --sdk ~/src/gsdk + slc signature trust --sdk ~/src/gsdk + slc signature trust --extension-path ~/src/gsdk/extension/aiml-extension # --- Generate the ml_blink example for brd2601b --- - name: Generate ml_blink (brd2601b) From 27ad1f5214d5b6818778d2d6898a98f0de92644b Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 17:31:21 +0530 Subject: [PATCH 024/101] update CI latest0531 --- .github/workflows/CI.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7d4c007..a515ee0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,7 +81,6 @@ jobs: echo "==> Upgrading pip" pip install --upgrade pip - # ---------- SLC (Step 16) ---------- - name: SLC setup shell: bash run: | @@ -98,7 +97,10 @@ jobs: ln -sf "$SLC_DIR/slc-cli" "$SLC_DIR/slc" echo "UC_CLI_DIR=$SLC_DIR" >> "$GITHUB_ENV" echo "$SLC_DIR" >> "$GITHUB_PATH" - + + - name: Configure and trust SDK + shell: bash + run: | slc configuration --sdk ~/src/gsdk slc signature trust --sdk ~/src/gsdk slc signature trust --extension-path ~/src/gsdk/extension/aiml-extension From 4e6b2222b049255890cba91d5dea0a02ad0f6a67 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 09:57:15 +0530 Subject: [PATCH 025/101] update CI latest957 --- .github/workflows/CI.yml | 40 +++++----------------------------------- 1 file changed, 5 insertions(+), 35 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a515ee0..f98fe31 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -110,41 +110,11 @@ jobs: shell: bash run: | set -e - EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - TGT_DIR="$EX_DIR/target/brd2601b" - - echo "==> Example dir: $EX_DIR" - test -d "$EX_DIR" || { echo "!! Example dir not found"; exit 1; } - - SLC_BIN="${UC_CLI_DIR}/slc" - test -x "$SLC_BIN" || { echo "!! slc not found at $SLC_BIN"; exit 1; } - - VM_ARG=() - if [ -n "${JAVA_HOME:-}" ] && [ -x "${JAVA_HOME}/bin/java" ]; then - VM_ARG=( -vm "${JAVA_HOME}/bin/java" ) - fi - - echo "==> slc ${VM_ARG[*]} generate" - cd "$EX_DIR" - "$SLC_BIN" "${VM_ARG[@]}" generate -d "$TGT_DIR" -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" - - echo "==> Generation complete." - ls -la "$TGT_DIR" || true - - # --- Build with SLED --- - - name: Build ml_blink with SLED - shell: bash - run: | - set -e - source "$HOME/venvs/sisdk/bin/activate" - EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - TGT_DIR="$EX_DIR/target/brd2601b" - - echo "==> sled slc build $TGT_DIR" - sled slc build "$TGT_DIR" - - echo "==> Build tree:" - find "$TGT_DIR" -maxdepth 4 -type d -name build -print -exec ls -la {} \; || true + slc --version + cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" + slc generate -d target/brd2601b -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" + cmake --preset project -S target/brd2601b/ml_blink_cmake + cmake --build target/brd2601b/ml_blink_cmake/build # --- Verify expected outputs exist --- - name: Verify output files From 92e3ee9063fa82ba574569c44a90db17ffb7829e Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:13:35 +0530 Subject: [PATCH 026/101] update CI latest1013 --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f98fe31..550b2f6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -110,6 +110,7 @@ jobs: shell: bash run: | set -e + source "$HOME/venvs/sisdk/bin/activate" slc --version cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" slc generate -d target/brd2601b -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" From f52713b251dcac34e09a056ef595768b665e24db Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:20:07 +0530 Subject: [PATCH 027/101] update CI latest1020 --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 550b2f6..44aef04 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -111,7 +111,8 @@ jobs: run: | set -e source "$HOME/venvs/sisdk/bin/activate" - slc --version + slc -h + slc --verbose cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" slc generate -d target/brd2601b -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" cmake --preset project -S target/brd2601b/ml_blink_cmake From ef8a073cbf5b8b7de51087aed390ed4f5740ec6d Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:24:51 +0530 Subject: [PATCH 028/101] update CI latest1024 --- .github/workflows/CI.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 44aef04..fd79a61 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -111,8 +111,6 @@ jobs: run: | set -e source "$HOME/venvs/sisdk/bin/activate" - slc -h - slc --verbose cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" slc generate -d target/brd2601b -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" cmake --preset project -S target/brd2601b/ml_blink_cmake From f51ebc9134191ac7642c4be2b5d07bfa30cd47cc Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:35:22 +0530 Subject: [PATCH 029/101] update CI latest1035 --- .github/workflows/CI.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fd79a61..3818cd1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -107,15 +107,46 @@ jobs: # --- Generate the ml_blink example for brd2601b --- - name: Generate ml_blink (brd2601b) + shell: bash + run: | + set -e + EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" + TGT_DIR="$EX_DIR/target/brd2601b" + + echo "==> Example dir: $EX_DIR" + test -d "$EX_DIR" || { echo "!! Example dir not found"; exit 1; } + + SLC_BIN="${UC_CLI_DIR}/slc" + test -x "$SLC_BIN" || { echo "!! slc not found at $SLC_BIN"; exit 1; } + + VM_ARG=() + if [ -n "${JAVA_HOME:-}" ] && [ -x "${JAVA_HOME}/bin/java" ]; then + VM_ARG=( -vm "${JAVA_HOME}/bin/java" ) + fi + + echo "==> slc ${VM_ARG[*]} generate" + cd "$EX_DIR" + "$SLC_BIN" "${VM_ARG[@]}" generate -d "$TGT_DIR" -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" + + echo "==> Generation complete." + ls -la "$TGT_DIR" || true + + # --- Build with SLED --- + - name: Build ml_blink with SLED shell: bash run: | set -e source "$HOME/venvs/sisdk/bin/activate" - cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - slc generate -d target/brd2601b -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" + EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" + TGT_DIR="$EX_DIR/target/brd2601b" + + echo "==> sled slc build $TGT_DIR" cmake --preset project -S target/brd2601b/ml_blink_cmake cmake --build target/brd2601b/ml_blink_cmake/build + echo "==> Build tree:" + find "$TGT_DIR" -maxdepth 4 -type d -name build -print -exec ls -la {} \; || true + # --- Verify expected outputs exist --- - name: Verify output files shell: bash From e650451f8a6d35f75c7975114a63c7f68f7e3886 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:49:14 +0530 Subject: [PATCH 030/101] update CI latest1050 --- .github/workflows/CI.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3818cd1..7508868 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -131,7 +131,7 @@ jobs: echo "==> Generation complete." ls -la "$TGT_DIR" || true - # --- Build with SLED --- + # --- Build with cmake --- - name: Build ml_blink with SLED shell: bash run: | @@ -140,9 +140,9 @@ jobs: EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" TGT_DIR="$EX_DIR/target/brd2601b" - echo "==> sled slc build $TGT_DIR" - cmake --preset project -S target/brd2601b/ml_blink_cmake - cmake --build target/brd2601b/ml_blink_cmake/build + echo "==> cmake build $TGT_DIR" + cmake --preset project -S target/brd2601b + cmake --build target/brd2601b/build echo "==> Build tree:" find "$TGT_DIR" -maxdepth 4 -type d -name build -print -exec ls -la {} \; || true From d9fdc0e958acd0c195d42c412ef8ccf5e7599485 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:58:00 +0530 Subject: [PATCH 031/101] update CI latest1057 --- .github/workflows/CI.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7508868..5e7d332 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -131,21 +131,35 @@ jobs: echo "==> Generation complete." ls -la "$TGT_DIR" || true - # --- Build with cmake --- - - name: Build ml_blink with SLED + # --- Build with cmake ---- + - name: Build ml_blink (no SLED) shell: bash run: | set -e - source "$HOME/venvs/sisdk/bin/activate" EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" TGT_DIR="$EX_DIR/target/brd2601b" - echo "==> cmake build $TGT_DIR" - cmake --preset project -S target/brd2601b - cmake --build target/brd2601b/build + # Prefer preset if SLC generated it + if [ -f "$TGT_DIR/CMakePresets.json" ]; then + echo "==> Using CMake preset" + cmake --preset project -S "$TGT_DIR" + cmake --build "$TGT_DIR/build" --parallel + # Otherwise fall back to the classic cmake_gcc structure + elif [ -d "$TGT_DIR/cmake_gcc" ]; then + echo "==> Using classic cmake_gcc path" + cmake -S "$TGT_DIR/cmake_gcc" -B "$TGT_DIR/cmake_gcc/build" -G Ninja + cmake --build "$TGT_DIR/cmake_gcc/build" --parallel + # Or if your generator created ml_blink_cmake/, handle that too + elif [ -d "$TGT_DIR/ml_blink_cmake" ]; then + echo "==> Using ml_blink_cmake path" + cmake -S "$TGT_DIR/ml_blink_cmake" -B "$TGT_DIR/ml_blink_cmake/build" -G Ninja + cmake --build "$TGT_DIR/ml_blink_cmake/build" --parallel + else + echo "!! No known CMake layout found in $TGT_DIR" + ls -la "$TGT_DIR" || true + exit 1 + fi - echo "==> Build tree:" - find "$TGT_DIR" -maxdepth 4 -type d -name build -print -exec ls -la {} \; || true # --- Verify expected outputs exist --- - name: Verify output files From f8ba04fc9252e64cd8716088b5c921ee13af1c70 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 11:06:23 +0530 Subject: [PATCH 032/101] update CI latest1106 --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5e7d332..0f78efe 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -69,6 +69,7 @@ jobs: mkdir extension cd "$HOME/src/gsdk/extension" git clone https://github.com/SiliconLabsSoftware/aiml-extension.git aiml-extension + git checkout v2.1.2 git lfs pull || true - name: Create Python venv (sisdk) From d11458fd63c217ccb61123d6026b26d6db51f4a6 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 11:15:36 +0530 Subject: [PATCH 033/101] update CI latest1115 --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0f78efe..89a4629 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -69,6 +69,7 @@ jobs: mkdir extension cd "$HOME/src/gsdk/extension" git clone https://github.com/SiliconLabsSoftware/aiml-extension.git aiml-extension + cd "$HOME/src/gsdk/extension/aiml-extension" git checkout v2.1.2 git lfs pull || true From 44d48313715584e359ecf3050cf3556cd93492e5 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 11:36:48 +0530 Subject: [PATCH 034/101] update CI latest1136 --- .github/workflows/CI.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 89a4629..0392264 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -65,12 +65,12 @@ jobs: git clone https://github.com/SiliconLabs/simplicity_sdk.git gsdk cd "$HOME/src/gsdk" git checkout v2025.6.2 - cd "$HOME/src/gsdk" mkdir extension - cd "$HOME/src/gsdk/extension" - git clone https://github.com/SiliconLabsSoftware/aiml-extension.git aiml-extension - cd "$HOME/src/gsdk/extension/aiml-extension" - git checkout v2.1.2 + cd extension + git clone --recurse-submodules https://github.com/SiliconLabsSoftware/aiml-extension.git aiml-extension + cd aiml-extension + git checkout v2.1.2 + git submodule update --init --recursive git lfs pull || true - name: Create Python venv (sisdk) From 203a001fd54758f3154ebaa54cf809d74cc6a0f8 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 11:56:50 +0530 Subject: [PATCH 035/101] update CI latest1156 --- .github/workflows/CI.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0392264..3d0da0a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -53,8 +53,12 @@ jobs: wget -q https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz tar xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz + TOOLROOT="$HOME/tools/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi" + echo "ARM_GCC_ROOT=$TOOLROOT" >> "$GITHUB_ENV" + echo "$TOOLROOT/bin" >> "$GITHUB_PATH" + echo "==> GCC version" - "$HOME/tools/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc" --version | head -n 1 + "$TOOLROOT/bin/arm-none-eabi-gcc" --version | head -n 1 - name: Clone GSDK and ai-ml app shell: bash From a9da87ecbc2bec920b53492287aa95afbfa84bb8 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 12:07:40 +0530 Subject: [PATCH 036/101] update CI latest1207 --- .github/workflows/CI.yml | 48 +++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3d0da0a..b7bbe70 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -136,35 +136,37 @@ jobs: echo "==> Generation complete." ls -la "$TGT_DIR" || true + + # Verify ARM toolchain is available + - name: Verify ARM GCC on PATH + shell: bash + run: | + set -e + echo "PATH=$PATH" + which arm-none-eabi-gcc + arm-none-eabi-gcc --version | head -n1 - # --- Build with cmake ---- - - name: Build ml_blink (no SLED) + # Clean any CMake cache that captured /usr/bin/cc + - name: Clean CMake cache for ml_blink shell: bash run: | set -e EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - TGT_DIR="$EX_DIR/target/brd2601b" + rm -rf "$EX_DIR/target/brd2601b/ml_blink_cmake/build" || true + rm -f "$EX_DIR/target/brd2601b/ml_blink_cmake/CMakeCache.txt" || true - # Prefer preset if SLC generated it - if [ -f "$TGT_DIR/CMakePresets.json" ]; then - echo "==> Using CMake preset" - cmake --preset project -S "$TGT_DIR" - cmake --build "$TGT_DIR/build" --parallel - # Otherwise fall back to the classic cmake_gcc structure - elif [ -d "$TGT_DIR/cmake_gcc" ]; then - echo "==> Using classic cmake_gcc path" - cmake -S "$TGT_DIR/cmake_gcc" -B "$TGT_DIR/cmake_gcc/build" -G Ninja - cmake --build "$TGT_DIR/cmake_gcc/build" --parallel - # Or if your generator created ml_blink_cmake/, handle that too - elif [ -d "$TGT_DIR/ml_blink_cmake" ]; then - echo "==> Using ml_blink_cmake path" - cmake -S "$TGT_DIR/ml_blink_cmake" -B "$TGT_DIR/ml_blink_cmake/build" -G Ninja - cmake --build "$TGT_DIR/ml_blink_cmake/build" --parallel - else - echo "!! No known CMake layout found in $TGT_DIR" - ls -la "$TGT_DIR" || true - exit 1 - fi + # Reconfigure and build with the ARM toolchain + - name: Build ml_blink (ARM toolchain) + shell: bash + run: | + set -e + EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" + cd "$EX_DIR" + # Force compilers in case presets/toolchain file don’t do it + export CC=arm-none-eabi-gcc + export CXX=arm-none-eabi-g++ + cmake --preset project -S target/brd2601b/ml_blink_cmake + cmake --build target/brd2601b/ml_blink_cmake/build # --- Verify expected outputs exist --- From d60823fd61f8077d04d7d603ae394eb13ea6f0a7 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 12:20:31 +0530 Subject: [PATCH 037/101] update CI latest1220 --- .github/workflows/CI.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b7bbe70..f13dd23 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -162,10 +162,12 @@ jobs: set -e EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" cd "$EX_DIR" - # Force compilers in case presets/toolchain file don’t do it - export CC=arm-none-eabi-gcc - export CXX=arm-none-eabi-g++ - cmake --preset project -S target/brd2601b/ml_blink_cmake + + export CC="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" + export CXX="$ARM_GCC_ROOT/bin/arm-none-eabi-g++" + export AS="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" + + cmake --preset project -S target/brd2601b/ml_blink_cmake -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_ASM_COMPILER="$AS" cmake --build target/brd2601b/ml_blink_cmake/build From 52411b452fa97bd029c117550d6fc946a02aac64 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 12:35:57 +0530 Subject: [PATCH 038/101] update CI latest1236 --- .github/workflows/CI.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f13dd23..ecedc38 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -163,11 +163,21 @@ jobs: EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" cd "$EX_DIR" - export CC="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" - export CXX="$ARM_GCC_ROOT/bin/arm-none-eabi-g++" - export AS="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" + TC="$EX_DIR/target/brd2601b/ml_blink_cmake/toolchain.cmake" - cmake --preset project -S target/brd2601b/ml_blink_cmake -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_ASM_COMPILER="$AS" + # Sanity: show where the real compiler is + echo "ARM_GCC_ROOT=$ARM_GCC_ROOT" + ls -l "$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" + + # Replace the hardcoded /bin/... entries in the toolchain file + sed -i "s|/bin/arm-none-eabi-gcc|$ARM_GCC_ROOT/bin/arm-none-eabi-gcc|g" "$TC" + sed -i "s|/bin/arm-none-eabi-g\+\+|$ARM_GCC_ROOT/bin/arm-none-eabi-g++|g" "$TC" + + # (Optional) show the lines after patch + grep -n 'arm-none-eabi' "$TC" || true + rm -rf target/brd2601b/ml_blink_cmake/build target/brd2601b/ml_blink_cmake/CMakeCache.txt || true + + cmake --preset project -S target/brd2601b/ml_blink_cmake -DARM_GCC_ROOT="$ARM_GCC_ROOT" -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY cmake --build target/brd2601b/ml_blink_cmake/build From 13b9d3ecfc6eb39d16bb5edf69be52ac29d8acd8 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 12:51:41 +0530 Subject: [PATCH 039/101] update CI latest1251 --- .github/workflows/CI.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ecedc38..c3a550c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -161,24 +161,20 @@ jobs: run: | set -e EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - cd "$EX_DIR" + BDIR="$EX_DIR/target/brd2601b/ml_blink_cmake/build" - TC="$EX_DIR/target/brd2601b/ml_blink_cmake/toolchain.cmake" + : "${ARM_GCC_ROOT:?ARM_GCC_ROOT must be set}" - # Sanity: show where the real compiler is - echo "ARM_GCC_ROOT=$ARM_GCC_ROOT" + echo "ARM_GCC_ROOT = $ARM_GCC_ROOT" ls -l "$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" + ls -l "$ARM_GCC_ROOT/bin/arm-none-eabi-g++" + rm -rf "$BDIR" "$EX_DIR/target/brd2601b/ml_blink_cmake/CMakeCache.txt" \ + "$EX_DIR/target/brd2601b/ml_blink_cmake/CMakeFiles" || true + mkdir -p "$BDIR" - # Replace the hardcoded /bin/... entries in the toolchain file - sed -i "s|/bin/arm-none-eabi-gcc|$ARM_GCC_ROOT/bin/arm-none-eabi-gcc|g" "$TC" - sed -i "s|/bin/arm-none-eabi-g\+\+|$ARM_GCC_ROOT/bin/arm-none-eabi-g++|g" "$TC" - - # (Optional) show the lines after patch - grep -n 'arm-none-eabi' "$TC" || true - rm -rf target/brd2601b/ml_blink_cmake/build target/brd2601b/ml_blink_cmake/CMakeCache.txt || true + cmake -S "$EX_DIR/target/brd2601b/ml_blink_cmake" -B "$BDIR" -G Ninja -DCMAKE_TOOLCHAIN_FILE="$EX_DIR/target/brd2601b/ml_blink_cmake/toolchain.cmake" -DCMAKE_C_COMPILER="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" -DCMAKE_CXX_COMPILER="$ARM_GCC_ROOT/bin/arm-none-eabi-g++" -DCMAKE_ASM_COMPILER="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY - cmake --preset project -S target/brd2601b/ml_blink_cmake -DARM_GCC_ROOT="$ARM_GCC_ROOT" -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY - cmake --build target/brd2601b/ml_blink_cmake/build + cmake --build "$BDIR" -- -v # --- Verify expected outputs exist --- From 4763e91490fd22c1a8f60c371521299669c283b5 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 13:10:34 +0530 Subject: [PATCH 040/101] update CI latest0110 --- .github/workflows/CI.yml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c3a550c..a683a69 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -53,7 +53,8 @@ jobs: wget -q https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz tar xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz - TOOLROOT="$HOME/tools/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi" + mv arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi armgnu + TOOLROOT="$HOME/tools/armgnu" echo "ARM_GCC_ROOT=$TOOLROOT" >> "$GITHUB_ENV" echo "$TOOLROOT/bin" >> "$GITHUB_PATH" @@ -155,27 +156,47 @@ jobs: rm -rf "$EX_DIR/target/brd2601b/ml_blink_cmake/build" || true rm -f "$EX_DIR/target/brd2601b/ml_blink_cmake/CMakeCache.txt" || true + # Reconfigure and build with the ARM toolchain # Reconfigure and build with the ARM toolchain - name: Build ml_blink (ARM toolchain) shell: bash run: | set -e + + # Directories EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" BDIR="$EX_DIR/target/brd2601b/ml_blink_cmake/build" + # Ensure ARM_GCC_ROOT is set : "${ARM_GCC_ROOT:?ARM_GCC_ROOT must be set}" - echo "ARM_GCC_ROOT = $ARM_GCC_ROOT" + echo "==> ARM_GCC_ROOT = $ARM_GCC_ROOT" ls -l "$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" ls -l "$ARM_GCC_ROOT/bin/arm-none-eabi-g++" - rm -rf "$BDIR" "$EX_DIR/target/brd2601b/ml_blink_cmake/CMakeCache.txt" \ + + # Clean any stale CMake cache or previous builds + echo "==> Cleaning previous build directories" + rm -rf "$BDIR" \ + "$EX_DIR/target/brd2601b/ml_blink_cmake/CMakeCache.txt" \ "$EX_DIR/target/brd2601b/ml_blink_cmake/CMakeFiles" || true mkdir -p "$BDIR" - cmake -S "$EX_DIR/target/brd2601b/ml_blink_cmake" -B "$BDIR" -G Ninja -DCMAKE_TOOLCHAIN_FILE="$EX_DIR/target/brd2601b/ml_blink_cmake/toolchain.cmake" -DCMAKE_C_COMPILER="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" -DCMAKE_CXX_COMPILER="$ARM_GCC_ROOT/bin/arm-none-eabi-g++" -DCMAKE_ASM_COMPILER="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY - + # Configure with correct compilers + echo "==> Running CMake configuration" + cmake -S "$EX_DIR/target/brd2601b/ml_blink_cmake" \ + -B "$BDIR" \ + -G Ninja \ + -DCMAKE_TOOLCHAIN_FILE="$EX_DIR/target/brd2601b/ml_blink_cmake/toolchain.cmake" \ + -DCMAKE_C_COMPILER:FILEPATH="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" \ + -DCMAKE_CXX_COMPILER:FILEPATH="$ARM_GCC_ROOT/bin/arm-none-eabi-g++" \ + -DCMAKE_ASM_COMPILER:FILEPATH="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" \ + -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY + + # Build + echo "==> Building project" cmake --build "$BDIR" -- -v + echo "==> Build complete βœ…" # --- Verify expected outputs exist --- - name: Verify output files From 8872d7680402e072ff48ca3a133e9b9ca0917d85 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 14:03:50 +0530 Subject: [PATCH 041/101] update CI latest0203 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a683a69..b2c74e6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,7 @@ permissions: jobs: setup-to-slc: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Start shell: bash From 02a933c71eea28199d8ac40e5cd877cf72041387 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 14:20:06 +0530 Subject: [PATCH 042/101] update CI latest0222 --- .github/workflows/CI.yml | 79 +++++++--------------------------------- 1 file changed, 13 insertions(+), 66 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b2c74e6..6463c99 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -112,49 +112,26 @@ jobs: slc signature trust --sdk ~/src/gsdk slc signature trust --extension-path ~/src/gsdk/extension/aiml-extension + - name: Print SLC version + shell: bash + run: | + set -e + echo "SLC version:" + "$UC_CLI_DIR/slc" -vm "$JAVA_HOME/bin/java" -h | head -n 1 + # --- Generate the ml_blink example for brd2601b --- - name: Generate ml_blink (brd2601b) shell: bash run: | set -e - EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - TGT_DIR="$EX_DIR/target/brd2601b" - - echo "==> Example dir: $EX_DIR" - test -d "$EX_DIR" || { echo "!! Example dir not found"; exit 1; } + cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" SLC_BIN="${UC_CLI_DIR}/slc" - test -x "$SLC_BIN" || { echo "!! slc not found at $SLC_BIN"; exit 1; } - - VM_ARG=() - if [ -n "${JAVA_HOME:-}" ] && [ -x "${JAVA_HOME}/bin/java" ]; then - VM_ARG=( -vm "${JAVA_HOME}/bin/java" ) - fi - echo "==> slc ${VM_ARG[*]} generate" - cd "$EX_DIR" - "$SLC_BIN" "${VM_ARG[@]}" generate -d "$TGT_DIR" -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" + "$SLC_BIN" generate -d target/brd2601b -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" echo "==> Generation complete." - ls -la "$TGT_DIR" || true - - # Verify ARM toolchain is available - - name: Verify ARM GCC on PATH - shell: bash - run: | - set -e - echo "PATH=$PATH" - which arm-none-eabi-gcc - arm-none-eabi-gcc --version | head -n1 - # Clean any CMake cache that captured /usr/bin/cc - - name: Clean CMake cache for ml_blink - shell: bash - run: | - set -e - EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - rm -rf "$EX_DIR/target/brd2601b/ml_blink_cmake/build" || true - rm -f "$EX_DIR/target/brd2601b/ml_blink_cmake/CMakeCache.txt" || true # Reconfigure and build with the ARM toolchain # Reconfigure and build with the ARM toolchain @@ -162,41 +139,11 @@ jobs: shell: bash run: | set -e + cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" + cmake --preset project -S target/brd2601b/ml_blink_cmake + cmake --build target/brd2601b/ml_blink_cmake/build + - # Directories - EX_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - BDIR="$EX_DIR/target/brd2601b/ml_blink_cmake/build" - - # Ensure ARM_GCC_ROOT is set - : "${ARM_GCC_ROOT:?ARM_GCC_ROOT must be set}" - - echo "==> ARM_GCC_ROOT = $ARM_GCC_ROOT" - ls -l "$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" - ls -l "$ARM_GCC_ROOT/bin/arm-none-eabi-g++" - - # Clean any stale CMake cache or previous builds - echo "==> Cleaning previous build directories" - rm -rf "$BDIR" \ - "$EX_DIR/target/brd2601b/ml_blink_cmake/CMakeCache.txt" \ - "$EX_DIR/target/brd2601b/ml_blink_cmake/CMakeFiles" || true - mkdir -p "$BDIR" - - # Configure with correct compilers - echo "==> Running CMake configuration" - cmake -S "$EX_DIR/target/brd2601b/ml_blink_cmake" \ - -B "$BDIR" \ - -G Ninja \ - -DCMAKE_TOOLCHAIN_FILE="$EX_DIR/target/brd2601b/ml_blink_cmake/toolchain.cmake" \ - -DCMAKE_C_COMPILER:FILEPATH="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" \ - -DCMAKE_CXX_COMPILER:FILEPATH="$ARM_GCC_ROOT/bin/arm-none-eabi-g++" \ - -DCMAKE_ASM_COMPILER:FILEPATH="$ARM_GCC_ROOT/bin/arm-none-eabi-gcc" \ - -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY - - # Build - echo "==> Building project" - cmake --build "$BDIR" -- -v - - echo "==> Build complete βœ…" # --- Verify expected outputs exist --- - name: Verify output files From d2d25f6673db849fd0459f22f21d25c45beada65 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 14:30:46 +0530 Subject: [PATCH 043/101] update CI latest0230 --- .github/workflows/CI.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6463c99..5d00302 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -36,7 +36,7 @@ jobs: sudo apt install -y git curl wget unzip build-essential cmake make \ python3 python3-pip python3-venv pkg-config \ libssl-dev libffi-dev python3-dev ninja-build \ - telnet netcat-openbsd + telnet netcat-openbsd tree - name: Use Java 21 uses: actions/setup-java@v4 with: @@ -112,25 +112,16 @@ jobs: slc signature trust --sdk ~/src/gsdk slc signature trust --extension-path ~/src/gsdk/extension/aiml-extension - - name: Print SLC version - shell: bash - run: | - set -e - echo "SLC version:" - "$UC_CLI_DIR/slc" -vm "$JAVA_HOME/bin/java" -h | head -n 1 - # --- Generate the ml_blink example for brd2601b --- - name: Generate ml_blink (brd2601b) shell: bash run: | set -e cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - - SLC_BIN="${UC_CLI_DIR}/slc" - - "$SLC_BIN" generate -d target/brd2601b -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" - + slc generate -d target/brd2601b -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" echo "==> Generation complete." + cd target + tree # Reconfigure and build with the ARM toolchain From 4b9d314b4309934bd2ca2f59962a6b7a4c44d963 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 15:16:14 +0530 Subject: [PATCH 044/101] update CI latest0316 --- .github/workflows/CI.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5d00302..c16e221 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -55,8 +55,8 @@ jobs: rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz mv arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi armgnu TOOLROOT="$HOME/tools/armgnu" - echo "ARM_GCC_ROOT=$TOOLROOT" >> "$GITHUB_ENV" - echo "$TOOLROOT/bin" >> "$GITHUB_PATH" + echo "ARM_GCC_DIR=$TOOLROOT" >> "$GITHUB_ENV" + echo "$TOOLROOT/bin/" >> "$GITHUB_PATH" echo "==> GCC version" "$TOOLROOT/bin/arm-none-eabi-gcc" --version | head -n 1 @@ -131,6 +131,7 @@ jobs: run: | set -e cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" + echo "$ARM_GCC_DIR" cmake --preset project -S target/brd2601b/ml_blink_cmake cmake --build target/brd2601b/ml_blink_cmake/build From 944bf94cc3e972902762fd3c85645264ced1b1f2 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 15:35:54 +0530 Subject: [PATCH 045/101] update CI latest0335 --- .github/workflows/CI.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c16e221..ed98954 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -120,33 +120,23 @@ jobs: cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" slc generate -d target/brd2601b -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" echo "==> Generation complete." - cd target - tree - - - # Reconfigure and build with the ARM toolchain - # Reconfigure and build with the ARM toolchain - - name: Build ml_blink (ARM toolchain) - shell: bash - run: | - set -e - cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - echo "$ARM_GCC_DIR" cmake --preset project -S target/brd2601b/ml_blink_cmake cmake --build target/brd2601b/ml_blink_cmake/build - - + cd target + tree # --- Verify expected outputs exist --- - name: Verify output files shell: bash run: | set -e - OUT_DIR="$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink/target/brd2601b/cmake_gcc/build/base" + OUT_DIR=path=$(find ./target -type f -name "*.s37" -exec dirname {} \; | head -n 1) + echo "==> Checking outputs in: $OUT_DIR" + ls -la "$OUT_DIR" || { echo "!! Output dir missing"; exit 1; } - required=("ml_blink.out" "ml_blink.bin" "ml_blink.hex" "ml_blink.s37" "ml_blink.map") + required=("*.out" "*.bin" "*.hex" "*.s37" "*.map") missing=0 for f in "${required[@]}"; do if [ ! -f "$OUT_DIR/$f" ]; then From 8ed2b3d997d5b66761edb809d5b758191d17dd1e Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 15:43:27 +0530 Subject: [PATCH 046/101] update CI latest0343 --- .github/workflows/CI.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ed98954..58fd288 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -124,29 +124,27 @@ jobs: cmake --build target/brd2601b/ml_blink_cmake/build cd target tree - - # --- Verify expected outputs exist --- - - name: Verify output files - shell: bash - run: | - set -e + OUT_DIR=path=$(find ./target -type f -name "*.s37" -exec dirname {} \; | head -n 1) - echo "==> Checking outputs in: $OUT_DIR" - ls -la "$OUT_DIR" || { echo "!! Output dir missing"; exit 1; } - required=("*.out" "*.bin" "*.hex" "*.s37" "*.map") missing=0 for f in "${required[@]}"; do if [ ! -f "$OUT_DIR/$f" ]; then echo "!! Missing: $f"; missing=1 else - echo "βœ” Found: $f ($(stat -c %s "$OUT_DIR/$f") bytes)" + echo "Found: $f ($(stat -c %s "$OUT_DIR/$f") bytes)" fi done [ $missing -eq 0 ] || { echo "!! One or more build outputs are missing"; exit 1; } + # --- Verify expected outputs exist --- + - name: Verify output files + shell: bash + run: | + set -e + - name: Done (stop after SLC setup) shell: bash run: | From e25161c416b867fd3d4798e668a0b399a070bbd9 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 15:49:36 +0530 Subject: [PATCH 047/101] update CI latest0349 --- .github/workflows/CI.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 58fd288..a02c325 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -122,10 +122,11 @@ jobs: echo "==> Generation complete." cmake --preset project -S target/brd2601b/ml_blink_cmake cmake --build target/brd2601b/ml_blink_cmake/build + cd target tree - OUT_DIR=path=$(find ./target -type f -name "*.s37" -exec dirname {} \; | head -n 1) + OUT_DIR=path=$(find . -type f -name "*.s37" -exec dirname {} \; | head -n 1) echo "==> Checking outputs in: $OUT_DIR" ls -la "$OUT_DIR" || { echo "!! Output dir missing"; exit 1; } required=("*.out" "*.bin" "*.hex" "*.s37" "*.map") @@ -139,6 +140,7 @@ jobs: done [ $missing -eq 0 ] || { echo "!! One or more build outputs are missing"; exit 1; } + # --- Verify expected outputs exist --- - name: Verify output files shell: bash From 91267b4c2eb658001b82c902c7508f6a9ff82740 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 15:57:03 +0530 Subject: [PATCH 048/101] update CI latest0357 --- .github/workflows/CI.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a02c325..4f851a4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -126,7 +126,7 @@ jobs: cd target tree - OUT_DIR=path=$(find . -type f -name "*.s37" -exec dirname {} \; | head -n 1) + OUT_DIR=$(find . -type f -name "*.s37" -exec dirname {} \; | head -n 1) echo "==> Checking outputs in: $OUT_DIR" ls -la "$OUT_DIR" || { echo "!! Output dir missing"; exit 1; } required=("*.out" "*.bin" "*.hex" "*.s37" "*.map") @@ -140,14 +140,7 @@ jobs: done [ $missing -eq 0 ] || { echo "!! One or more build outputs are missing"; exit 1; } - - # --- Verify expected outputs exist --- - - name: Verify output files - shell: bash - run: | - set -e - - - name: Done (stop after SLC setup) + - name: Done shell: bash run: | - echo "==> Finished through step 16 (SLC setup)." \ No newline at end of file + echo "==> Finished ENV setup and ml_blink generation." \ No newline at end of file From 29d0350fb9a364b9c4bc3184cb9f6708fcd200a1 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 16:07:25 +0530 Subject: [PATCH 049/101] update CI latest0407 --- .github/workflows/CI.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4f851a4..bb2b74e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -128,17 +128,21 @@ jobs: OUT_DIR=$(find . -type f -name "*.s37" -exec dirname {} \; | head -n 1) echo "==> Checking outputs in: $OUT_DIR" - ls -la "$OUT_DIR" || { echo "!! Output dir missing"; exit 1; } + shopt -s nullglob required=("*.out" "*.bin" "*.hex" "*.s37" "*.map") missing=0 - for f in "${required[@]}"; do - if [ ! -f "$OUT_DIR/$f" ]; then - echo "!! Missing: $f"; missing=1 + for pattern in "${required[@]}"; do + matches=("$OUT_DIR"/$pattern) + if ((${#matches[@]} == 0)); then + echo "Missing file : $pattern" + missing=1 else - echo "Found: $f ($(stat -c %s "$OUT_DIR/$f") bytes)" + for f in "${matches[@]}"; do + echo "Found: $(basename "$f") ($(stat -c %s "$f") bytes)" + done fi done - [ $missing -eq 0 ] || { echo "!! One or more build outputs are missing"; exit 1; } + ((missing == 0)) || { echo "!! One or more build outputs are missing"; exit 1; } - name: Done shell: bash From 9e2c029c85c4d937da18682861d49cfd19b3eeb0 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 19:32:12 +0530 Subject: [PATCH 050/101] Latest CI 0732 --- .github/workflows/CI.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bb2b74e..d56575c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -144,6 +144,28 @@ jobs: done ((missing == 0)) || { echo "!! One or more build outputs are missing"; exit 1; } + - name: Copy repo into GSDK extensions folder + shell: bash + run: | + set -e + EXT_DIR="$HOME/src/gsdk/extension" + cp -r "$GITHUB_WORKSPACE" "$EXT_DIR/machine_learning_applications" + + # Verify placement + cd "$EXT_DIR/machine_learning_applications" + tree -L 4 + + - name: Generate & build ble_magic_wand + shell: bash + run: | + set -e + cd "$HOME/src/gsdk/extension/machine_learning_applications/application/imu/ble_magic_wand" + slc generate -d target/brd2601b -p ble_magic_wand.slcp --with brd2601b -s "$HOME/src/gsdk" + cmake --preset project -S target/brd2601b/ble_magic_wand_cmake + cmake --build target/brd2601b/ble_magic_wand_cmake/build + + + - name: Done shell: bash run: | From 45c6e917e8512cdec44f48489da45933b2dcf58c Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 19:39:47 +0530 Subject: [PATCH 051/101] update CI latest0739 --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d56575c..13844ea 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -150,6 +150,7 @@ jobs: set -e EXT_DIR="$HOME/src/gsdk/extension" cp -r "$GITHUB_WORKSPACE" "$EXT_DIR/machine_learning_applications" + slc signature trust --extension-path ~/src/gsdk/extension/machine_learning_applications # Verify placement cd "$EXT_DIR/machine_learning_applications" From 572d79eb5e793091988bf7b5dfb27d9a9fadba21 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 13:48:34 +0530 Subject: [PATCH 052/101] update CI latest0148 --- .github/workflows/CI.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 13844ea..f38cdc2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -8,6 +8,19 @@ permissions: jobs: setup-to-slc: runs-on: ubuntu-22.04 + strategy: + matrix: + ml_app: [ + ml_blink, + ml_audio_classifier, + ml_voice_control_light, + ml_model_profiler, + ml_image_classifier, + ] + board: [ + "brd2601b", + # "brd2608a" + ] steps: - name: Start shell: bash @@ -166,6 +179,18 @@ jobs: cmake --build target/brd2601b/ble_magic_wand_cmake/build + - name: Generate AI-ML repo apps + shell: bash + run: | + set -e + cd "$HOME/src/gsdk/extension/aiml-extension/examples" + cd ${{ matrix.ml_app }} + slc generate -d target/${{ matrix.ml_app }}/${{ matrix.board }} -p ${{ matrix.ml_app }}.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" + echo "==> Generation complete for ${{ matrix.ml_app }}" + cmake --preset project -S target/${{ matrix.ml_app }}/${{ matrix.board }}/${{ matrix.ml_app }}_cmake + cmake --build target/${{ matrix.ml_app }}/${{ matrix.board }}/${{ matrix.ml_app }}_cmake/build + echo "==> Building complete for ${{ matrix.ml_app }}" + - name: Done shell: bash From f9f54bf816e143f65312b55e48820cb2cda5344e Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 13:54:12 +0530 Subject: [PATCH 053/101] Latest CI 154 --- .github/workflows/CI.yml | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f38cdc2..18cb676 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,12 +10,17 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - ml_app: [ - ml_blink, - ml_audio_classifier, - ml_voice_control_light, - ml_model_profiler, - ml_image_classifier, + domain: [ + imu, + people_flow_counter, + sensory_wakeupword/app, + ] + machine_app: [ + ble_magic_wand, + imu_anomaly_detection, + people_flow_counter_mlx90640, + sensory_wakeupword_series_1, + sensory_wakeupword_series_2, ] board: [ "brd2601b", @@ -178,18 +183,18 @@ jobs: cmake --preset project -S target/brd2601b/ble_magic_wand_cmake cmake --build target/brd2601b/ble_magic_wand_cmake/build - - - name: Generate AI-ML repo apps + - name: Generate Machine Learning Repo apps shell: bash run: | set -e - cd "$HOME/src/gsdk/extension/aiml-extension/examples" - cd ${{ matrix.ml_app }} - slc generate -d target/${{ matrix.ml_app }}/${{ matrix.board }} -p ${{ matrix.ml_app }}.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" - echo "==> Generation complete for ${{ matrix.ml_app }}" - cmake --preset project -S target/${{ matrix.ml_app }}/${{ matrix.board }}/${{ matrix.ml_app }}_cmake - cmake --build target/${{ matrix.ml_app }}/${{ matrix.board }}/${{ matrix.ml_app }}_cmake/build - echo "==> Building complete for ${{ matrix.ml_app }}" + cd "$HOME/src/gsdk/extension/machine_learning_applications/application" + cd ${{ matrix.domain }}/${{ matrix.machine_app }} + slc generate -d target/${{ matrix.machine_app }}/${{ matrix.board }} -p ${{ matrix.machine_app }}.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" + echo "==> Generation complete for ${{ matrix.machine_app }}" + cmake --preset project -S target/${{ matrix.machine_app }}/${{ matrix.board }}/${{ matrix.machine_app }}_cmake + cmake --build target/${{ matrix.machine_app }}/${{ matrix.board }}/${{ matrix.machine_app }}_cmake/build + echo "==> Building complete for ${{ matrix.machine_app }}" + - name: Done From 628fac71b46b15f9631cfb45da5f365ae3a234a4 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 14:04:54 +0530 Subject: [PATCH 054/101] update CI latest204 --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 18cb676..0faceb2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,8 +7,9 @@ permissions: jobs: setup-to-slc: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest strategy: + fail-fast: false matrix: domain: [ imu, From 328f9f4e95f96ca9557bc1849b12f08a78c21169 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 14:20:20 +0530 Subject: [PATCH 055/101] Latest CI 220 --- .github/workflows/CI.yml | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 0faceb2..3d1dce0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,22 +11,17 @@ jobs: strategy: fail-fast: false matrix: - domain: [ - imu, - people_flow_counter, - sensory_wakeupword/app, - ] - machine_app: [ - ble_magic_wand, - imu_anomaly_detection, - people_flow_counter_mlx90640, - sensory_wakeupword_series_1, - sensory_wakeupword_series_2, - ] board: [ "brd2601b", # "brd2608a" ] + env: + ML_APPS: | + imu/ble_magic_wand + imu/imu_anomaly_detection + people_flow_counter/people_flow_counter_mlx90640 + sensory_wakeupword/app/sensory_wakeupword_series_1 + sensory_wakeupword/app/sensory_wakeupword_series_2 steps: - name: Start shell: bash @@ -189,13 +184,16 @@ jobs: run: | set -e cd "$HOME/src/gsdk/extension/machine_learning_applications/application" - cd ${{ matrix.domain }}/${{ matrix.machine_app }} - slc generate -d target/${{ matrix.machine_app }}/${{ matrix.board }} -p ${{ matrix.machine_app }}.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" - echo "==> Generation complete for ${{ matrix.machine_app }}" - cmake --preset project -S target/${{ matrix.machine_app }}/${{ matrix.board }}/${{ matrix.machine_app }}_cmake - cmake --build target/${{ matrix.machine_app }}/${{ matrix.board }}/${{ matrix.machine_app }}_cmake/build - echo "==> Building complete for ${{ matrix.machine_app }}" - + pwd + tree -L 3 + for APP in $ML_APPS; do + slc generate -d target/$APP/${{ matrix.board }} -p $APP.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" + echo "==> Generation complete for $APP" + cmake --preset project -S target/$APP/${{ matrix.board }}/${APP}_cmake + cmake --build target/$APP/${{ matrix.board }}/${APP}_cmake/build + echo "==> Building complete for $APP" + done + tree - name: Done From 0ab8d9c5f6aa7e499e80a9ef6b97c75e675e5f18 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 14:30:03 +0530 Subject: [PATCH 056/101] update CI latest229 --- .github/workflows/CI.yml | 65 +++++----------------------------------- 1 file changed, 8 insertions(+), 57 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3d1dce0..65cef3f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,11 +17,11 @@ jobs: ] env: ML_APPS: | - imu/ble_magic_wand - imu/imu_anomaly_detection - people_flow_counter/people_flow_counter_mlx90640 - sensory_wakeupword/app/sensory_wakeupword_series_1 - sensory_wakeupword/app/sensory_wakeupword_series_2 + 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 steps: - name: Start shell: bash @@ -51,6 +51,7 @@ jobs: python3 python3-pip python3-venv pkg-config \ libssl-dev libffi-dev python3-dev ninja-build \ telnet netcat-openbsd tree + - name: Use Java 21 uses: actions/setup-java@v4 with: @@ -79,6 +80,8 @@ jobs: shell: bash run: | set -e + EXT_DIR="$HOME/src/gsdk/extension" + cp -r "$GITHUB_WORKSPACE" "$EXT_DIR/machine_learning_applications" cd "$HOME/src" echo "==> Cloning public GSDK" git clone https://github.com/SiliconLabs/simplicity_sdk.git gsdk @@ -125,60 +128,8 @@ jobs: slc configuration --sdk ~/src/gsdk slc signature trust --sdk ~/src/gsdk slc signature trust --extension-path ~/src/gsdk/extension/aiml-extension - - # --- Generate the ml_blink example for brd2601b --- - - name: Generate ml_blink (brd2601b) - shell: bash - run: | - set -e - cd "$HOME/src/gsdk/extension/aiml-extension/examples/ml_blink" - slc generate -d target/brd2601b -p ml_blink.slcp --with brd2601b -s "$HOME/src/gsdk" - echo "==> Generation complete." - cmake --preset project -S target/brd2601b/ml_blink_cmake - cmake --build target/brd2601b/ml_blink_cmake/build - - cd target - tree - - OUT_DIR=$(find . -type f -name "*.s37" -exec dirname {} \; | head -n 1) - echo "==> Checking outputs in: $OUT_DIR" - shopt -s nullglob - required=("*.out" "*.bin" "*.hex" "*.s37" "*.map") - missing=0 - for pattern in "${required[@]}"; do - matches=("$OUT_DIR"/$pattern) - if ((${#matches[@]} == 0)); then - echo "Missing file : $pattern" - missing=1 - else - for f in "${matches[@]}"; do - echo "Found: $(basename "$f") ($(stat -c %s "$f") bytes)" - done - fi - done - ((missing == 0)) || { echo "!! One or more build outputs are missing"; exit 1; } - - - name: Copy repo into GSDK extensions folder - shell: bash - run: | - set -e - EXT_DIR="$HOME/src/gsdk/extension" - cp -r "$GITHUB_WORKSPACE" "$EXT_DIR/machine_learning_applications" slc signature trust --extension-path ~/src/gsdk/extension/machine_learning_applications - # Verify placement - cd "$EXT_DIR/machine_learning_applications" - tree -L 4 - - - name: Generate & build ble_magic_wand - shell: bash - run: | - set -e - cd "$HOME/src/gsdk/extension/machine_learning_applications/application/imu/ble_magic_wand" - slc generate -d target/brd2601b -p ble_magic_wand.slcp --with brd2601b -s "$HOME/src/gsdk" - cmake --preset project -S target/brd2601b/ble_magic_wand_cmake - cmake --build target/brd2601b/ble_magic_wand_cmake/build - - name: Generate Machine Learning Repo apps shell: bash run: | From 870290310ba9015a7606bf2d516235b91728da3c Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 14:35:50 +0530 Subject: [PATCH 057/101] Latest CI 235 --- .github/workflows/CI.yml | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 65cef3f..e40aeff 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,25 +23,11 @@ jobs: voice/sensory_wakeupword/app/sensory_wakeupword_series_1 voice/sensory_wakeupword/app/sensory_wakeupword_series_2 steps: - - name: Start - shell: bash - run: | - echo "==> Workflow: Ubuntu env -> SLC setup (through step 16)" - echo "==> Repo: $GITHUB_REPOSITORY | Ref: $GITHUB_REF | SHA: $GITHUB_SHA" - - name: Checkout (public) uses: actions/checkout@v5 with: submodules: recursive - - name: Create ~/src ~/venvs ~/tools - shell: bash - run: | - set -e - echo "==> Creating developer directories..." - mkdir -p "$HOME/src" "$HOME/venvs" "$HOME/tools" - ls -la "$HOME" | sed -n '1,120p' - - name: Apt update & essentials shell: bash run: | @@ -51,7 +37,7 @@ jobs: python3 python3-pip python3-venv pkg-config \ libssl-dev libffi-dev python3-dev ninja-build \ telnet netcat-openbsd tree - + - name: Use Java 21 uses: actions/setup-java@v4 with: @@ -80,8 +66,8 @@ jobs: shell: bash run: | set -e - EXT_DIR="$HOME/src/gsdk/extension" - cp -r "$GITHUB_WORKSPACE" "$EXT_DIR/machine_learning_applications" + echo "==> Creating developer directories..." + mkdir -p "$HOME/src" "$HOME/venvs" "$HOME/tools" cd "$HOME/src" echo "==> Cloning public GSDK" git clone https://github.com/SiliconLabs/simplicity_sdk.git gsdk @@ -93,6 +79,7 @@ jobs: cd aiml-extension git checkout v2.1.2 git submodule update --init --recursive + cp -r "$GITHUB_WORKSPACE" "$HOME/src/gsdk/extension/machine_learning_applications" git lfs pull || true - name: Create Python venv (sisdk) @@ -150,4 +137,4 @@ jobs: - name: Done shell: bash run: | - echo "==> Finished ENV setup and ml_blink generation." \ No newline at end of file + echo "==> Finished ENV setup and ML APP's generation." \ No newline at end of file From 5158e73a5a9114d12e372b9174b72d5a4844629d Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 14:39:44 +0530 Subject: [PATCH 058/101] Latest CI 239 --- .github/workflows/CI.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e40aeff..b483a35 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -44,24 +44,7 @@ jobs: distribution: temurin java-version: '21' check-latest: true - - - name: ARM GCC toolchain (12.2.rel1) - shell: bash - run: | - set -e - cd "$HOME/tools" - echo "==> Download ARM toolchain 12.2.rel1" - wget -q https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz - tar xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz - rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz - mv arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi armgnu - TOOLROOT="$HOME/tools/armgnu" - echo "ARM_GCC_DIR=$TOOLROOT" >> "$GITHUB_ENV" - echo "$TOOLROOT/bin/" >> "$GITHUB_PATH" - - echo "==> GCC version" - "$TOOLROOT/bin/arm-none-eabi-gcc" --version | head -n 1 - + - name: Clone GSDK and ai-ml app shell: bash run: | @@ -79,8 +62,25 @@ jobs: cd aiml-extension git checkout v2.1.2 git submodule update --init --recursive - cp -r "$GITHUB_WORKSPACE" "$HOME/src/gsdk/extension/machine_learning_applications" git lfs pull || true + cp -r "$GITHUB_WORKSPACE" "$HOME/src/gsdk/extension/machine_learning_applications" + + - name: ARM GCC toolchain (12.2.rel1) + shell: bash + run: | + set -e + cd "$HOME/tools" + echo "==> Download ARM toolchain 12.2.rel1" + wget -q https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz + tar xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz + rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz + mv arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi armgnu + TOOLROOT="$HOME/tools/armgnu" + echo "ARM_GCC_DIR=$TOOLROOT" >> "$GITHUB_ENV" + echo "$TOOLROOT/bin/" >> "$GITHUB_PATH" + + echo "==> GCC version" + "$TOOLROOT/bin/arm-none-eabi-gcc" --version | head -n 1 - name: Create Python venv (sisdk) shell: bash From 0a13b28e535ec474db49ac1452e62ae34ab18545 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 15:01:15 +0530 Subject: [PATCH 059/101] update CI latest301 --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b483a35..9ba3938 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -127,8 +127,8 @@ jobs: for APP in $ML_APPS; do slc generate -d target/$APP/${{ matrix.board }} -p $APP.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" echo "==> Generation complete for $APP" - cmake --preset project -S target/$APP/${{ matrix.board }}/${APP}_cmake - cmake --build target/$APP/${{ matrix.board }}/${APP}_cmake/build + cmake --preset project -S target/$APP/${{ matrix.board }}_cmake + cmake --build target/$APP/${{ matrix.board }}_cmake/build echo "==> Building complete for $APP" done tree From cfb3bb9633686b9dbea1ee4a071fb52b9ba2b8bd Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 15:08:52 +0530 Subject: [PATCH 060/101] Latest CI 2395 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9ba3938..6dd6cf9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -125,7 +125,7 @@ jobs: pwd tree -L 3 for APP in $ML_APPS; do - slc generate -d target/$APP/${{ matrix.board }} -p $APP.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" + slc generate -d target/$APP -p $APP.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" echo "==> Generation complete for $APP" cmake --preset project -S target/$APP/${{ matrix.board }}_cmake cmake --build target/$APP/${{ matrix.board }}_cmake/build From 53c8819f21f5464c6f7ffa8c442f71f306e7910d Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 15:22:43 +0530 Subject: [PATCH 061/101] Latest CI 322 --- .github/workflows/CI.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6dd6cf9..dae1370 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -123,12 +123,12 @@ jobs: set -e cd "$HOME/src/gsdk/extension/machine_learning_applications/application" pwd - tree -L 3 for APP in $ML_APPS; do - slc generate -d target/$APP -p $APP.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" + slc generate -d target/$APP/${{ matrix.board }} -p $APP.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" echo "==> Generation complete for $APP" - cmake --preset project -S target/$APP/${{ matrix.board }}_cmake - cmake --build target/$APP/${{ matrix.board }}_cmake/build + tree + cmake --preset project -S target/$APP/${{ matrix.board }}/${APP##*/}_cmake + cmake --build target/$APP/${{ matrix.board }}/${APP##*/}_cmake/build echo "==> Building complete for $APP" done tree From 3d0ab109cb84c68bde6e1eff9baf81f04b031f25 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 15:35:03 +0530 Subject: [PATCH 062/101] update CI latest335 --- .github/workflows/CI.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index dae1370..7ac7b10 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -126,12 +126,11 @@ jobs: for APP in $ML_APPS; do slc generate -d target/$APP/${{ matrix.board }} -p $APP.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" echo "==> Generation complete for $APP" - tree cmake --preset project -S target/$APP/${{ matrix.board }}/${APP##*/}_cmake cmake --build target/$APP/${{ matrix.board }}/${APP##*/}_cmake/build echo "==> Building complete for $APP" done - tree + find . -name "*.s37" - name: Done From 2501c210dc61a9d59b270eacbb68724b3bc9e09c Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 15:55:37 +0530 Subject: [PATCH 063/101] Latest CI 355 --- .github/workflows/CI.yml | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7ac7b10..060546e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -8,13 +8,6 @@ permissions: jobs: setup-to-slc: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - board: [ - "brd2601b", - # "brd2608a" - ] env: ML_APPS: | imu/ble_magic_wand/ble_magic_wand @@ -22,6 +15,9 @@ jobs: 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 + BOARDS: | + brd2601b + # brd2608a steps: - name: Checkout (public) uses: actions/checkout@v5 @@ -38,7 +34,7 @@ jobs: libssl-dev libffi-dev python3-dev ninja-build \ telnet netcat-openbsd tree - - name: Use Java 21 + - name: Java 21 uses: actions/setup-java@v4 with: distribution: temurin @@ -122,15 +118,17 @@ jobs: run: | set -e cd "$HOME/src/gsdk/extension/machine_learning_applications/application" - pwd - for APP in $ML_APPS; do - slc generate -d target/$APP/${{ matrix.board }} -p $APP.slcp --with ${{ matrix.board }} -s "$HOME/src/gsdk" - echo "==> Generation complete for $APP" - cmake --preset project -S target/$APP/${{ matrix.board }}/${APP##*/}_cmake - cmake --build target/$APP/${{ matrix.board }}/${APP##*/}_cmake/build - echo "==> Building complete for $APP" - done - find . -name "*.s37" + for board in $BOARDS; do + for APP in $ML_APPS; do + slc generate -d target/$APP/$board -p $APP.slcp --with $board -s "$HOME/src/gsdk" + echo "==> Generation complete for $APP" + cmake --preset project -S target/$APP/$board/${APP##*/}_cmake + cmake --build target/$APP/$board/${APP##*/}_cmake/build + echo "==> Building complete for $APP" + done + done + echo "==> Listing generated .s37 files" + find ./target -name "*.s37" - name: Done From 5693729843ddc1b0c4e8fa1d516ea840b971d07a Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 16:04:23 +0530 Subject: [PATCH 064/101] Latest CI 404 --- .github/workflows/CI.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 060546e..c32fca3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,7 +17,6 @@ jobs: voice/sensory_wakeupword/app/sensory_wakeupword_series_2 BOARDS: | brd2601b - # brd2608a steps: - name: Checkout (public) uses: actions/checkout@v5 From 096a1d6b036d69210cf1d679055cf890751f0169 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:04:10 +0530 Subject: [PATCH 065/101] update CI latest404 --- .github/workflows/CI.yml | 188 +++++++++++++++++---------------------- 1 file changed, 82 insertions(+), 106 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c32fca3..44f2e69 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,131 +6,107 @@ permissions: contents: read jobs: - setup-to-slc: + prepare-sdk-and-tools: runs-on: ubuntu-latest - env: - ML_APPS: | - 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 - BOARDS: | - brd2601b steps: - - name: Checkout (public) + - name: Prepare folders + run: | + set -e + mkdir -p src/gsdk/extension + + - name: Checkout Simplicity SDK uses: actions/checkout@v5 with: + repository: SiliconLabs/simplicity_sdk + ref: v2025.6.2 + path: src/gsdk submodules: recursive + + - name: Checkout machine_learning_applications (this repo) + uses: actions/checkout@v5 + with: + path: src/gsdk/extension/machine_learning_applications - - name: Apt update & essentials - shell: bash - run: | - set -e - sudo apt update -y - sudo apt install -y git curl wget unzip build-essential cmake make \ - python3 python3-pip python3-venv pkg-config \ - libssl-dev libffi-dev python3-dev ninja-build \ - telnet netcat-openbsd tree - - - name: Java 21 - uses: actions/setup-java@v4 + - name: Checkout AI/ML extension + uses: actions/checkout@v5 with: - distribution: temurin - java-version: '21' - check-latest: true - - - name: Clone GSDK and ai-ml app - shell: bash - run: | - set -e - echo "==> Creating developer directories..." - mkdir -p "$HOME/src" "$HOME/venvs" "$HOME/tools" - cd "$HOME/src" - echo "==> Cloning public GSDK" - git clone https://github.com/SiliconLabs/simplicity_sdk.git gsdk - cd "$HOME/src/gsdk" - git checkout v2025.6.2 - mkdir extension - cd extension - git clone --recurse-submodules https://github.com/SiliconLabsSoftware/aiml-extension.git aiml-extension - cd aiml-extension - git checkout v2.1.2 - git submodule update --init --recursive - git lfs pull || true - cp -r "$GITHUB_WORKSPACE" "$HOME/src/gsdk/extension/machine_learning_applications" + repository: SiliconLabsSoftware/aiml-extension + ref: v2.1.2 + path: src/gsdk/extension/aiml-extension + submodules: recursive + lfs: true - - name: ARM GCC toolchain (12.2.rel1) - shell: bash + - name: Download ARM-GNU and SLC toolchain run: | - set -e - cd "$HOME/tools" - echo "==> Download ARM toolchain 12.2.rel1" + mkdir -p tools && cd tools wget -q https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz - tar xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz - rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz + tar -xf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz mv arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi armgnu - TOOLROOT="$HOME/tools/armgnu" - echo "ARM_GCC_DIR=$TOOLROOT" >> "$GITHUB_ENV" - echo "$TOOLROOT/bin/" >> "$GITHUB_PATH" + rm arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz + wget -q https://www.silabs.com/documents/public/software/slc_cli_linux.zip + unzip -q slc_cli_linux.zip -d slc_cli + rm slc_cli_linux.zip - echo "==> GCC version" - "$TOOLROOT/bin/arm-none-eabi-gcc" --version | head -n 1 + - name: Upload prepared sources + uses: actions/upload-artifact@v5 + with: + name: gsdk-and-tools + path: | + src/ + tools/ + include-hidden-files: true - - name: Create Python venv (sisdk) - shell: bash - run: | - set -e - python3 -m venv "$HOME/venvs/sisdk" - source "$HOME/venvs/sisdk/bin/activate" - python -V; pip -V - echo "==> Upgrading pip" - pip install --upgrade pip + build-ml: + runs-on: ubuntu-latest + needs: prepare-sdk-and-tools + strategy: + fail-fast: false + matrix: + 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 - - name: SLC setup - shell: bash + steps: + - name: Download prepared sources + uses: actions/download-artifact@v4 + with: + name: gsdk-and-tools + path: . + + - name: Configure SLC,ARM-GNU, JAVA paths and trust sdk's run: | - set -e - echo "SLC_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" - mkdir -p "$HOME/tools" - cd "$HOME/tools" - curl -fsSL -o slc_cli_linux.zip https://www.silabs.com/documents/public/software/slc_cli_linux.zip - rm -rf slc_cli - unzip -q slc_cli_linux.zip -d slc_cli - rm slc_cli_linux.zip - SLC_DIR="$HOME/tools/slc_cli/slc_cli/bin/slc-cli" + echo "ARM_GCC_DIR=~/tools/armgnu" >> "$GITHUB_ENV" + echo "~/tools/armgnu/bin/" >> "$GITHUB_PATH" + + SLC_DIR="~/tools/slc_cli/slc_cli/bin/slc-cli" chmod +x "$SLC_DIR/slc-cli" ln -sf "$SLC_DIR/slc-cli" "$SLC_DIR/slc" - echo "UC_CLI_DIR=$SLC_DIR" >> "$GITHUB_ENV" - echo "$SLC_DIR" >> "$GITHUB_PATH" + echo "UC_CLI_DIR=$SLC_DIR" >> "$GITHUB_ENV" + echo "$SLC_DIR" >> "$GITHUB_PATH" - - name: Configure and trust SDK - shell: bash - run: | - slc configuration --sdk ~/src/gsdk - slc signature trust --sdk ~/src/gsdk - slc signature trust --extension-path ~/src/gsdk/extension/aiml-extension - slc signature trust --extension-path ~/src/gsdk/extension/machine_learning_applications + echo "SLC_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" - - name: Generate Machine Learning Repo apps - shell: bash + slc configuration --sdk "~/src/gsdk" + slc signature trust --sdk "~/src/gsdk" + slc signature trust --extension-path "~/src/gsdk/extension/aiml-extension" + slc signature trust --extension-path "~/src/gsdk/extension/machine_learning_applications" + + - name: Generate + Build + working-directory: ~/src/gsdk/extension/machine_learning_applications/application run: | set -e - cd "$HOME/src/gsdk/extension/machine_learning_applications/application" - for board in $BOARDS; do - for APP in $ML_APPS; do - slc generate -d target/$APP/$board -p $APP.slcp --with $board -s "$HOME/src/gsdk" - echo "==> Generation complete for $APP" - cmake --preset project -S target/$APP/$board/${APP##*/}_cmake - cmake --build target/$APP/$board/${APP##*/}_cmake/build - echo "==> Building complete for $APP" - done - done - echo "==> Listing generated .s37 files" - find ./target -name "*.s37" - + slc generate -d target/${{ matrix.app }}/${{ matrix.board }} -p ${{ matrix.app }}.slcp --with ${{ matrix.board }} -s "~/src/gsdk" + cmake --preset project -S target/${{ matrix.app }}/${{ matrix.board }}/${{ matrix.app##*/}}_cmake + cmake --build target/${{ matrix.app }}/${{ matrix.board }}/{{ matrix.app##*/}}_cmake/build --parallel - - name: Done - shell: bash - run: | - echo "==> Finished ENV setup and ML APP's generation." \ No newline at end of file + - name: Upload artifacts (.s37) + uses: actions/upload-artifact@v5 + with: + name: ${{ matrix.board }}-${{ matrix.app##*/ }} + path: | + ~/src/gsdk/extension/machine_learning_applications/application/target/${{ matrix.app }}/${{ matrix.board }}/**/*.s37 + if-no-files-found: warn From a82345521eaddffd205783865a7df2dc0063cc06 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:07:00 +0530 Subject: [PATCH 066/101] Latest CI 405 --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 44f2e69..68bf49e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -100,8 +100,8 @@ jobs: run: | set -e slc generate -d target/${{ matrix.app }}/${{ matrix.board }} -p ${{ matrix.app }}.slcp --with ${{ matrix.board }} -s "~/src/gsdk" - cmake --preset project -S target/${{ matrix.app }}/${{ matrix.board }}/${{ matrix.app##*/}}_cmake - cmake --build target/${{ matrix.app }}/${{ matrix.board }}/{{ matrix.app##*/}}_cmake/build --parallel + cmake --preset project -S target/${{ matrix.app }}/${{ matrix.board }}/${{ matrix.app }##*/}_cmake + cmake --build target/${{ matrix.app }}/${{ matrix.board }}/{{ matrix.app }##*/}_cmake/build --parallel - name: Upload artifacts (.s37) uses: actions/upload-artifact@v5 From 8c26c7fc107528c50af438d15d0817a82ff0b073 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:10:59 +0530 Subject: [PATCH 067/101] Latest CI 410 --- .github/workflows/CI.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 68bf49e..f868e36 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -97,16 +97,19 @@ jobs: - name: Generate + Build working-directory: ~/src/gsdk/extension/machine_learning_applications/application + env: + APP: ${{ matrix.app }} + BOARD: ${{ matrix.board }} run: | set -e - slc generate -d target/${{ matrix.app }}/${{ matrix.board }} -p ${{ matrix.app }}.slcp --with ${{ matrix.board }} -s "~/src/gsdk" - cmake --preset project -S target/${{ matrix.app }}/${{ matrix.board }}/${{ matrix.app }##*/}_cmake - cmake --build target/${{ matrix.app }}/${{ matrix.board }}/{{ matrix.app }##*/}_cmake/build --parallel + slc generate -d target/$APP/$BOARD -p $APP.slcp --with $BOARD -s "~/src/gsdk" + cmake --preset project -S target/$APP/$BOARD/${APP##*/}_cmake + cmake --build target/$APP/$BOARD/${APP##*/}_cmake/build --parallel - name: Upload artifacts (.s37) uses: actions/upload-artifact@v5 with: - name: ${{ matrix.board }}-${{ matrix.app##*/ }} + name: $BOARD-${{ matrix.app##*/ }} path: | - ~/src/gsdk/extension/machine_learning_applications/application/target/${{ matrix.app }}/${{ matrix.board }}/**/*.s37 + ~/src/gsdk/extension/machine_learning_applications/application/target/${{ matrix.app }}/$BOARD/**/*.s37 if-no-files-found: warn From b411fac38f2890a876073e6439f7e158dbad750a Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:11:49 +0530 Subject: [PATCH 068/101] update CI latest411 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f868e36..4e45c5b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -109,7 +109,7 @@ jobs: - name: Upload artifacts (.s37) uses: actions/upload-artifact@v5 with: - name: $BOARD-${{ matrix.app##*/ }} + name: $BOARD-${{ matrix.app }} path: | ~/src/gsdk/extension/machine_learning_applications/application/target/${{ matrix.app }}/$BOARD/**/*.s37 if-no-files-found: warn From 7e35fa53ff0008b89544780fd45b9a23e87690d5 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:17:11 +0530 Subject: [PATCH 069/101] Latest CI 405 --- .github/workflows/CI.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4e45c5b..d7c5b01 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -79,6 +79,9 @@ jobs: - name: Configure SLC,ARM-GNU, JAVA paths and trust sdk's run: | + set -e + sudo apt install tree + tree -L 3 echo "ARM_GCC_DIR=~/tools/armgnu" >> "$GITHUB_ENV" echo "~/tools/armgnu/bin/" >> "$GITHUB_PATH" From 33f055b15312e4f6b9d6f04a020c78d74ea3464b Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:22:30 +0530 Subject: [PATCH 070/101] Latest CI 404 --- .github/workflows/CI.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d7c5b01..453ba59 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -82,10 +82,10 @@ jobs: set -e sudo apt install tree tree -L 3 - echo "ARM_GCC_DIR=~/tools/armgnu" >> "$GITHUB_ENV" - echo "~/tools/armgnu/bin/" >> "$GITHUB_PATH" + echo "ARM_GCC_DIR=$HOME/tools/armgnu" >> "$GITHUB_ENV" + echo "$HOME/tools/armgnu/bin/" >> "$GITHUB_PATH" - SLC_DIR="~/tools/slc_cli/slc_cli/bin/slc-cli" + SLC_DIR="$HOME/tools/slc_cli/slc_cli/bin/slc-cli" chmod +x "$SLC_DIR/slc-cli" ln -sf "$SLC_DIR/slc-cli" "$SLC_DIR/slc" echo "UC_CLI_DIR=$SLC_DIR" >> "$GITHUB_ENV" @@ -93,19 +93,19 @@ jobs: echo "SLC_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" - slc configuration --sdk "~/src/gsdk" - slc signature trust --sdk "~/src/gsdk" - slc signature trust --extension-path "~/src/gsdk/extension/aiml-extension" - slc signature trust --extension-path "~/src/gsdk/extension/machine_learning_applications" + slc configuration --sdk "$HOME/src/gsdk" + slc signature trust --sdk "$HOME/src/gsdk" + slc signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" + slc signature trust --extension-path "$HOME/src/gsdk/extension/machine_learning_applications" - name: Generate + Build - working-directory: ~/src/gsdk/extension/machine_learning_applications/application + working-directory: $HOME/src/gsdk/extension/machine_learning_applications/application env: APP: ${{ matrix.app }} BOARD: ${{ matrix.board }} run: | set -e - slc generate -d target/$APP/$BOARD -p $APP.slcp --with $BOARD -s "~/src/gsdk" + slc generate -d target/$APP/$BOARD -p $APP.slcp --with $BOARD -s "$HOME/src/gsdk" cmake --preset project -S target/$APP/$BOARD/${APP##*/}_cmake cmake --build target/$APP/$BOARD/${APP##*/}_cmake/build --parallel @@ -114,5 +114,5 @@ jobs: with: name: $BOARD-${{ matrix.app }} path: | - ~/src/gsdk/extension/machine_learning_applications/application/target/${{ matrix.app }}/$BOARD/**/*.s37 + $HOME/src/gsdk/extension/machine_learning_applications/application/target/${{ matrix.app }}/$BOARD/**/*.s37 if-no-files-found: warn From 5ac73720b9fd34135938ac35796f4262d15f9918 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:28:49 +0530 Subject: [PATCH 071/101] Latest CI 355 --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 453ba59..bda90f7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,7 +81,7 @@ jobs: run: | set -e sudo apt install tree - tree -L 3 + tree -L 6 echo "ARM_GCC_DIR=$HOME/tools/armgnu" >> "$GITHUB_ENV" echo "$HOME/tools/armgnu/bin/" >> "$GITHUB_PATH" From e0d3242cdb44e9f20290f18d7849ef12803b4e47 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:36:35 +0530 Subject: [PATCH 072/101] Latest CI 322 --- .github/workflows/CI.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bda90f7..40ecb6d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,11 +81,12 @@ jobs: run: | set -e sudo apt install tree - tree -L 6 - echo "ARM_GCC_DIR=$HOME/tools/armgnu" >> "$GITHUB_ENV" - echo "$HOME/tools/armgnu/bin/" >> "$GITHUB_PATH" + pwd + tree -L 3 + echo "ARM_GCC_DIR=${{ github.workspace }}/tools/armgnu" >> "$GITHUB_ENV" + echo "${{ github.workspace }}/tools/armgnu/bin/" >> "$GITHUB_PATH" - SLC_DIR="$HOME/tools/slc_cli/slc_cli/bin/slc-cli" + SLC_DIR="${{ github.workspace }}/tools/slc_cli/slc_cli/bin/slc-cli" chmod +x "$SLC_DIR/slc-cli" ln -sf "$SLC_DIR/slc-cli" "$SLC_DIR/slc" echo "UC_CLI_DIR=$SLC_DIR" >> "$GITHUB_ENV" @@ -93,19 +94,19 @@ jobs: echo "SLC_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" - slc configuration --sdk "$HOME/src/gsdk" - slc signature trust --sdk "$HOME/src/gsdk" - slc signature trust --extension-path "$HOME/src/gsdk/extension/aiml-extension" - slc signature trust --extension-path "$HOME/src/gsdk/extension/machine_learning_applications" + slc configuration --sdk "${{ github.workspace }}/src/gsdk" + slc signature trust --sdk "${{ github.workspace }}/src/gsdk" + slc signature trust --extension-path "${{ github.workspace }}/src/gsdk/extension/aiml-extension" + slc signature trust --extension-path "${{ github.workspace }}/src/gsdk/extension/machine_learning_applications" - name: Generate + Build - working-directory: $HOME/src/gsdk/extension/machine_learning_applications/application + working-directory: ${{ github.workspace }}/src/gsdk/extension/machine_learning_applications/application env: APP: ${{ matrix.app }} BOARD: ${{ matrix.board }} run: | set -e - slc generate -d target/$APP/$BOARD -p $APP.slcp --with $BOARD -s "$HOME/src/gsdk" + slc generate -d target/$APP/$BOARD -p $APP.slcp --with $BOARD -s "${{ github.workspace }}/src/gsdk" cmake --preset project -S target/$APP/$BOARD/${APP##*/}_cmake cmake --build target/$APP/$BOARD/${APP##*/}_cmake/build --parallel @@ -114,5 +115,5 @@ jobs: with: name: $BOARD-${{ matrix.app }} path: | - $HOME/src/gsdk/extension/machine_learning_applications/application/target/${{ matrix.app }}/$BOARD/**/*.s37 + ${{ github.workspace }}/src/gsdk/extension/machine_learning_applications/application/target/${{ matrix.app }}/$BOARD/**/*.s37 if-no-files-found: warn From ed60e5b22e795624b9224ba14a74240f71977134 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:44:23 +0530 Subject: [PATCH 073/101] update CI latest301 --- .github/workflows/CI.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 40ecb6d..ea23db5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -77,12 +77,9 @@ jobs: name: gsdk-and-tools path: . - - name: Configure SLC,ARM-GNU, JAVA paths and trust sdk's + - name: Configure SLC,ARM-GNU, JAVA paths run: | set -e - sudo apt install tree - pwd - tree -L 3 echo "ARM_GCC_DIR=${{ github.workspace }}/tools/armgnu" >> "$GITHUB_ENV" echo "${{ github.workspace }}/tools/armgnu/bin/" >> "$GITHUB_PATH" @@ -94,6 +91,9 @@ jobs: echo "SLC_JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV" + - name: Trust sdk's + run: | + set -e slc configuration --sdk "${{ github.workspace }}/src/gsdk" slc signature trust --sdk "${{ github.workspace }}/src/gsdk" slc signature trust --extension-path "${{ github.workspace }}/src/gsdk/extension/aiml-extension" From ea4ccb60f204bb67e966f99d240e37592a89571a Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:55:51 +0530 Subject: [PATCH 074/101] Latest CI 239 --- .github/workflows/CI.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ea23db5..8d335d0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -77,9 +77,20 @@ jobs: name: gsdk-and-tools path: . + - name: Install Java 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + check-latest: true + - name: Configure SLC,ARM-GNU, JAVA paths run: | set -e + pwd + echo ${{ github.workspace }} + sudo apt install tree + tree -L 3 echo "ARM_GCC_DIR=${{ github.workspace }}/tools/armgnu" >> "$GITHUB_ENV" echo "${{ github.workspace }}/tools/armgnu/bin/" >> "$GITHUB_PATH" From 8bc40f84e0afac747869af2816956ff5a8f15648 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 17:06:33 +0530 Subject: [PATCH 075/101] Latest CI 2395 --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8d335d0..241f67c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -91,6 +91,7 @@ jobs: echo ${{ github.workspace }} sudo apt install tree tree -L 3 + chmod -R +x ${{ github.workspace }}/tools/armgnu echo "ARM_GCC_DIR=${{ github.workspace }}/tools/armgnu" >> "$GITHUB_ENV" echo "${{ github.workspace }}/tools/armgnu/bin/" >> "$GITHUB_PATH" From 153fbf6e65a4260abb3a55580c212b240e3c5212 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 17:18:15 +0530 Subject: [PATCH 076/101] Latest CI 2395 --- .github/workflows/CI.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 241f67c..c120f94 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -21,6 +21,7 @@ jobs: ref: v2025.6.2 path: src/gsdk submodules: recursive + lfs: true - name: Checkout machine_learning_applications (this repo) uses: actions/checkout@v5 @@ -87,10 +88,6 @@ jobs: - name: Configure SLC,ARM-GNU, JAVA paths run: | set -e - pwd - echo ${{ github.workspace }} - sudo apt install tree - tree -L 3 chmod -R +x ${{ github.workspace }}/tools/armgnu echo "ARM_GCC_DIR=${{ github.workspace }}/tools/armgnu" >> "$GITHUB_ENV" echo "${{ github.workspace }}/tools/armgnu/bin/" >> "$GITHUB_PATH" @@ -121,11 +118,6 @@ jobs: slc generate -d target/$APP/$BOARD -p $APP.slcp --with $BOARD -s "${{ github.workspace }}/src/gsdk" cmake --preset project -S target/$APP/$BOARD/${APP##*/}_cmake cmake --build target/$APP/$BOARD/${APP##*/}_cmake/build --parallel + echo "==> Listing generated .s37 files" + find ./target -name "*.s37" - - name: Upload artifacts (.s37) - uses: actions/upload-artifact@v5 - with: - name: $BOARD-${{ matrix.app }} - path: | - ${{ github.workspace }}/src/gsdk/extension/machine_learning_applications/application/target/${{ matrix.app }}/$BOARD/**/*.s37 - if-no-files-found: warn From b6e4beaa8eb4c4b75dbd86b0424b9f2fb74c1f80 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 17:27:49 +0530 Subject: [PATCH 077/101] update CI latest335 --- .github/workflows/CI.yml | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c120f94..314da2a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -9,34 +9,29 @@ jobs: prepare-sdk-and-tools: runs-on: ubuntu-latest steps: - - name: Prepare folders - run: | + - name: Clone GSDK and ai-ml app + shell: bash + run: | set -e - mkdir -p src/gsdk/extension + mkdir src + echo "==> Creating developer directories..." + cd src + echo "==> Cloning public GSDK" + git clone https://github.com/SiliconLabs/simplicity_sdk.git gsdk + cd gsdk + git checkout v2025.6.2 + cd extension + git clone --recurse-submodules https://github.com/SiliconLabsSoftware/aiml-extension.git aiml-extension + cd aiml-extension + git checkout v2.1.2 + git submodule update --init --recursive + git lfs pull || true - - name: Checkout Simplicity SDK - uses: actions/checkout@v5 - with: - repository: SiliconLabs/simplicity_sdk - ref: v2025.6.2 - path: src/gsdk - submodules: recursive - lfs: true - - name: Checkout machine_learning_applications (this repo) uses: actions/checkout@v5 with: path: src/gsdk/extension/machine_learning_applications - - name: Checkout AI/ML extension - uses: actions/checkout@v5 - with: - repository: SiliconLabsSoftware/aiml-extension - ref: v2.1.2 - path: src/gsdk/extension/aiml-extension - submodules: recursive - lfs: true - - name: Download ARM-GNU and SLC toolchain run: | mkdir -p tools && cd tools From 33df89cc9d9fc1be94601ae329bdbafaced16c49 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 17:32:24 +0530 Subject: [PATCH 078/101] update CI latest335 --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 314da2a..d22489a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -20,6 +20,7 @@ jobs: git clone https://github.com/SiliconLabs/simplicity_sdk.git gsdk cd gsdk git checkout v2025.6.2 + mkdir extension cd extension git clone --recurse-submodules https://github.com/SiliconLabsSoftware/aiml-extension.git aiml-extension cd aiml-extension From fc72f3a3bef642e5d648e348e052a6eddeb1ef9c Mon Sep 17 00:00:00 2001 From: Jeevan revaneppa Hirethanad Date: Wed, 29 Oct 2025 22:10:34 +0530 Subject: [PATCH 079/101] Update .github/workflows/CI.yml Co-authored-by: Raashid Ansari --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d22489a..42e42c2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,4 +1,4 @@ -name: Ubuntu env +name: Continuous Integration for Machine Learning Applications on: [push] permissions: From 788b000871938f9c93f62dca9b6dc9e7c25f5f25 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:23:55 +0530 Subject: [PATCH 080/101] generate apps matrix dynamically based on templates.xml, split uploading and downloading sdk and tools separtely --- .github/workflows/CI.yml | 62 +++++++++++++------- .github/workflows/scripts/generate_matrix.py | 45 ++++++++++++++ 2 files changed, 85 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/scripts/generate_matrix.py diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 42e42c2..50ad7e9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,7 +6,17 @@ permissions: contents: read jobs: - prepare-sdk-and-tools: + generate-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.mk.outputs.matrix }} + steps: + - uses: actions/checkout@v5 + + - name: Generate dynamic matrix from templates.xml + run: .github/scripts/build_matrix.py + + get-sdk: runs-on: ubuntu-latest steps: - name: Clone GSDK and ai-ml app @@ -32,7 +42,17 @@ jobs: uses: actions/checkout@v5 with: path: src/gsdk/extension/machine_learning_applications - + + - name: Upload SDK + uses: actions/upload-artifact@v5 + with: + name: SDK + path: src/ + include-hidden-files: true + + get-tools: + runs-on: ubuntu-latest + steps: - name: Download ARM-GNU and SLC toolchain run: | mkdir -p tools && cd tools @@ -44,34 +64,30 @@ jobs: unzip -q slc_cli_linux.zip -d slc_cli rm slc_cli_linux.zip - - name: Upload prepared sources + - name: Upload Tools uses: actions/upload-artifact@v5 with: - name: gsdk-and-tools - path: | - src/ - tools/ + name: ARM_GNU-and-slc-toolchain + path: tools/ include-hidden-files: true build-ml: runs-on: ubuntu-latest - needs: prepare-sdk-and-tools + needs: [generate-matrix, get-sdk, get-tools] strategy: fail-fast: false - matrix: - 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 - + matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} steps: - - name: Download prepared sources - uses: actions/download-artifact@v4 + - name: Download GSDK + uses: actions/download-artifact@v5 + with: + name: SDK + path: . + + - name: Download ARM-GNU and SLC toolchain + uses: actions/download-artifact@v5 with: - name: gsdk-and-tools + name: ARM_GNU-and-slc-toolchain path: . - name: Install Java 21 @@ -100,17 +116,19 @@ jobs: run: | set -e slc configuration --sdk "${{ github.workspace }}/src/gsdk" - slc signature trust --sdk "${{ github.workspace }}/src/gsdk" + slc signature trust --sdk "${{ github.workspace }}/src/gsdk" slc signature trust --extension-path "${{ github.workspace }}/src/gsdk/extension/aiml-extension" slc signature trust --extension-path "${{ github.workspace }}/src/gsdk/extension/machine_learning_applications" - name: Generate + Build - working-directory: ${{ github.workspace }}/src/gsdk/extension/machine_learning_applications/application + working-directory: ${{ github.workspace }}/src/gsdk/extension/machine_learning_applications env: APP: ${{ matrix.app }} BOARD: ${{ matrix.board }} run: | set -e + echo "App: $APP" + echo "BOARD: $BOARD" slc generate -d target/$APP/$BOARD -p $APP.slcp --with $BOARD -s "${{ github.workspace }}/src/gsdk" cmake --preset project -S target/$APP/$BOARD/${APP##*/}_cmake cmake --build target/$APP/$BOARD/${APP##*/}_cmake/build --parallel diff --git a/.github/workflows/scripts/generate_matrix.py b/.github/workflows/scripts/generate_matrix.py new file mode 100644 index 0000000..330cb17 --- /dev/null +++ b/.github/workflows/scripts/generate_matrix.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +import os, json +from pathlib import Path +import xml.etree.ElementTree as ET + +ROOT = Path(__file__).resolve().parents[2] +TEMPLATES_XML = ROOT / "templates.xml" + +def get_prop(desc, key): + # + p = desc.find(f'properties[@key="{key}"]') + return (p.get("value") if p is not None else "").strip() + +def split_ws(s): + # boardCompatibility is space-separated: "brd2601a brd2601b" + return [x for x in s.replace(",", " ").split() if x] + +def main(): + tree = ET.parse(TEMPLATES_XML) + root = tree.getroot() + + rows = [] + for desc in root.findall("descriptors"): + app = get_prop(desc, "projectFilePaths").split(".")[0] # e.g. application/voice/.../series_2.slcp -> application/voice/.../series_2 + boards = split_ws(get_prop(desc, "boardCompatibility")) # e.g. ["brd2601a", "brd2601b"] + + for board in boards: + rows.append({ + "app": app, + "board": board, + }) + + if not rows: + # Avoid empty matrix which makes Actions error out + rows = [{"app":"noop","board":"noop"}] + + matrix = {"include": rows} + # Emit as a job output + with open(os.environ["GITHUB_OUTPUT"], "a") as fh: + fh.write(f"matrix={json.dumps(matrix)}\n") + + print(f"Generated {len(rows)} matrix rows from {TEMPLATES_XML}") + +if __name__ == "__main__": + main() From 13380108bcce8510c4d82ffc416b35450a67c351 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:35:51 +0530 Subject: [PATCH 081/101] Fix genarte_build.py filename issues --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 50ad7e9..992c621 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v5 - name: Generate dynamic matrix from templates.xml - run: .github/scripts/build_matrix.py + run: .github/scripts/generate_matrix.py get-sdk: runs-on: ubuntu-latest From f43181c81a2e0064ae963890dce365ead248dc5a Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:37:09 +0530 Subject: [PATCH 082/101] Fix genarte_build.py filename issues --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 992c621..67baac7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v5 - name: Generate dynamic matrix from templates.xml - run: .github/scripts/generate_matrix.py + run: .github\workflows\scripts\generate_matrix.py get-sdk: runs-on: ubuntu-latest From e8a05c5e16cc8f1022ae3cb9f00602d322f6e639 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:43:09 +0530 Subject: [PATCH 083/101] Fix genarte_build.py building issues --- .github/workflows/CI.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 67baac7..826fcbc 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -9,12 +9,15 @@ jobs: generate-matrix: runs-on: ubuntu-latest outputs: - matrix: ${{ steps.mk.outputs.matrix }} + matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - uses: actions/checkout@v5 - name: Generate dynamic matrix from templates.xml - run: .github\workflows\scripts\generate_matrix.py + id: set-matrix + run: | + matrix=$(python3 .github/workflows/scripts/generate_app_build_matrix.py) + echo "matrix=$matrix" >> $GITHUB_OUTPUT get-sdk: runs-on: ubuntu-latest From ffaff8292e91ec3a123ce7e639ca0fb9d0dc2f08 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:47:04 +0530 Subject: [PATCH 084/101] Fix genarte_build.py filename issues --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 826fcbc..8f92be6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ jobs: - name: Generate dynamic matrix from templates.xml id: set-matrix run: | - matrix=$(python3 .github/workflows/scripts/generate_app_build_matrix.py) + matrix=$(python3 ${{ github.workspace }}/.github/workflows/scripts/generate_app_build_matrix.py) echo "matrix=$matrix" >> $GITHUB_OUTPUT get-sdk: From 2f9cf66cc7ac3766be6ddf92fe78b6a49bb92e93 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:48:28 +0530 Subject: [PATCH 085/101] Fix genarte_build.py filename issues --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8f92be6..609bbbe 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ jobs: - name: Generate dynamic matrix from templates.xml id: set-matrix run: | - matrix=$(python3 ${{ github.workspace }}/.github/workflows/scripts/generate_app_build_matrix.py) + matrix=$(python3 .github/workflows/scripts/generate_matrix.py) echo "matrix=$matrix" >> $GITHUB_OUTPUT get-sdk: From cb1b94a775e922fefdd91b8f0c0230737bb8710f Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:53:12 +0530 Subject: [PATCH 086/101] Update template.xml path in genarte_build.py --- .github/workflows/scripts/generate_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/generate_matrix.py b/.github/workflows/scripts/generate_matrix.py index 330cb17..1c6a74e 100644 --- a/.github/workflows/scripts/generate_matrix.py +++ b/.github/workflows/scripts/generate_matrix.py @@ -3,7 +3,7 @@ from pathlib import Path import xml.etree.ElementTree as ET -ROOT = Path(__file__).resolve().parents[2] +ROOT = Path(__file__).resolve().parents[3] TEMPLATES_XML = ROOT / "templates.xml" def get_prop(desc, key): From e3ae418bca12a79b6d8c7b7a2d4f634cbe9c97ba Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 13:09:40 +0530 Subject: [PATCH 087/101] ensure generate_matrix.py outputs valid JSON for fromJSON() and fix YAML upload indentation --- .github/workflows/scripts/generate_matrix.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scripts/generate_matrix.py b/.github/workflows/scripts/generate_matrix.py index 1c6a74e..ee97a47 100644 --- a/.github/workflows/scripts/generate_matrix.py +++ b/.github/workflows/scripts/generate_matrix.py @@ -35,10 +35,8 @@ def main(): rows = [{"app":"noop","board":"noop"}] matrix = {"include": rows} - # Emit as a job output - with open(os.environ["GITHUB_OUTPUT"], "a") as fh: - fh.write(f"matrix={json.dumps(matrix)}\n") - + print(json.dumps(matrix, indent=2)) + print(f"Generated {len(rows)} matrix rows from {TEMPLATES_XML}") if __name__ == "__main__": From 5869f67674c5c0f8ece1bf330cf7f62921da1691 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 14:10:20 +0530 Subject: [PATCH 088/101] removw unwanted print statement in genarte_build.py --- .github/workflows/scripts/generate_matrix.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/scripts/generate_matrix.py b/.github/workflows/scripts/generate_matrix.py index ee97a47..aaf7b6c 100644 --- a/.github/workflows/scripts/generate_matrix.py +++ b/.github/workflows/scripts/generate_matrix.py @@ -32,12 +32,10 @@ def main(): if not rows: # Avoid empty matrix which makes Actions error out - rows = [{"app":"noop","board":"noop"}] + rows = {"app":"noop","board":"noop"} matrix = {"include": rows} print(json.dumps(matrix, indent=2)) - - print(f"Generated {len(rows)} matrix rows from {TEMPLATES_XML}") if __name__ == "__main__": main() From ffb8bb0cc3236b457f1dd474b6fc94aa40121c50 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 14:14:54 +0530 Subject: [PATCH 089/101] ensure generate_matrix.py outputs valid JSON for fromJSON() and fix YAML upload indentation --- .github/workflows/scripts/generate_matrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/generate_matrix.py b/.github/workflows/scripts/generate_matrix.py index aaf7b6c..0c8ea24 100644 --- a/.github/workflows/scripts/generate_matrix.py +++ b/.github/workflows/scripts/generate_matrix.py @@ -27,12 +27,12 @@ def main(): for board in boards: rows.append({ "app": app, - "board": board, + "board": board }) if not rows: # Avoid empty matrix which makes Actions error out - rows = {"app":"noop","board":"noop"} + rows = [{"app":"noop","board":"noop"}] matrix = {"include": rows} print(json.dumps(matrix, indent=2)) From 8a5b4307e6d6fe10fb2f8b25da558579cf29a1e9 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 14:24:06 +0530 Subject: [PATCH 090/101] ensure generate_matrix.py outputs valid JSON for fromJSON() and fix YAML upload indentation --- .github/workflows/scripts/generate_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/generate_matrix.py b/.github/workflows/scripts/generate_matrix.py index 0c8ea24..7153b4a 100644 --- a/.github/workflows/scripts/generate_matrix.py +++ b/.github/workflows/scripts/generate_matrix.py @@ -35,7 +35,7 @@ def main(): rows = [{"app":"noop","board":"noop"}] matrix = {"include": rows} - print(json.dumps(matrix, indent=2)) + print(json.dumps(matrix)) if __name__ == "__main__": main() From df31e442b6669f464c5425bd0f544cfc3548a957 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 14:31:43 +0530 Subject: [PATCH 091/101] debug file structure --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 609bbbe..3dc0ff2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -103,6 +103,7 @@ jobs: - name: Configure SLC,ARM-GNU, JAVA paths run: | set -e + tree -L 3 chmod -R +x ${{ github.workspace }}/tools/armgnu echo "ARM_GCC_DIR=${{ github.workspace }}/tools/armgnu" >> "$GITHUB_ENV" echo "${{ github.workspace }}/tools/armgnu/bin/" >> "$GITHUB_PATH" From e0ba1f9c5290d97db84b00892d7b976a01e055e9 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 14:44:20 +0530 Subject: [PATCH 092/101] update file structure --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3dc0ff2..a56f5f0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -50,7 +50,7 @@ jobs: uses: actions/upload-artifact@v5 with: name: SDK - path: src/ + path: . include-hidden-files: true get-tools: @@ -71,7 +71,7 @@ jobs: uses: actions/upload-artifact@v5 with: name: ARM_GNU-and-slc-toolchain - path: tools/ + path: . include-hidden-files: true build-ml: From 52801a2f064809303b1696cec9659329cb2e7fc2 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 15:06:50 +0530 Subject: [PATCH 093/101] Update Board compatibility --- templates.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates.xml b/templates.xml index a0334d0..ebb2568 100644 --- a/templates.xml +++ b/templates.xml @@ -4,7 +4,7 @@ - + @@ -18,7 +18,7 @@ - + From b476ee84522dd6863b7e6eaa2eb5bf3d77fdf103 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 15:13:23 +0530 Subject: [PATCH 094/101] Remove unsupported example from template xml and add CI trigger condition --- .github/workflows/CI.yml | 15 +++++++++++++-- templates.xml | 14 -------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a56f5f0..3cfa600 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,6 +1,17 @@ name: Continuous Integration for Machine Learning Applications -on: [push] - +on: + push: + branches: + - main + - feature/* + tags: + - v* + pull_request: + branches: + - main + - feature/* + workflow_dispatch: + permissions: id-token: write contents: read diff --git a/templates.xml b/templates.xml index ebb2568..44b23de 100644 --- a/templates.xml +++ b/templates.xml @@ -13,20 +13,6 @@ - - - - - - - - - - - - - - From f0d20692cc993909e1879ffe22fbf5d455085209 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 15:16:26 +0530 Subject: [PATCH 095/101] CI trigger on push --- .github/workflows/CI.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3cfa600..a56f5f0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,17 +1,6 @@ name: Continuous Integration for Machine Learning Applications -on: - push: - branches: - - main - - feature/* - tags: - - v* - pull_request: - branches: - - main - - feature/* - workflow_dispatch: - +on: [push] + permissions: id-token: write contents: read From 0c9f5f69f9a6bb05ccc015808eb759fe122bf9dd Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 15:20:20 +0530 Subject: [PATCH 096/101] CI trigger on push --- templates.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates.xml b/templates.xml index 44b23de..6dc745f 100644 --- a/templates.xml +++ b/templates.xml @@ -4,7 +4,7 @@ - + From 44c026dac3e090a7e15c6b5e7385f5ae11da96ab Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 15:29:19 +0530 Subject: [PATCH 097/101] CI trigger condition update --- .github/workflows/CI.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a56f5f0..3cfa600 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,6 +1,17 @@ name: Continuous Integration for Machine Learning Applications -on: [push] - +on: + push: + branches: + - main + - feature/* + tags: + - v* + pull_request: + branches: + - main + - feature/* + workflow_dispatch: + permissions: id-token: write contents: read From e730a6c47c58cc3d71ac42fec7f4abcba85e26a0 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 21:55:11 +0530 Subject: [PATCH 098/101] Retrigger CI to see if json modification works --- .github/workflows/CI.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3cfa600..ebc4031 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,16 +1,5 @@ name: Continuous Integration for Machine Learning Applications -on: - push: - branches: - - main - - feature/* - tags: - - v* - pull_request: - branches: - - main - - feature/* - workflow_dispatch: +on: [push] permissions: id-token: write @@ -27,7 +16,7 @@ jobs: - name: Generate dynamic matrix from templates.xml id: set-matrix run: | - matrix=$(python3 .github/workflows/scripts/generate_matrix.py) + matrix=$(python3 .github/workflows/scripts/generate_matrix.py | jq -c .) echo "matrix=$matrix" >> $GITHUB_OUTPUT get-sdk: From 2c75fc222871f60542cc312f12c5951c144efc52 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 21:59:53 +0530 Subject: [PATCH 099/101] CI trigger on push --- .github/workflows/scripts/generate_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/generate_matrix.py b/.github/workflows/scripts/generate_matrix.py index 7153b4a..0c8ea24 100644 --- a/.github/workflows/scripts/generate_matrix.py +++ b/.github/workflows/scripts/generate_matrix.py @@ -35,7 +35,7 @@ def main(): rows = [{"app":"noop","board":"noop"}] matrix = {"include": rows} - print(json.dumps(matrix)) + print(json.dumps(matrix, indent=2)) if __name__ == "__main__": main() From 78e6e426b08cf6e325e62792010606b79ed89401 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 22:10:23 +0530 Subject: [PATCH 100/101] CI trigger condition update --- .github/workflows/CI.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ebc4031..61434e6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,5 +1,16 @@ name: Continuous Integration for Machine Learning Applications -on: [push] +on: + push: + branches: + - main + - feature/* + tags: + - v* + pull_request: + branches: + - main + - feature/* + workflow_dispatch: permissions: id-token: write @@ -49,7 +60,7 @@ jobs: - name: Upload SDK uses: actions/upload-artifact@v5 with: - name: SDK + name: sisdk-and-extensions path: . include-hidden-files: true @@ -70,11 +81,11 @@ jobs: - name: Upload Tools uses: actions/upload-artifact@v5 with: - name: ARM_GNU-and-slc-toolchain + name: arm-gnu-toolchain-and-slc path: . include-hidden-files: true - build-ml: + build: runs-on: ubuntu-latest needs: [generate-matrix, get-sdk, get-tools] strategy: @@ -84,13 +95,13 @@ jobs: - name: Download GSDK uses: actions/download-artifact@v5 with: - name: SDK + name: sisdk-and-extensions path: . - name: Download ARM-GNU and SLC toolchain uses: actions/download-artifact@v5 with: - name: ARM_GNU-and-slc-toolchain + name: arm-gnu-toolchain-and-slc path: . - name: Install Java 21 From cc5e16721ef5effdf91a85510ee588f3fd54c142 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 6 Nov 2025 16:39:32 +0530 Subject: [PATCH 101/101] Rename CI.yml to ci.yml (fix case sensitivity) --- .github/workflows/{CI.yml => ci.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{CI.yml => ci.yml} (100%) diff --git a/.github/workflows/CI.yml b/.github/workflows/ci.yml similarity index 100% rename from .github/workflows/CI.yml rename to .github/workflows/ci.yml