From 2a76f2205a35aa3a336274712264d9c5e5462b85 Mon Sep 17 00:00:00 2001 From: CYFS <2805686936@qq.com> Date: Thu, 20 Aug 2026 19:34:00 +0800 Subject: [PATCH 1/2] ai: Fix LiME-TM example choice default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 MNIST 示例配置改为命名 choice,并将 Static Model 设置为 choice 的默认选项。移除对 choice 成员无效的 default 配置,避免 Kconfig 警告。 --- ai/LiME-TM/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ai/LiME-TM/Kconfig b/ai/LiME-TM/Kconfig index 03fc007897..fc9ccf57c5 100644 --- a/ai/LiME-TM/Kconfig +++ b/ai/LiME-TM/Kconfig @@ -11,15 +11,15 @@ if PKG_USING_LIME_TM string default "/packages/ai/LiME-TM" - choice + choice LIME_TM_USING_MNIST_EXAMPLE prompt "Choose exmaple" + default LIME_TM_USING_MNIST_STATIC_EXAMPLE config LIME_TM_USING_MNIST_FS_EXAMPLE bool "Training and testing MNIST example (File System)" select TSETLIN_USING_PROTOBUF help Training a compressed Tsetlin Machine model on the MNIST dataset. - default n config LIME_TM_USING_MNIST_STATIC_EXAMPLE bool "Training and testing MNIST example (Static Model)" @@ -27,7 +27,6 @@ if PKG_USING_LIME_TM select TSETLIN_MODEL_TRAINABLE help Training a compressed Tsetlin Machine model on the MNIST dataset. - default y endchoice config TSETLIN_USING_PROTOBUF From ce249fb9a0e393c8182275f2707eb1310b5d4fc8 Mon Sep 17 00:00:00 2001 From: CYFS <2805686936@qq.com> Date: Thu, 20 Aug 2026 20:00:23 +0800 Subject: [PATCH 2/2] ci: validate Kconfig from current PR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 ToolsCI 改为直接检出当前 PR 内容并解析 packages/Kconfig。移除 RT-Thread BSP、ARM 工具链安装、pkgs --update 和 BSP 编译步骤,仅保留 Kconfig warning 和解析错误检查。 --- .github/workflows/aciont_tool.yml | 54 ++++++++++++------------------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/.github/workflows/aciont_tool.yml b/.github/workflows/aciont_tool.yml index bb7c18dade..5a8790b0e8 100644 --- a/.github/workflows/aciont_tool.yml +++ b/.github/workflows/aciont_tool.yml @@ -1,51 +1,39 @@ name: ToolsCI -# 这个CI用来检查menuconfig中的warning和错误 +# This CI checks Kconfig warnings and errors in the current packages tree. on: workflow_call: workflow_dispatch: - + permissions: - contents: read # to fetch code (actions/checkout) + contents: read jobs: test: if: ${{ github.repository == 'RT-Thread/packages' }} runs-on: ubuntu-22.04 name: Tools - env: - TEST_BSP_ROOT: bsp/stm32/stm32f407-atk-explorer steps: - - uses: actions/checkout@v5 - with: - repository: RT-Thread/rt-thread - - - name: Install Tools - shell: bash - run: | - wget https://raw.githubusercontent.com/RT-Thread/env/master/install_ubuntu.sh - chmod 777 install_ubuntu.sh - ./install_ubuntu.sh - - - name: Install Arm ToolChains - if: ${{ success() }} - shell: bash - run: | - wget -q https://github.com/RT-Thread/toolchains-ci/releases/download/v1.3/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 - sudo tar xjf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 -C /opt - /opt/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc --version - echo "RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin" >> $GITHUB_ENV - - name: Checkout packages + - name: Checkout current PR uses: actions/checkout@v5 with: + ref: ${{ github.sha }} path: packages - - name: Build Tools + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.11" + + - name: Install Kconfig parser + run: python -m pip install kconfiglib + + - name: Check Kconfig + working-directory: packages run: | - source ~/.env/env.sh - scons --pyconfig-silent -C $TEST_BSP_ROOT 2>menuconfig.log - cat menuconfig.log - if grep -q "warning:" menuconfig.log; then - echo "Errors found in menuconfig, failing the build." + export PKGS_DIR="$GITHUB_WORKSPACE" + python -c "import kconfiglib; kconfiglib.Kconfig('Kconfig', warn=True, warn_to_stderr=True, encoding='utf-8')" 2>kconfig.log + cat kconfig.log + if grep -q "warning:" kconfig.log; then + echo "Warnings found in Kconfig, failing the check." exit 1 fi - pushd $TEST_BSP_ROOT && pkgs --update && popd - scons -j$(nproc) -C $TEST_BSP_ROOT