diff --git a/.github/workflows/bsp_buildings.yml b/.github/workflows/bsp_buildings.yml index 8a17fb08e07..85a1b144cd6 100644 --- a/.github/workflows/bsp_buildings.yml +++ b/.github/workflows/bsp_buildings.yml @@ -32,7 +32,7 @@ jobs: build: runs-on: ubuntu-22.04 name: ${{ matrix.legs.RTT_BSP }} - if: github.repository_owner == 'RT-Thread' + #if: github.repository_owner == 'RT-Thread' strategy: fail-fast: false matrix: @@ -408,7 +408,37 @@ jobs: uses: actions/setup-python@main with: python-version: 3.8 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + - name: List all changed files + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + # 初始化变量 + declare -a BSP_DIRECTORIES + + # 遍历所有发生变化的文件 + for file in ${ALL_CHANGED_FILES}; do + # 判断文件路径是否包含 'bsp/' 并且是 'bsp' 的一级子目录 + if [[ "$file" == bsp/*/* && "$file" != *\/\/* ]]; then + # 提取 'bsp/' 后的第一级目录(假设路径格式为 bsp/xxx/yyy/...) + bsp_dir=$(dirname "$file" | awk -F'/' '{print $1 "/" $2}') + echo "Extracted BSP directory: $bsp_dir" + + # 添加到数组中(如果不存在) + if [[ ! " ${BSP_DIRECTORIES[@]} " =~ " ${bsp_dir} " ]]; then + BSP_DIRECTORIES+=("$bsp_dir") + fi + fi + done + + # 将结果暴露出去 + IFS=, # 设置分隔符为逗号 + echo "bsp_directories=${BSP_DIRECTORIES[*]}" >> $GITHUB_ENV + - name: Install Tools shell: bash run: | @@ -513,6 +543,7 @@ jobs: RTT_TOOL_CHAIN: ${{ matrix.legs.RTT_TOOL_CHAIN }} SRTT_BSP: ${{ join(matrix.legs.SUB_RTT_BSP, ',') }} run: | + echo "Detected BSP directories: ${{ env.bsp_directories }}" source ~/.env/env.sh python tools/ci/bsp_buildings.py diff --git a/bsp/stm32/stm32f091-st-nucleo/rtconfig.h b/bsp/stm32/stm32f091-st-nucleo/rtconfig.h index 9cf031b595c..2fd3f036898 100644 --- a/bsp/stm32/stm32f091-st-nucleo/rtconfig.h +++ b/bsp/stm32/stm32f091-st-nucleo/rtconfig.h @@ -6,7 +6,7 @@ #define SOC_STM32F091RC #define BOARD_STM32F091_NUCLEO - + /* RT-Thread Kernel */ #define RT_NAME_MAX 8 @@ -21,7 +21,7 @@ #define RT_USING_IDLE_HOOK #define RT_IDLE_HOOK_LIST_SIZE 4 #define IDLE_THREAD_STACK_SIZE 256 - + /* kservice optimization */ #define RT_USING_DEBUG