From e80cfa38a7dd574ccea118e705dfbc588cee6167 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Tue, 21 Oct 2025 12:26:04 +0530 Subject: [PATCH 001/100] 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 821f3b6dc844ed26718aeae92c86a8bb1f4b0851 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Tue, 21 Oct 2025 14:13:38 +0530 Subject: [PATCH 002/100] 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 f59554429a231337fc50832db7746a269ec64788 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 09:46:13 +0530 Subject: [PATCH 003/100] 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 a3e20a82ac025647bb62fbb71d6cff5590cf207b Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:00:11 +0530 Subject: [PATCH 004/100] 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 52610987aca6e12eaddf4060648aff2440b32963 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:09:47 +0530 Subject: [PATCH 005/100] 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 f9bb9a4a676b814d47e7f253b896b4e78904d2e8 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:16:23 +0530 Subject: [PATCH 006/100] 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 f16b11a70c5c1fb7c65526f09969ea3bbeb7a7c3 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:19:05 +0530 Subject: [PATCH 007/100] 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 38fa9bc2f16691b980fb520078cbe95fd88370ce Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:21:04 +0530 Subject: [PATCH 008/100] 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 c8b025f2c802fa2bb4ebc73ada71c61e2a1d2f05 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:21:42 +0530 Subject: [PATCH 009/100] 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 a0cb5d435d618e7f0c4b934ec3212c60a8cffcd5 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:23:06 +0530 Subject: [PATCH 010/100] 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 884d629856e64fb766ec1d20d92317dfcd4cd420 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:23:59 +0530 Subject: [PATCH 011/100] 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 237b37a4cfff8d8f70b2ea0fdf1015fa7486bc4f Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 11:37:21 +0530 Subject: [PATCH 012/100] 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 99ca1f4d55538bec7a4be2655f981f38aa469cbf Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 12:03:16 +0530 Subject: [PATCH 013/100] 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 af60f0df0d3c3c1842226f696bb791836a10be77 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 12:26:48 +0530 Subject: [PATCH 014/100] 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 2964e0222f25b03294c6bd1813cd875ccdb88ac7 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 12:43:04 +0530 Subject: [PATCH 015/100] 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 b725bf5d60688870bd82523e127457fbaecbfd23 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 13:09:11 +0530 Subject: [PATCH 016/100] 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 efd9aa9fc987def62b635696d883666120015ce8 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 13:32:10 +0530 Subject: [PATCH 017/100] 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 233399f3e8bfffd3bcdd2aca848900468565cf16 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 14:02:04 +0530 Subject: [PATCH 018/100] 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 192cebde2fa7f5fe7ea5317fea0549b0d5852ac4 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 14:28:20 +0530 Subject: [PATCH 019/100] 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 e8c400ba84243a6151543bc66315723c3e328c5e Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 14:39:18 +0530 Subject: [PATCH 020/100] 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 a24c4c33928ec000d6039f8fd4c6b5fec959d176 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 16:56:34 +0530 Subject: [PATCH 021/100] 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 2cfd993bb8d130352b54b09593b022fd1f609929 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 17:12:26 +0530 Subject: [PATCH 022/100] 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 38f455a192fa7a1bcc7b0f1a8ec8e42020312353 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 17:20:14 +0530 Subject: [PATCH 023/100] 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 f110ab878d19c084b70f6769b5a9a00764680d0c Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Wed, 22 Oct 2025 17:31:21 +0530 Subject: [PATCH 024/100] 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 c7031ea9525b5496d7b59d91e5b95d69c3543468 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 09:57:15 +0530 Subject: [PATCH 025/100] 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 785633e87fb2a47b4a4a428f1190cef3848b678a Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:13:35 +0530 Subject: [PATCH 026/100] 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 04d120dfa75ddaf42329750bdeb56a5460015d68 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:20:07 +0530 Subject: [PATCH 027/100] 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 1fd544677a3263c543c999c8874577527b307673 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:24:51 +0530 Subject: [PATCH 028/100] 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 eccc1036b4d6905251850e982b4432ddb6f90fdd Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:35:22 +0530 Subject: [PATCH 029/100] 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 e2040df9392576d2536bfa84cb6366fe28e21033 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:49:14 +0530 Subject: [PATCH 030/100] 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 1ba8d45e14c2f8e84c4510f40887de4a7dc1c950 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 10:58:00 +0530 Subject: [PATCH 031/100] 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 7d8048129c53869b6e7dbaa4b28c38742fbe132f Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 11:06:23 +0530 Subject: [PATCH 032/100] 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 af06a601669550071ae7807f1fb3c174d818ffe1 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 11:15:36 +0530 Subject: [PATCH 033/100] 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 fb5849e05399ba9ce2a3486a0f3e24c67e636188 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 11:36:48 +0530 Subject: [PATCH 034/100] 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 38258bf0b9934327b07f895767df65372a5ff89b Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 11:56:50 +0530 Subject: [PATCH 035/100] 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 d0ec48282c1a911a720c849585fd9949643bc0cb Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 12:07:40 +0530 Subject: [PATCH 036/100] 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 7b702a659241efda23bf96157d9019b5f8adb092 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 12:20:31 +0530 Subject: [PATCH 037/100] 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 1dfc2005f9320f6dd93f394aa1fba0c51e643ddf Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 12:35:57 +0530 Subject: [PATCH 038/100] 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 9cdd53602b68d4795bf240aa78c9a2a65fe041f8 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 12:51:41 +0530 Subject: [PATCH 039/100] 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 0c165264b08532eeacccb7a8e2fa538dd92c75f1 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 13:10:34 +0530 Subject: [PATCH 040/100] 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 86cd92e78948acb798092cf347953718e1945292 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 14:03:50 +0530 Subject: [PATCH 041/100] 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 92ba1ddde10476a76d835a58d85c4dde57e3992b Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 14:20:06 +0530 Subject: [PATCH 042/100] 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 ba0b3af1c29907d5940c2dc73f0c7c493d174d8c Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 14:30:46 +0530 Subject: [PATCH 043/100] 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 124f5381125646a18055a596880546efa6c90058 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 15:16:14 +0530 Subject: [PATCH 044/100] 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 af708d9dccdd36af613dcb149dbda24b624700ee Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 15:35:54 +0530 Subject: [PATCH 045/100] 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 6952139aec244d81574246c959ef26f19f8fc52f Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 15:43:27 +0530 Subject: [PATCH 046/100] 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 559ea6bee7ec2670fe52708efbe9b56c7fc2be98 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 15:49:36 +0530 Subject: [PATCH 047/100] 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 c10d8c0226d63dc70a0d07e575d14b343b22d4ea Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 15:57:03 +0530 Subject: [PATCH 048/100] 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 83abe55638dbbfe0d1a6e19714c8320bb74184e8 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 16:07:25 +0530 Subject: [PATCH 049/100] 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 0e68ad1604acbcc703b7bf4c26c993110ee1279e Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 19:32:12 +0530 Subject: [PATCH 050/100] Latest CI 0732 --- .github/workflows/CI.yml | 22 +++++++++++++++++++ .../imu/ble_magic_wand/ble_magic_wand.slcp | 15 +++++++++++++ 2 files changed, 37 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: | diff --git a/application/imu/ble_magic_wand/ble_magic_wand.slcp b/application/imu/ble_magic_wand/ble_magic_wand.slcp index 04e186a..7a94411 100644 --- a/application/imu/ble_magic_wand/ble_magic_wand.slcp +++ b/application/imu/ble_magic_wand/ble_magic_wand.slcp @@ -29,10 +29,14 @@ source: - path: magic_wand.cc - path: accelerometer.cc - path: bluetooth.c +sdk_extension: + - id: aiml + version: 2.1.2 component: - id: sl_system - id: device_init - id: tensorflow_lite_micro + from: aiml - id: imu_driver - id: iostream_recommended_stream - id: power_manager @@ -55,6 +59,17 @@ component: - id: printf - id: simple_button instance: [btn0] + - id: tensorflow_debug_log_iostream + from: aiml + - id: tensorflow_lite_micro_accelerated_kernels + from: aiml + condition: [device_has_mvp] + - id: tensorflow_lite_micro_optimized_kernels + from: aiml + condition: [device_has_mvp] + - id: tensorflow_lite_micro_optimized_kernels + from: aiml + condition: [device_compute_basic] define: - name: DEBUG_EFM - name: TF_LITE_STATIC_MEMORY From b3b9fd2f23da98e3ab36ecdf739c244502091acf Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 23 Oct 2025 19:39:47 +0530 Subject: [PATCH 051/100] 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 7a5c23a88880888b012f121a05498cfd8b360915 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 13:48:34 +0530 Subject: [PATCH 052/100] update CI latest0148 --- .github/workflows/CI.yml | 25 +++++++++++++++++++ .../imu/ble_magic_wand/ble_magic_wand.slcp | 1 + .../people_flow_counter_mlx90640.slcp | 25 ++++++++++++++++++- 3 files changed, 50 insertions(+), 1 deletion(-) 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 diff --git a/application/imu/ble_magic_wand/ble_magic_wand.slcp b/application/imu/ble_magic_wand/ble_magic_wand.slcp index 7a94411..bb5a585 100644 --- a/application/imu/ble_magic_wand/ble_magic_wand.slcp +++ b/application/imu/ble_magic_wand/ble_magic_wand.slcp @@ -47,6 +47,7 @@ component: - id: gatt_configuration - id: bluetooth_feature_legacy_advertiser - id: bluetooth_feature_connection + - id: bluetooth_feature_connection_role_peripheral - id: bluetooth_feature_gatt_server - id: bluetooth_feature_legacy_scanner - id: bluetooth_feature_sm diff --git a/application/vision/people_flow_counter_mlx90640/people_flow_counter_mlx90640.slcp b/application/vision/people_flow_counter_mlx90640/people_flow_counter_mlx90640.slcp index f79a81e..18c82ba 100644 --- a/application/vision/people_flow_counter_mlx90640/people_flow_counter_mlx90640.slcp +++ b/application/vision/people_flow_counter_mlx90640/people_flow_counter_mlx90640.slcp @@ -23,6 +23,8 @@ include: sdk_extension: - id: machine_learning_applications version: "1.0.0" + - id: aiml + version: 2.1.2 component: - id: sl_system - id: device_init @@ -32,6 +34,7 @@ component: - id: simple_led instance: [led0, led1] - id: iostream_recommended_stream + - id: cmsis_dsp - id: iostream_eusart instance: [vcom] - id: iostream_retarget_stdio @@ -40,8 +43,28 @@ component: - id: app_assert - id: app_log - id: device_init_dpll + - id: bluetooth_stack + - id: gatt_configuration + - id: bluetooth_feature_legacy_advertiser + - id: bluetooth_feature_connection + - id: bluetooth_feature_connection_role_peripheral + - id: bluetooth_feature_gatt_server + - id: bluetooth_feature_legacy_scanner + - id: bluetooth_feature_sm + - id: bluetooth_feature_system - id: tensorflow_lite_micro - - id: bt_fp_soc_default + from: aiml + - id: tensorflow_debug_log_iostream + from: aiml + - id: tensorflow_lite_micro_accelerated_kernels + from: aiml + condition: [device_has_mvp] + - id: tensorflow_lite_micro_optimized_kernels + from: aiml + condition: [device_has_mvp] + - id: tensorflow_lite_micro_optimized_kernels + from: aiml + condition: [device_compute_basic] - id: vision from: machine_learning_applications define: From 7d65d610238a464493e2a6d33dc4bbc6fa3ecccb Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 13:54:12 +0530 Subject: [PATCH 053/100] 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 5f372e7290d3c32000fcf6809dd2d9ac1e3df448 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 14:04:54 +0530 Subject: [PATCH 054/100] 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 898a287680a1bf1b721187eefcfb83a599ea9981 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 14:20:20 +0530 Subject: [PATCH 055/100] 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 9ba8b8497dfa3c307c503d1fe5173bb35ad37795 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 14:30:03 +0530 Subject: [PATCH 056/100] 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 447acb02e37a959abcb20456e9ff428ab3ef0142 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 14:35:50 +0530 Subject: [PATCH 057/100] 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 4b6fa332441de8b86b025cd42d87403baa9a148e Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 14:39:44 +0530 Subject: [PATCH 058/100] 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 23091447e43c6098bb3b3dd52544ded3c47bced6 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 15:01:15 +0530 Subject: [PATCH 059/100] 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 14bd4461f85c1f04bce5ced779ad301d00498998 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 15:08:52 +0530 Subject: [PATCH 060/100] 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 6e5074380afecaf3b5668100405dc429b794133e Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 15:22:43 +0530 Subject: [PATCH 061/100] 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 dceb46fd252c3e193a9f156efa72a932d1e54bb3 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 15:35:03 +0530 Subject: [PATCH 062/100] 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 d80f1dac0e29d587500c84f717a06ecaa7aff9a6 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 15:55:37 +0530 Subject: [PATCH 063/100] 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 468042c168ef78b88e169e33c54adbcd4a84dee0 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 24 Oct 2025 16:04:23 +0530 Subject: [PATCH 064/100] 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 798a1a94f21e84fadd7f3833c9e64c846ce4228f Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:04:10 +0530 Subject: [PATCH 065/100] 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 67a8242a1e7c12016f86d60ceb4655f0965d89ba Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:07:00 +0530 Subject: [PATCH 066/100] 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 ed9c72d48597d7cdf6950e228d34e0306254b732 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:10:59 +0530 Subject: [PATCH 067/100] 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 e0160e18cc80e351c46683ac93e20bac8e0f485d Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:11:49 +0530 Subject: [PATCH 068/100] 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 9751d9ea3100266bd0499e8b06b686995c7f78e1 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:17:11 +0530 Subject: [PATCH 069/100] 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 93a39c5359ed7817f265b85d8ad167f864e108c2 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:22:30 +0530 Subject: [PATCH 070/100] 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 843b919fb36dc2265ac4262f04011a0d240fcb58 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:28:49 +0530 Subject: [PATCH 071/100] 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 1821252af8dca69dd981885053e5d9c4a30a109e Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:36:35 +0530 Subject: [PATCH 072/100] 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 aff834c2279f03601ee4f456017e2f06ab85cf5f Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:44:23 +0530 Subject: [PATCH 073/100] 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 dcae63ffb1fc2a0d7bcd39106818858ce56612f6 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 16:55:51 +0530 Subject: [PATCH 074/100] 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 dd22856d9d1c240fe0aae4fdb46ca5963b6dc8ac Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 17:06:33 +0530 Subject: [PATCH 075/100] 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 bb33727fe4220ae70fcb6da2f6a9a5e8247cd890 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 17:18:15 +0530 Subject: [PATCH 076/100] 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 58c4d2fe97480de2def5472de39a27ae185e37dd Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 17:27:49 +0530 Subject: [PATCH 077/100] 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 c90dc7b3485a1677ea5a23eb960b9618c8d660c6 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Sat, 25 Oct 2025 17:32:24 +0530 Subject: [PATCH 078/100] 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 3334974b2a313ab7f7bfabcdf8781fda91395022 Mon Sep 17 00:00:00 2001 From: Jeevan revaneppa Hirethanad Date: Wed, 29 Oct 2025 22:10:34 +0530 Subject: [PATCH 079/100] 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 831bf622bab6901ffedbae6bc0da667a71a41d3a Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:23:55 +0530 Subject: [PATCH 080/100] 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 23a6dc5fbc63ca82a39f01eeba2bbd214f090e47 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:35:51 +0530 Subject: [PATCH 081/100] 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 27de5422fd2590ee851bc269b9da98530eca8bef Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:37:09 +0530 Subject: [PATCH 082/100] 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 8d3a12848451b3cb4f8b32ec65229dd6cec68b4a Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:43:09 +0530 Subject: [PATCH 083/100] 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 d63e450beb04414dab3dfdc26ae5ad88ab7c9892 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:47:04 +0530 Subject: [PATCH 084/100] 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 23607785e424e0d2c8a320854bc653b9ee56a3db Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:48:28 +0530 Subject: [PATCH 085/100] 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 d81dc29f887d2333baa58447cae9636a9179f51d Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 12:53:12 +0530 Subject: [PATCH 086/100] 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 1c74b6dfa535852147a33cc0a4b90a0b4c4737d4 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 13:09:40 +0530 Subject: [PATCH 087/100] 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 06550d8b8295ea6bfe2895c510df4f0f1999d027 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 14:10:20 +0530 Subject: [PATCH 088/100] 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 d5d6e664ff5ed577a9e1c076453461cf28e2b914 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 14:14:54 +0530 Subject: [PATCH 089/100] 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 ba88781b36faf144f1c47d832f42f28665a299f3 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 14:24:06 +0530 Subject: [PATCH 090/100] 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 1e4b3d2eafe72385e229ea50a2b7ac8f5a74d45c Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 14:31:43 +0530 Subject: [PATCH 091/100] 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 8c3a6179e8cf31a8952eb9faa053da80438f8e05 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 14:44:20 +0530 Subject: [PATCH 092/100] 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 94b7cf49041ab6a23e4c254fd6458eeb4668585a Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Thu, 30 Oct 2025 15:06:50 +0530 Subject: [PATCH 093/100] 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 1f611283d37bdaa4affba5c61437c6b4e339f5f0 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 15:13:23 +0530 Subject: [PATCH 094/100] 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 2443f30a8f68a38ddc710d4eb84356fe6df2591f Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 15:16:26 +0530 Subject: [PATCH 095/100] 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 f7ed6bac3b1e72a89ea10a35de5bbc81187c7ef2 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 15:20:20 +0530 Subject: [PATCH 096/100] 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 0272ca3d7967672a1facfb4e93f9d7f7c93304a4 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 15:29:19 +0530 Subject: [PATCH 097/100] 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 fc515da5b71edd63967afdada97d97ce5d46c6df Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 21:55:11 +0530 Subject: [PATCH 098/100] 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 932d25d6b1f4d6b7a67a3c7297b902900832d172 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 21:59:53 +0530 Subject: [PATCH 099/100] 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 c01f3372cd4c49de7fc98c2fd3f2b665a8901c64 Mon Sep 17 00:00:00 2001 From: Jeevan Revaneppa Hirethanad Date: Fri, 31 Oct 2025 22:10:23 +0530 Subject: [PATCH 100/100] CI trigger condition update --- .github/workflows/CI.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ebc4031..2330307 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