Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 21 additions & 33 deletions .github/workflows/aciont_tool.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions ai/LiME-TM/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@ 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)"
select TSETLIN_USING_STATIC_MODEL
select TSETLIN_MODEL_TRAINABLE
help
Training a compressed Tsetlin Machine model on the MNIST dataset.
default y
endchoice

config TSETLIN_USING_PROTOBUF
Expand Down